Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ agent config default # the effective default agent for the repo you
agent config default set <config-id> # set the account default agent (--repo [owner/name] for one repo)
agent config default clear # clear the account default (--repo [owner/name] for one repo)

agent model list # list selectable agent models (the account default is marked)

agent integrations # every connected integration in one table
agent github repos # repositories connected to the GitHub installation
agent github members # org roster (the logins/ids --author accepts), with linked Slack identities
Expand Down
1 change: 1 addition & 0 deletions skills/ellipsis/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ agent config init # scaffold agents/my_agent.yaml
agent config create --template code-reviewer --repo api # deploy via PR
agent config default set <configId> # the agent a bare start runs (--repo for one repo)
agent template list # browse maintained templates
agent model list # the model ids valid under `claude:`
agent integrations # connected GitHub/Slack/Linear/Sentry
agent sandbox variable set LINEAR_API_KEY=...
agent sandbox build start --config-file agents/my_agent.yaml --watch
Expand Down
2 changes: 2 additions & 0 deletions src/cli.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { registerSandbox } from './commands/sandbox'
import { registerAsset } from './commands/asset'
import { registerHooks } from './commands/hooks'
import { registerTemplate } from './commands/template'
import { registerModel } from './commands/model'
import { registerIntegrations } from './commands/integrations'
import { registerGithub } from './commands/github'
import { registerSlack } from './commands/slack'
Expand Down Expand Up @@ -38,6 +39,7 @@ registerSandbox(program)
registerAsset(program)
registerHooks(program)
registerTemplate(program)
registerModel(program)
registerIntegrations(program)
registerGithub(program)
registerSlack(program)
Expand Down
36 changes: 36 additions & 0 deletions src/commands/model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { type Command } from 'commander'
import { ApiClient } from '../lib/api'
import { printJson, printTable, runAction } from '../lib/output'

export function registerModel(program: Command): void {
const model = program
.command('model')
// Resource sub-groups register their plural as an alias so the two
// spellings can never diverge into different surfaces.
.alias('models')
.description('Browse the models your agent can run on')

model
.command('list')
.alias('ls')
.description('List selectable agent models (GET /v1/models)')
.option('--json', 'output raw JSON')
.action(async (opts: { json?: boolean }) => {
await runAction(async () => {
const models = await new ApiClient().listSupportedModels()
if (opts.json) {
printJson(models)
return
}
if (models.length === 0) {
console.log('No models found.')
return
}
printTable(
['ID', 'NAME', 'DEFAULT'],
models.map((m) => [m.id, m.display_name, m.is_default_agent_model ? 'yes' : '']),
)
console.log('\nSelect one by setting `model:` under `claude:` in your agent config YAML.')
})
})
}