Skip to content
Open
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
12 changes: 12 additions & 0 deletions docs/site/content/docs/cli/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,18 @@ orca account add --agent codex

`account add` runs `claude login` / `codex login` in **this** terminal on the host, then registers the captured credentials with the local runtime. Codex uses device authorization so the browser can finish on another machine. Run these on the machine that owns the accounts — not through a client-only remote session.

Switch which saved account new agents launch with, for any provider with saved accounts (Claude, Codex, OpenCode, Devin, Antigravity):

```bash
orca account list # ids, emails/labels, and the active one
orca account select --agent claude --account you@example.com # id, email or label
orca worktree create --name task --agent claude --prompt "..."
orca account select --agent claude --account system # back to your own sign-in
orca account rm --agent codex --account old@example.com # forget a saved account
```

A selection applies to every agent of that provider launched on the host after it — the same switch as the status-bar account menu — not to a single workspace. An email shared by several accounts (one sign-in in two organizations) is refused; pass the id instead. Antigravity has no `system` default, and `account rm` never removes system credentials.

## Artifacts

Publish HTML or Markdown through the signed-in Orca account. Viewing a public link does not require sign-in; create/list/update/delete do. **Publishing is off by default** — a human must enable **Settings → Artifacts → Allow publishing public artifact links** on the device. There is no CLI flag that grants the gate. `list`, `unshare`, and `delete` stay available so you can audit or revoke links after turning publishing off.
Expand Down
25 changes: 22 additions & 3 deletions src/cli/handlers/account-list-format.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { AntigravityAccountState } from '../../shared/antigravity-account-types'
import type { ManagedDataAccountsState } from '../../shared/managed-account-types'

// Why: Claude and Codex managed-account summaries both carry id+email+active id,
Expand Down Expand Up @@ -26,19 +27,37 @@ export function formatDataAccounts(label: string, state: ManagedDataAccountsStat

/** Renders a provider's managed-account list as a human-readable block, marking the active account. */
export function formatAccountsBlock(label: string, block: AccountsBlock): string {
const hostAccountId = block.activeAccountIdsByRuntime?.host ?? block.activeAccountId
const system = ` system System default${hostAccountId === null ? ' (active)' : ''}`
if (block.accounts.length === 0) {
return `No managed ${label} accounts.`
return `No managed ${label} accounts.\n${system}`
}
const activeAccountIds = new Set([
block.activeAccountId,
block.activeAccountIdsByRuntime?.host,
...Object.values(block.activeAccountIdsByRuntime?.wsl ?? {})
])
// Why the id: `orca account select --account` needs it when one email signs into several orgs.
const lines = block.accounts.map(
(account) =>
` ${account.email}${activeAccountIds.has(account.id) ? ' (active)' : ''}${
` ${account.id} ${account.email}${activeAccountIds.has(account.id) ? ' (active)' : ''}${
account.needsSignIn ? ' (sign in again in Orca Settings > AI Provider Accounts)' : ''
}`
)
return `Managed ${label} accounts (${block.accounts.length}):\n${lines.join('\n')}`
return `Managed ${label} accounts (${block.accounts.length}):\n${system}\n${lines.join('\n')}`
}

/** Antigravity has no system default: one saved account always owns the native login. */
export function formatAntigravityAccounts(state: AntigravityAccountState): string {
if (state.accounts.length === 0) {
return 'No managed Antigravity accounts.'
}
return `Managed Antigravity accounts (${state.accounts.length}):\n${state.accounts
.map(
(account) =>
` ${account.id} ${account.email ?? account.subject ?? account.id}${
account.id === state.activeAccountId ? ' (active)' : ''
}`
)
.join('\n')}`
}
Loading