Deprecated CLI v1 Commands ποΈ Archived
Reference for old CLI commands that have been replaced
This document lists CLI v1 commands and their v2 equivalents.
Installation Changes
v1 (Deprecated)
npm install -g example-cliv2 (Current)
npm install -g @example/cliCommand Comparison
Authentication
v1:
example auth login --token YOUR_TOKENv2:
example-cli login
# Interactive prompt for credentialsResource Management
v1:
example resource list
example resource get <id>
example resource create --name "Name" --type standard
example resource delete <id>v2:
example-cli resources list
example-cli resources get <id>
example-cli resources create --name "Name" --type standard
example-cli resources delete <id>Configuration
v1:
example config set api_url https://api.example.com
example config get api_urlv2:
example-cli config set api-url https://api.example.com
example-cli config get api-urlDeployment
v1:
example deploy --project myproject --env productionv2:
example-cli deploy myproject --environment productionRemoved Commands
These commands were removed in v2:
example status
Reason: Redundant with dashboard
Alternative: Check status at status.example.com
example backup
Reason: Now automated
Alternative: Automatic backups run daily, restore via dashboard
example logs tail
Reason: Better alternatives available
Alternative: Use dashboard logs viewer or API
Flag Changes
Many command flags were renamed for consistency:
| v1 Flag | v2 Flag |
|---|---|
--proj | --project |
--env | --environment |
--org | --organization |
-f | --force |
-q | --quiet |
-v | --verbose |
Output Format Changes
v1 Output
$ example resource list
ID Name Type
123 My Resource 1
456 Another 2v2 Output
$ example-cli resources list
βββββββββββββββ¬ββββββββββββββββββ¬βββββββββββ¬βββββββββββββ
β ID β Name β Type β Status β
βββββββββββββββΌββββββββββββββββββΌβββββββββββΌβββββββββββββ€
β res_abc123 β My Resource β standard β active β
β res_def456 β Another β premium β active β
βββββββββββββββ΄ββββββββββββββββββ΄βββββββββββ΄βββββββββββββJSON Output
v2 added consistent JSON output:
example-cli resources list --json{
"data": [
{
"id": "res_abc123",
"name": "My Resource",
"type": "standard",
"status": "active"
}
]
}Migration Script
Automated migration of common workflows:
#!/bin/bash
# migrate-cli-v1-to-v2.sh
# Uninstall v1
npm uninstall -g example-cli
# Install v2
npm install -g @example/cli
# Re-authenticate
example-cli login
# Verify installation
example-cli --versionConfiguration Migration
v1 config file location:
~/.example/config.jsonv2 config file location:
~/.config/example-cli/config.jsonMigrate your config:
# Backup old config
cp ~/.example/config.json ~/example-v1-config-backup.json
# v2 will prompt to import settings on first run
example-cli config import ~/.example/config.jsonGetting Help
v1 Help
example --help
example <command> --helpv2 Help
example-cli --help
example-cli <command> --help
example-cli <command> <subcommand> --helpCommon Migration Issues
Issue: Command not found after upgrade
Solution:
# Clear npm cache
npm cache clean --force
# Reinstall
npm install -g @example/cli
# Verify PATH
which example-cliIssue: Authentication fails
Solution:
# Remove old credentials
example-cli logout
# Login again
example-cli loginIssue: Old aliases don’t work
Solution: Update your shell aliases
# ~/.bashrc or ~/.zshrc
alias ex="example-cli"
alias exr="example-cli resources"Complete Command Reference
See the CLI v2 Documentation for complete command reference.