Deprecated CLI v1 Commands
April 1, 2024 32174b4 Edit this page

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-cli

v2 (Current)

npm install -g @example/cli

Command Comparison

Authentication

v1:

example auth login --token YOUR_TOKEN

v2:

example-cli login
# Interactive prompt for credentials

Resource 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_url

v2:

example-cli config set api-url https://api.example.com
example-cli config get api-url

Deployment

v1:

example deploy --project myproject --env production

v2:

example-cli deploy myproject --environment production

Removed 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 Flagv2 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         2

v2 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 --version

Configuration Migration

v1 config file location:

~/.example/config.json

v2 config file location:

~/.config/example-cli/config.json

Migrate 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.json

Getting Help

v1 Help

example --help
example <command> --help

v2 Help

example-cli --help
example-cli <command> --help
example-cli <command> <subcommand> --help

Common 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-cli

Issue: Authentication fails

Solution:

# Remove old credentials
example-cli logout

# Login again
example-cli login

Issue: 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.

Support