diff --git a/quick-test.sh b/quick-test.sh index c8660df..641f93a 100755 --- a/quick-test.sh +++ b/quick-test.sh @@ -85,7 +85,7 @@ fi # Test sf-org-info echo -n "Testing sf-org-info... " ((TESTS++)) -if ./sf-org-info --list >/dev/null 2>&1; then +if ./sf-org-info -ls >/dev/null 2>&1; then echo -e "${GREEN}✓${NC}" ((PASSED++)) else diff --git a/sf-data-export b/sf-data-export index 13a48ae..f97fe06 100755 --- a/sf-data-export +++ b/sf-data-export @@ -20,16 +20,16 @@ show_usage() { echo " sf-data-export [OPTIONS]" echo "" echo "OPTIONS:" - echo " -qy, --query QUERY SOQL query to export data" - echo " -fl, --file FILE File containing SOQL query" - echo " -so, --sobject SOBJECT Standard object query (exports all records)" - echo " -to, --target-org ORG Target org username or alias" - echo " -ot, --output FILE Output file path (default: export.csv)" - echo " -fm, --format FORMAT Output format: csv, json (default: csv)" - echo " -bk, --bulk Use bulk API for large datasets" - echo " -wt, --wait MINUTES Wait time in minutes (default: 10)" - echo " -vb, --verbose Enable verbose output" - echo " -hp, --help Show this help message" + echo " -qy SOQL query to export data" + echo " -fl File containing SOQL query" + echo " -so Standard object query (exports all records)" + echo " -to Target org username or alias" + echo " -ot Output file path (default: export.csv)" + echo " -fm Output format: csv, json (default: csv)" + echo " -bk Use bulk API for large datasets" + echo " -wt Wait time in minutes (default: 10)" + echo " -vb Enable verbose output" + echo " -hp Show this help message" echo "" echo "EXAMPLES:" echo " sf-data-export -qy \"SELECT Id, Name FROM Account LIMIT 100\"" @@ -123,43 +123,43 @@ VERBOSE=false # Parse command line arguments while [[ $# -gt 0 ]]; do case $1 in - -qy|--query) + -qy) QUERY="$2" shift 2 ;; - -fl|--file) + -fl) QUERY_FILE="$2" shift 2 ;; - -so|--sobject) + -so) SOBJECT="$2" shift 2 ;; - -to|--target-org) + -to) TARGET_ORG="$2" shift 2 ;; - -ot|--output) + -ot) OUTPUT_FILE="$2" shift 2 ;; - -fm|--format) + -fm) FORMAT="$2" shift 2 ;; - -bk|--bulk) + -bk) USE_BULK=true shift ;; - -wt|--wait) + -wt) WAIT_TIME="$2" shift 2 ;; - -vb|--verbose) + -vb) VERBOSE=true shift ;; - -hp|--help) + -hp) show_usage exit 0 ;; @@ -188,16 +188,16 @@ if [[ $query_methods -eq 0 ]]; then echo -e "${RED}Error: Must specify one of: --query, --file, or --sobject${NC}" echo "" echo -e "${YELLOW}Usage examples:${NC}" - echo -e "${GRAY} sf-data-export --query \"SELECT Id, Name FROM Account\"${NC}" - echo -e "${GRAY} sf-data-export --file queries/accounts.soql${NC}" - echo -e "${GRAY} sf-data-export --sobject Account${NC}" + echo -e "${GRAY} sf-data-export -qy \"SELECT Id, Name FROM Account\"${NC}" + echo -e "${GRAY} sf-data-export -fl queries/accounts.soql${NC}" + echo -e "${GRAY} sf-data-export -so Account${NC}" echo "" echo -e "${YELLOW}Use --help for detailed usage information.${NC}" exit 1 fi if [[ $query_methods -gt 1 ]]; then - echo -e "${RED}Error: Can only specify one of: --query, --file, or --sobject${NC}" + echo -e "${RED}Error: Can only specify one of: -qy, -fl, or -so${NC}" exit 1 fi diff --git a/sf-deploy b/sf-deploy index 0ecba9d..4b2d654 100755 --- a/sf-deploy +++ b/sf-deploy @@ -9,11 +9,11 @@ USAGE: sf-deploy -to (-sr ",[,...]" | -dr ) [-ts ",[,...]"] OPTIONS: - -to, --target-org Org alias or username for --target-org - -sr, --sources Comma-separated list of --source-dir paths - -dr, --directory Single directory path to deploy (alternative to -sr) - -ts, --tests Comma-separated list of --tests (enables --test-level RunSpecifiedTests) - -hp, --help Show this help + -to Org alias or username for --target-org + -sr Comma-separated list of --source-dir paths + -dr Single directory path to deploy (alternative to -sr) + -ts Comma-separated list of --tests (enables --test-level RunSpecifiedTests) + -hp Show this help EXAMPLES: 1) Real deploy with multiple flexipages (specific files): @@ -48,23 +48,23 @@ fi # Parse command line arguments using manual parsing for two-character options while [[ $# -gt 0 ]]; do case $1 in - -to|--target-org) + -to) ORG="$2" shift 2 ;; - -sr|--sources) + -sr) IFS=',' read -r -a SOURCES_ARR <<< "$2" shift 2 ;; - -dr|--directory) + -dr) DIR_PATH="$2" shift 2 ;; - -ts|--tests) + -ts) IFS=',' read -r -a TESTS_ARR <<< "$2" shift 2 ;; - -hp|--help) + -hp) show_help exit 0 ;; diff --git a/sf-dry-run b/sf-dry-run index 515be02..4e295f7 100755 --- a/sf-dry-run +++ b/sf-dry-run @@ -9,11 +9,11 @@ USAGE: sf-dry-run -to (-sr ",[,...]" | -dr ) [-ts ",[,...]"] OPTIONS: - -to, --target-org Org alias or username for --target-org - -sr, --sources Comma-separated list of --source-dir paths - -dr, --directory Single directory path to validate (alternative to -sr) - -ts, --tests Comma-separated list of --tests (enables --test-level RunSpecifiedTests) - -hp, --help Show this help + -to Org alias or username for --target-org + -sr Comma-separated list of --source-dir paths + -dr Single directory path to validate (alternative to -sr) + -ts Comma-separated list of --tests (enables --test-level RunSpecifiedTests) + -hp Show this help EXAMPLES: 1) Basic dry-run with multiple flexipages (specific files): @@ -48,23 +48,23 @@ fi # Parse command line arguments using manual parsing for two-character options while [[ $# -gt 0 ]]; do case $1 in - -to|--target-org) + -to) ORG="$2" shift 2 ;; - -sr|--sources) + -sr) IFS=',' read -r -a SOURCES_ARR <<< "$2" shift 2 ;; - -dr|--directory) + -dr) DIR_PATH="$2" shift 2 ;; - -ts|--tests) + -ts) IFS=',' read -r -a TESTS_ARR <<< "$2" shift 2 ;; - -hp|--help) + -hp) show_help exit 0 ;; diff --git a/sf-logs-tail b/sf-logs-tail index ac5cddf..83c1f73 100755 --- a/sf-logs-tail +++ b/sf-logs-tail @@ -21,15 +21,15 @@ show_usage() { echo " sf-logs-tail [OPTIONS]" echo "" echo "OPTIONS:" - echo " -to, --target-org ORG Target org username or alias" - echo " -ui, --user-id USER Specific user ID to monitor (default: current user)" - echo " -lv, --level LEVEL Log level: ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST" - echo " -dr, --duration MINUTES How long to tail logs in minutes (default: 30)" - echo " -ft, --filter PATTERN Filter log entries containing pattern" - echo " -ax, --apex-only Show only Apex-related log entries" - echo " -nc, --no-colors Disable colored output" - echo " -vb, --verbose Enable verbose output with timestamps" - echo " -hp, --help Show this help message" + echo " -to Target org username or alias" + echo " -ui Specific user ID to monitor (default: current user)" + echo " -lv Log level: ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST" + echo " -dr How long to tail logs in minutes (default: 30)" + echo " -ft Filter log entries containing pattern" + echo " -ax Show only Apex-related log entries" + echo " -nc Disable colored output" + echo " -vb Enable verbose output with timestamps" + echo " -hp Show this help message" echo "" echo "EXAMPLES:" echo " sf-logs-tail # Tail logs for default org" @@ -153,39 +153,39 @@ VERBOSE=false # Parse command line arguments while [[ $# -gt 0 ]]; do case $1 in - -to|--target-org) + -to) TARGET_ORG="$2" shift 2 ;; - -ui|--user-id) + -ui) USER_ID="$2" shift 2 ;; - -lv|--level) + -lv) LOG_LEVEL="$2" shift 2 ;; - -dr|--duration) + -dr) DURATION="$2" shift 2 ;; - -ft|--filter) + -ft) FILTER_PATTERN="$2" shift 2 ;; - -ax|--apex-only) + -ax) APEX_ONLY=true shift ;; - -nc|--no-colors) + -nc) NO_COLORS=true shift ;; - -vb|--verbose) + -vb) VERBOSE=true shift ;; - -hp|--help) + -hp) show_usage exit 0 ;; diff --git a/sf-web-open b/sf-web-open index f039729..b6d2bbc 100755 --- a/sf-web-open +++ b/sf-web-open @@ -9,10 +9,10 @@ USAGE: sf-web-open [-to ] [-pt ] [-ur] OPTIONS: - -to, --target-org Org alias or username to pass as --target-org - -pt, --path Relative path to open inside the org (e.g., "/lightning/setup/SetupOneHome/home") - -ur, --url-only URL-only: print the URL instead of opening a browser (passes --url-only) - -hp, --help Show this help + -to Org alias or username to pass as --target-org + -pt Relative path to open inside the org (e.g., "/lightning/setup/SetupOneHome/home") + -ur URL-only: print the URL instead of opening a browser (passes --url-only) + -hp Show this help EXAMPLES: 1) Open a specific org (default home): @@ -42,19 +42,19 @@ fi # Parse command line arguments using manual parsing for two-character options while [[ $# -gt 0 ]]; do case $1 in - -to|--target-org) + -to) ORG="$2" shift 2 ;; - -pt|--path) + -pt) PATH_ARG="$2" shift 2 ;; - -ur|--url-only) + -ur) URL_ONLY=1 shift ;; - -hp|--help) + -hp) show_help exit 0 ;;