# Command Reference

Complete command tree for the AceCloud CLI v1.4.2-beta.

> **v1.4.2-beta changes** (block-by-block trust-rebuild sweep):
>
> *Setup & auth*
>
> * `ace config list` / `ace config ls` added as aliases for `ace config show`.
> * `ace config get/set` now accept `project_id` and `api_base_url` as aliases for `project` and `api_url`.
> * `ace auth me -o json|yaml` slimmed to 4 fields (name, email, country, currency) — no longer dumps the full account payload.
>
> *Networking*
>
> * **`ace vpc update`** — new command to rename / re-describe a VPC.
> * **`ace floating-ip get`** — new command, looks up a single floating IP by ID or by IP address.
> * `ace floating-ip associate` / `disassociate` now do pre-flight checks and surface clearer errors.
> * `ace security-group rule-add` treats backend "already exists" as a friendly notice instead of an error.
>
> *Compute*
>
> * `ace key-pair create --public-key` body field now `key` (was `public_key`). Imported public keys must be ≥100 characters.
> * `ace instance logs`, batch shutoff, and FIP-attach paths now show actionable error messages instead of raw backend strings.
>
> *Storage*
>
> * **`ace snapshot get`** and **`ace snapshot delete`** — new commands (single + bulk).
> * `ace volume update --description` now pre-fetches the current name (no need to pass `--name` redundantly).
> * `ace volume extend` runs a state pre-check first.
>
> *Load Balancer*
>
> * LB listener/pool `create` now polls back by name after the async 202 response, so the created ID is surfaced in the output reliably.
>
> *Kubernetes*
>
> * **`ace k8s cluster nodepool scale --count`** is now the **target node count** (kubectl-style). Legacy add/remove-delta semantics remain available via `--delta`.
> * `ace k8s cluster nodepool create` auto-fetches `secGroupId` from the cluster; `volume-size` is now `int`.
> * `ace k8s cluster nodes` table view drops empty columns (ID/IP/AGE) for a cleaner read; full payload remains in `-o json`.
> * `ace k8s cluster kubeconfig -o json` now wraps the YAML in `{"kubeconfig": "<yaml>"}` for automation; `table` / `yaml` emit raw YAML for direct redirection.
>
> *CaaS / general*
>
> * Deployment lifecycle verified end-to-end against the latest backend (the `xForwardedFor` regression fixed in npc-api is now confirmed working from CLI).
> * 401 from the API surfaces as a clean "authentication failed — run `ace auth login`" with exit 1; "Invalid Route" translated to a region-availability hint.
>
> **v1.4.0 changes:**
>
> * New `ace api-key` command group — long-lived programmatic credentials (recommended for automation/CI).
> * New `ace auth login-api-key` — log in with an API key instead of JWT (no 24h refresh dance).
> * New `ace configure` — `aws configure`-style interactive setup with masked defaults; also `configure set/get/list` for scripted use.
> * Managed-resource hide filter now applies uniformly to JSON, YAML, and table output (was table-only in v1.3.0).
> * Pre-flight on `delete` commands: refuses to touch `api-gateway` / `ace-deployment` tagged resources client-side with a clear error.
> * Bug fixes: `security-group update --description` (alone), `load-balancer listener/pool create` async response, `get-all -o json` no longer leaks managed resources.
>
> **v1.3.0 changes:**
>
> * All `delete` commands now prompt for confirmation interactively, and require `--yes` when stdin is not a TTY (CI/scripts).
> * `ace instance snapshot` now pre-checks instance state and requires the instance to be SHUTOFF (use `--force` to bypass).
> * `-o yaml` now produces real YAML on every command.
> * Unknown subcommands exit with status 1 instead of 0.

## Full Command Tree

```
ace
├── auth
│   ├── login              Login with email/password
│   ├── login-token        Login with developer token (JWT)
│   ├── login-api-key      Login with an API key (recommended for automation)
│   ├── logout             Logout (clears all credentials)
│   ├── me                 Current user info
│   ├── projects           List projects
│   └── status             Account status
│
├── api-key (aliases: apikey, ak)
│   ├── create             Create a new API key (secret shown only once)
│   ├── list               List your API keys
│   ├── get                Get details for a single key
│   ├── update             Update name/description/enabled
│   ├── enable             Enable an API key
│   ├── disable            Disable an API key (without deleting)
│   ├── revive             Regenerate the secret (old secret stops working)
│   └── delete             Delete one or more keys
│
├── configure
│   ├── (interactive)      Walk through region/project/auth setup
│   ├── set                Set a single config value (script style)
│   ├── get                Print a single config value
│   └── list               Show all config (secrets masked)
│
├── config
│   ├── set                Set config value (region, project_id, api_base_url, …)
│   ├── get                Get config value
│   ├── show               Show all config (aliases: list, ls)
│   └── use-project        Switch project (interactive)
│
├── instance (aliases: i, vm)
│   ├── list               List all instances
│   ├── get                Get full instance details
│   ├── create             Create a new instance
│   ├── update             Update instance name/description
│   ├── delete             Delete instance(s)
│   ├── summary            Show instance count
│   ├── start              Start an instance
│   ├── stop               Stop an instance
│   ├── reboot             Reboot (--hard for hard reboot)
│   ├── suspend            Suspend an instance
│   ├── unsuspend          Resume suspended instance
│   ├── lock               Lock an instance
│   ├── unlock             Unlock an instance
│   ├── recovery           Toggle recovery mode (--on/--off)
│   ├── batch-shutoff      Shutoff/start multiple instances
│   ├── resize             Resize to new flavor
│   ├── resize-confirm     Confirm pending resize
│   ├── resize-revert      Revert pending resize
│   ├── rebuild            Rebuild with new image
│   ├── snapshot           Create snapshot
│   ├── save-image         Save as image
│   ├── console            Get console URL
│   ├── logs               View instance logs
│   ├── action-logs        View action history
│   ├── interfaces         List network interfaces
│   ├── security-groups    List security groups
│   ├── volumes            List attached volumes
│   ├── attach-volume      Attach a volume
│   ├── detach-volume      Detach a volume
│   ├── attach-interface   Attach network interface
│   └── detach-interface   Detach network interface
│
├── volume (alias: vol)
│   ├── list               List volumes (--status filter)
│   ├── get                Get volume details
│   ├── create             Create volume (--name, --size, --type)
│   ├── update             Update volume name
│   ├── delete             Delete volume(s)
│   ├── extend             Extend volume size
│   └── types              List volume types with pricing
│
├── snapshot (alias: snap)
│   ├── list               List snapshots
│   ├── get                Get snapshot details (alias: show)
│   └── delete             Delete snapshot(s) (alias: rm)
│
├── vpc (alias: network)
│   ├── list               List VPCs
│   ├── get                Get VPC details
│   ├── create             Create VPC with subnet
│   ├── update             Rename / re-describe a VPC
│   ├── delete             Delete VPC(s)
│   ├── subnet-create      Create subnet in VPC
│   ├── subnet-delete      Delete subnet(s)
│   └── router
│       ├── list           List routers
│       ├── get            Get router details
│       ├── create         Create router
│       ├── delete         Delete router(s)
│       ├── set-gateway    Attach external gateway
│       ├── remove-gateway Detach external gateway
│       ├── add-interface  Attach subnet to router
│       ├── remove-interface Detach subnet/interface
│       └── interfaces     List router interfaces
│
├── security-group (alias: sg)
│   ├── list               List security groups
│   ├── get                Get SG details + rules
│   ├── create             Create security group
│   ├── update             Update SG name/description
│   ├── delete             Delete SG(s)
│   ├── rule-add           Add firewall rule
│   └── rule-delete        Delete rule(s)
│
├── floating-ip (alias: fip)
│   ├── list               List floating IPs
│   ├── get                Get floating IP details (by id or by ip address)
│   ├── create             Allocate floating IP
│   ├── associate          Assign to instance (with pre-flight checks)
│   ├── disassociate       Remove from instance (with pre-flight checks)
│   └── delete             Release floating IP(s)
│
├── load-balancer (alias: lb)
│   ├── list               List load balancers
│   ├── get                Get LB details
│   ├── create             Create LB (--type ALB/NLB)
│   ├── update             Update LB
│   ├── delete             Delete LB (--cascade)
│   ├── listener
│   │   ├── list           List listeners (--lb filter)
│   │   ├── get            Get listener details
│   │   ├── create         Create listener
│   │   └── delete         Delete listener(s)
│   └── pool
│       ├── list           List pools
│       ├── get            Get pool details
│       ├── create         Create pool
│       └── delete         Delete pool(s)
│
├── k8s (alias: kubernetes)
│   └── cluster (alias: cl)
│       ├── list           List clusters
│       ├── get            Get cluster details (alias: show)
│       ├── create         Create cluster (17 flags)
│       ├── delete         Delete cluster
│       ├── versions       List K8s versions
│       ├── kubeconfig     Get kubeconfig
│       ├── nodes          List nodes (--pool filter)
│       └── nodepool (alias: np)
│           ├── list       List node pools
│           ├── get        Get pool details (alias: show)
│           ├── create     Create node pool
│           ├── scale      Scale pool — `--count` is target count (kubectl-style); `--delta` for legacy add/remove mode
│           └── delete     Delete node pool
│
├── deployment (aliases: deploy, caas)
│   ├── list               List deployments
│   ├── get                Get deployment details
│   ├── create             Create deployment (shared/dedicated)
│   ├── update             Update deployment
│   ├── delete             Delete deployment(s)
│   ├── restart            Restart deployment
│   └── replicas           Show replicas/pods
│
├── registry (aliases: reg, craas)
│   ├── status             Registry info
│   ├── create             Create registry
│   ├── delete             Delete registry
│   ├── credentials        Docker login credentials
│   ├── push-commands      Show push instructions
│   ├── repo
│   │   ├── list           List repositories
│   │   └── delete         Delete repository
│   └── artifact (alias: artifacts)
│       ├── list             List artifacts
│       ├── tags             List tags for an artifact
│       ├── add-tag          Add a tag to an artifact
│       ├── remove-tag       Remove a tag from an artifact
│       ├── scan             Start or stop a vulnerability scan
│       ├── vulnerabilities  Show vulnerability details for an artifact
│       └── delete           Delete an artifact
│
├── flavor (aliases: size, machine-type)
│   ├── list               List flavors (--cpu, --gpu filters)
│   └── get                Get flavor details
│
├── image
│   ├── list               List images (--os filter)
│   ├── get                Get image details
│   ├── delete             Delete image(s)
│   └── categories         List image categories
│
├── key-pair (aliases: kp, keypair)
│   ├── list               List key pairs
│   ├── get                Get key pair details
│   ├── create             Create/import key pair
│   └── delete             Delete key pair(s)
│
├── pricing (alias: price)  View resource pricing (--currency)
├── quota
│   ├── all                All quotas
│   ├── compute            Compute quotas
│   ├── storage            Storage quotas
│   └── network            Network quotas
│
├── get-all (aliases: all, status)  Resource dashboard
├── update                  Self-update CLI
├── init                    Interactive setup wizard
└── completion             Shell completion setup
```

## Aliases Quick Reference

| Full Command               | Short Alias              |
| -------------------------- | ------------------------ |
| `ace instance`             | `ace i`, `ace vm`        |
| `ace volume`               | `ace vol`                |
| `ace security-group`       | `ace sg`                 |
| `ace floating-ip`          | `ace fip`                |
| `ace load-balancer`        | `ace lb`                 |
| `ace k8s cluster`          | `ace k8s cl`             |
| `ace k8s cluster nodepool` | `ace k8s cluster np`     |
| `ace deployment`           | `ace deploy`, `ace caas` |
| `ace registry`             | `ace reg`, `ace craas`   |
| `ace key-pair`             | `ace kp`, `ace keypair`  |
| `ace get-all`              | `ace all`, `ace status`  |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acecloud.ai/knowledge-base/cli/command-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
