{"_id":"@acaexpress/containerapps-cli","name":"@acaexpress/containerapps-cli","dist-tags":{"beta":"1.0.0-beta.1","latest":"1.0.0-beta.1"},"versions":{"1.0.0-beta.1":{"name":"@acaexpress/containerapps-cli","version":"1.0.0-beta.1","description":"CLI for Azure Container Apps Sandbox environments — built on @azure/containerapps-sandbox SDK.","type":"module","bin":{"aca":"dist/esm/cli.js"},"engines":{"node":">=22.0.0"},"keywords":["azure","cloud","sandbox","containerapps","cli"],"author":{"name":"Microsoft Corporation"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/microsoft/azure-container-apps.git","directory":"sdks/typescript/azure-containerapps-cli"},"homepage":"https://github.com/microsoft/azure-container-apps/blob/main/sdks/typescript/azure-containerapps-cli/README.md","bugs":{"url":"https://github.com/microsoft/azure-container-apps/issues"},"dependencies":{"@azure/containerapps-sandbox":"file:C:/Users/anganti/coreai_microsoft/adc-devex/dist/azure-containerapps-sandbox-1.0.0-beta.1.tgz","@azure/identity":"^4.0.0","chalk":"^4.1.2","commander":"^14.0.0","conf":"^13.1.0","ora":"^5.4.1","yaml":"^2.8.3"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.9.0","vitest":"^3.2.1"},"scripts":{"build":"tsc","start":"node dist/esm/cli.js","dev":"npx tsx src/cli.ts","test":"echo \"no unit tests\"","test:all":"npm run test:smoke && npm run test:acceptance && npm run test:scenarios","test:smoke":"vitest run --config vitest.e2e.config.ts ../../../tests/typescript/cli/smoke/","test:acceptance":"vitest run --config vitest.e2e.config.ts ../../../tests/typescript/cli/acceptance/","test:scenarios":"vitest run --config vitest.e2e.config.ts ../../../tests/typescript/cli/scenarios/"},"tshy":{"project":"./tsconfig.json","exports":{"./package.json":"./package.json",".":"./src/index.ts"},"dialects":["esm"],"selfLink":false},"gitHead":"7b9d7f2392d3949fc3b0b6a890d9a53cd131ccd1","_id":"@acaexpress/containerapps-cli@1.0.0-beta.1","bundleDependencies":["@azure/containerapps-sandbox"],"_nodeVersion":"25.2.1","_npmVersion":"11.7.0","dist":{"integrity":"sha512-qMzenWrHqQtYXfJA1folWZr4AD+aRiooMQ0LaJ1xleFnegwqkBBJH6pFy60TeXr+YOlFirm0AVlVQAnRXEwmfg==","shasum":"ed3c6590f43549c90d53ae3745f8793ad60f0713","tarball":"https://registry.npmjs.org/@acaexpress/containerapps-cli/-/containerapps-cli-1.0.0-beta.1.tgz","fileCount":2498,"unpackedSize":6332344,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIE/r1FkhB93aedg6pL7ac4whrZT/a6gIuxATk3On7V+yAiB8JddkQDb0R/1GfCYyFnMlPJP5iLHxGb1RB5vYpDzywQ=="}]},"_npmUser":{"name":"annajig","email":"annaji.ganti@gmail.com"},"directories":{},"maintainers":[{"name":"annajig","email":"annaji.ganti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/containerapps-cli_1.0.0-beta.1_1777762561695_0.5722793626316176"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-02T22:56:01.519Z","1.0.0-beta.1":"2026-05-02T22:56:01.984Z","modified":"2026-05-02T22:56:02.275Z"},"maintainers":[{"name":"annajig","email":"annaji.ganti@gmail.com"}],"description":"CLI for Azure Container Apps Sandbox environments — built on @azure/containerapps-sandbox SDK.","homepage":"https://github.com/microsoft/azure-container-apps/blob/main/sdks/typescript/azure-containerapps-cli/README.md","keywords":["azure","cloud","sandbox","containerapps","cli"],"repository":{"type":"git","url":"git+https://github.com/microsoft/azure-container-apps.git","directory":"sdks/typescript/azure-containerapps-cli"},"author":{"name":"Microsoft Corporation"},"bugs":{"url":"https://github.com/microsoft/azure-container-apps/issues"},"license":"MIT","readme":"# @azure/containerapps-cli\r\n\r\nCLI for Azure Container Apps environments.\r\n\r\n> Status: beta (`1.0.0-beta.1`)\r\n> Binary: `aca`\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install -g @azure/containerapps-cli\r\n\r\n```\r\n\r\n## Prerequisites\r\n\r\n1. Install Azure CLI: https://learn.microsoft.com/cli/azure/install-azure-cli\r\n2. Run `az login`\r\n3. Set defaults as needed:\r\n\r\n```bash\r\nset AZURE_SUBSCRIPTION_ID=<subscription-id>\r\nset ACA_RESOURCE_GROUP=<resource-group>\r\nset ACA_SANDBOX_GROUP=<sandbox-group>\r\n```\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# Show auth state\r\naca auth status\r\n\r\n# Create a sandbox group\r\naca sandboxgroup create --name my-group --location westus2 -g my-rg\r\n\r\n# Create a sandbox\r\naca sandbox create --group my-group --disk ubuntu --wait\r\n\r\n# List sandboxes\r\naca sandbox list --group my-group\r\n\r\n# Run a command\r\naca sandbox exec --group my-group --id <sandbox-id> -c \"echo hello\"\r\n```\r\n\r\n## Global Options\r\n\r\n- `-s, --subscription <subscription>` Azure subscription ID\r\n- `-g, --resource-group <resourceGroup>` Default resource group\r\n- `--group <group>` Default sandbox group\r\n- `-o, --output <format>` Output format: `table`, `json`\r\n- `--verbose` Enable verbose logging\r\n- `--debug` Enable debug logging\r\n\r\n## Commands\r\n\r\n### Auth\r\n\r\n```text\r\naca auth status\r\n```\r\n\r\n### Sandbox Groups\r\n\r\n```text\r\naca sandboxgroup create --name <name> --location <loc> [-g <rg>]\r\naca sandboxgroup list [-g <rg>]\r\naca sandboxgroup get --name <name> [-g <rg>]\r\naca sandboxgroup delete --name <name> [-g <rg>] [--yes]\r\naca sandboxgroup update --name <name> [-g <rg>] --identity <type>\r\n```\r\n\r\n### Sandbox\r\n\r\n```text\r\naca sandbox create --group <group> [--disk <disk>] [--snapshot <snapshot>] [--preset <preset>] [--cpu <cpu>] [--memory <memory>] [--label key=value]... [--env KEY=VALUE]... [--port <port>]... [--auto-suspend <seconds>] [--vmm-type <type>] [--wait]\r\naca sandbox list --group <group>\r\naca sandbox get --group <group> --id <id>\r\naca sandbox delete --group <group> --id <id> [--yes]\r\naca sandbox stop --group <group> --id <id>\r\naca sandbox resume --group <group> --id <id>\r\naca sandbox exec --group <group> --id <id> -c \"<command>\"\r\naca sandbox exec --group <group> --id <id> -- <command...>\r\naca sandbox shell --group <group> --id <id> [--command /bin/bash] [--no-auto-resume]\r\naca sandbox commit --group <group> --id <id> [--name <image-name>]\r\naca sandbox stats --group <group> --id <id>\r\n```\r\n\r\n> **Auto-resume:** `exec`, `shell`, `commit`, and `stats` automatically resume suspended/stopped/idle sandboxes. Disable with `--no-auto-resume` (shell) or `aca config set --auto-resume false` (global).\r\n\r\n### Ports\r\n\r\n```text\r\naca sandbox port add --group <group> --id <id> --port <port> [--anonymous]\r\naca sandbox port remove --group <group> --id <id> --port <port>\r\naca sandbox port list --group <group> --id <id>\r\n```\r\n\r\n### Egress Policy\r\n\r\nControl outbound network access from sandboxes. Rules are evaluated in order — **first match wins**.\r\n\r\n#### Simple (host allow/deny)\r\n\r\n```bash\r\n# Block all, allow specific hosts\r\naca sandbox egress set --id <id> --default Deny --host-allow \"*.github.com\" --host-allow \"*.npmjs.org\"\r\n\r\n# Allow all (no restrictions)\r\naca sandbox egress set --id <id> --default Allow\r\n```\r\n\r\n#### Advanced (file-based: Transform + Rewrite)\r\n\r\nFor zero-trust patterns (API key injection, URL rewriting), use a policy file:\r\n\r\n```bash\r\n# Generate a starter template\r\naca sandbox egress init > policy.yaml\r\n\r\n# Edit to add transform/rewrite rules, then apply\r\naca sandbox egress apply --id <id> --file policy.yaml\r\n\r\n# View current policy\r\naca sandbox egress show --id <id>\r\n\r\n# Export as YAML (for version control)\r\naca sandbox egress export --id <id> > current-policy.yaml\r\n\r\n# Get JSON Schema (for editor autocomplete)\r\naca sandbox egress schema > egress-policy.schema.json\r\n```\r\n\r\n**Example policy.yaml — zero-trust API key injection:**\r\n\r\n```yaml\r\ndefaultAction: Deny\r\n\r\nhostRules:\r\n  - pattern: \"*.github.com\"\r\n    action: Allow\r\n\r\nrules:\r\n  # Inject API key — sandbox never sees the secret\r\n  - name: inject-openai-key\r\n    match:\r\n      host: \"api.openai.com\"\r\n      path: \"/v1/*\"\r\n      methods: [POST]\r\n    action:\r\n      type: Transform\r\n      headers:\r\n        - operation: Set\r\n          name: Authorization\r\n          value: \"Bearer sk-your-api-key\"\r\n\r\n  # Redirect internal hostname to real endpoint\r\n  - name: rewrite-internal\r\n    match:\r\n      host: \"my-api.internal\"\r\n    action:\r\n      type: Rewrite\r\n      host: \"real-api.azure.com\"\r\n      scheme: https\r\n```\r\n\r\n**Rule types:**\r\n- **Allow/Deny** — permit or block matching requests\r\n- **Transform** — modify headers on matching requests (inject auth, remove sensitive headers)\r\n- **Rewrite** — redirect to a different host/path/scheme\r\n\r\n```text\r\naca sandbox egress set --id <id> --default <Allow|Deny> [--host-allow <pattern>]...\r\naca sandbox egress apply --id <id> --file <policy.yaml>\r\naca sandbox egress show --id <id>\r\naca sandbox egress export --id <id>\r\naca sandbox egress decisions --id <id>\r\naca sandbox egress schema\r\naca sandbox egress init\r\n```\r\n\r\n### Lifecycle\r\n\r\n```text\r\naca sandbox lifecycle set --group <group> --id <id> --auto-suspend <seconds> [--mode Memory|Disk]\r\n```\r\n\r\n### Disk Images\r\n\r\n```text\r\naca sandbox disk create --group <group> --image <base> [--name <name>] [--entrypoint <cmd>]\r\naca sandbox disk list --group <group>\r\naca sandbox disk list-public\r\naca sandbox disk get --group <group> --id <id>\r\naca sandbox disk delete --group <group> --id <id>\r\n```\r\n\r\n### Snapshots\r\n\r\n```text\r\naca sandbox snapshot create --group <group> --sandbox-id <id> [--name <name>]\r\naca sandbox snapshot list --group <group>\r\naca sandbox snapshot get --group <group> --id <id>\r\naca sandbox snapshot delete --group <group> --id <id>\r\n```\r\n\r\n### Volumes\r\n\r\n```text\r\naca sandbox volume create --group <group> --name <name> [--type <type>] [--size <size>]\r\naca sandbox volume list --group <group>\r\naca sandbox volume get --group <group> --name <name>\r\naca sandbox volume delete --group <group> --name <name>\r\naca sandbox volume-mount --group <group> --id <id> --volume <name> --path <mount-path> [--readonly]\r\n```\r\n\r\n### Filesystem\r\n\r\n```text\r\naca sandbox fs ls --group <group> --id <id> [--path /]\r\naca sandbox fs cat --group <group> --id <id> --path <path>\r\naca sandbox fs write --group <group> --id <id> --path <path> --file <local-file>\r\naca sandbox fs rm --group <group> --id <id> --path <path> [--recursive]\r\naca sandbox fs mkdir --group <group> --id <id> --path <path>\r\naca sandbox fs stat --group <group> --id <id> --path <path>\r\n```\r\n\r\n### Secrets and Content\r\n\r\n```text\r\naca sandbox secret upsert --id <secret-id> --values key1=val1,key2=val2\r\naca sandbox secret list\r\naca sandbox secret delete --id <secret-id>\r\naca sandbox content list\r\n```\r\n\r\n### System\r\n\r\n```text\r\naca version\r\naca doctor\r\n```\r\n\r\n## Output\r\n\r\nDefault output is a simple table. Use `-o json` for JSON.\r\n\r\n## Exit Codes\r\n\r\n- `0` success\r\n- `1` general error\r\n- `2` auth error\r\n- `3` resource not found\r\n- `4` validation error\r\n","readmeFilename":"README.md","_rev":"1-2289e880f112bfbcc17349a0e6478fa6"}