Skip to content

Commit 1b8e0ff

Browse files
authored
variable: promote variables out of sandbox into a top-level command (#85)
Variables are an account-wide store, not a property of a sandbox, and `sandbox` held nothing else, so the extra level was pure typing. Matches the dashboard, where variables is now its own page rather than a tab under Sandboxes. No redirect from the old path: variables are pre-customer.
1 parent 12de533 commit 1b8e0ff

6 files changed

Lines changed: 12 additions & 16 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ agent asset list # list stored assets (--session <id> scopes to
8989
agent asset get <asset-id> -o shot.png # show one asset, or download its bytes with -o
9090
agent asset delete <asset-id> # delete an asset (it disappears from list/get and its link stops resolving)
9191

92-
agent sandbox variable list # list sandbox env variable names (values are write-only)
93-
agent sandbox variable set A=1 B=2 # create/update variables (or --from-file .env/.json)
94-
agent sandbox variable delete K # delete a variable
92+
agent variable list # list sandbox env variable names (values are write-only)
93+
agent variable set A=1 B=2 # create/update variables (or --from-file .env/.json)
94+
agent variable delete K # delete a variable
9595

9696
agent budget # current budget summary
9797
agent usage # usage dashboard for the period

skills/ellipsis/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ sandbox image actually builds, then deploy. The steps below are that flow.
7878
write-only store; a config receives only the variables it names.
7979

8080
```sh
81-
agent sandbox variable set LINEAR_API_KEY=lin_api_...
82-
agent sandbox variable set --from-file .env
81+
agent variable set LINEAR_API_KEY=lin_api_...
82+
agent variable set --from-file .env
8383
```
8484

8585
5. Draft a config and run it from the local file before anything deploys.
@@ -208,7 +208,7 @@ agent config default set <config-id> # the config a bare start runs (--r
208208
agent template list # browse maintained templates
209209
agent model list # the model ids valid under `claude:`
210210
agent integration # connected GitHub/Slack/Linear/Sentry
211-
agent sandbox variable set LINEAR_API_KEY=...
211+
agent variable set LINEAR_API_KEY=...
212212
agent session start --config-file agents/my_agent.yaml --watch
213213
# prove a config before deploying
214214
```

src/cli.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { registerMe } from './commands/me'
55
import { registerSession } from './commands/session'
66
import { registerReview } from './commands/review'
77
import { registerConfig } from './commands/config'
8-
import { registerSandbox } from './commands/sandbox'
8+
import { registerVariable } from './commands/variable'
99
import { registerAsset } from './commands/asset'
1010
import { registerHook } from './commands/hooks'
1111
import { registerTemplate } from './commands/template'
@@ -39,7 +39,7 @@ registerMe(program)
3939
registerSession(program)
4040
registerReview(program)
4141
registerConfig(program)
42-
registerSandbox(program)
42+
registerVariable(program)
4343
registerAsset(program)
4444
registerHook(program)
4545
registerTemplate(program)
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@ import { alsoKnownAs, apiRoutes } from '../lib/help'
55
import { formatTs, printJson, printTable, runAction } from '../lib/output'
66
import type { SandboxVariableInput, SandboxVariableSummary } from '../lib/types'
77

8-
export function registerSandbox(program: Command): void {
9-
const sandbox = program
10-
.command('sandbox')
11-
.description('Manage what every sandbox this account runs gets')
12-
8+
export function registerVariable(program: Command): void {
139
const variable = alsoKnownAs(
14-
sandbox
10+
program
1511
.command('variable')
1612
.description('Manage the env variables injected into every sandbox (values are write-only)'),
1713
'variables',

src/lib/help.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function withoutAliases(term: string, cmd: Command): string {
2020
const TOP_LEVEL_GROUPS: ReadonlyArray<{ title: string; commands: readonly string[] }> = [
2121
{ title: 'Sessions', commands: ['session', 'review'] },
2222
{ title: 'Agents', commands: ['config', 'model', 'template'] },
23-
{ title: 'Platform', commands: ['sandbox', 'asset', 'hook'] },
23+
{ title: 'Platform', commands: ['variable', 'asset', 'hook'] },
2424
{ title: 'Integrations', commands: ['integration', 'github', 'slack', 'linear', 'sentry'] },
2525
{ title: 'Spend', commands: ['budget', 'usage', 'analytics'] },
2626
{ title: 'Account', commands: ['login', 'logout', 'me', 'host', 'ping'] },
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
parseAssignment,
55
parseEnvFile,
66
parseJsonVars,
7-
} from '../src/commands/sandbox'
7+
} from '../src/commands/variable'
88

99
describe('parseJsonVars', () => {
1010
it('parses a flat object of name → value', () => {

0 commit comments

Comments
 (0)