Install
npm i -g @hanamorilabs/tab
tab login # once per machine
cd my-project
tab claude # first run here picks this folder's Agent
tab help # every command; tab help <command> for one in fullLeave the Agent out of any command and it acts on this folder's. Add --json to any read command for scripts and agents. tab <command> --help explains that command; after an agent's name (tab claude --help) everything belongs to the agent.
Get started
Once per machine, then once per project folder.
tab login
Approve this machine in the console, once.
tab loginAsks whether this machine uses the hosted proxy (proxy.flocktab.com) or a self-hosted one on this machine, then prints a short code and opens the console. Approve the code there and the machine receives its session. Nothing is typed into the terminal except that choice, and no Agent is chosen here.
Login is per machine. Which Agent a project runs as is per folder: see tab use.
On a hosted flock with a saved provider key, login also asks for the flock's unlock, checks that it opens the key, and keeps it in the machine's config (owner-only). The unlock is never stored on FlockTab.
| Example | What it does |
|---|---|
| tab login | approve this machine |
See also: tab use · tab logout · tab status
tab use
Pick or change the Agent this folder runs a harness as.
tab use
tab use claude|codex|grok|kimiAn Agent is one harness on one project. tab claude and tab codex in the same folder are two Agents (that is what the plan counts), each asked for once: the first run of a harness in a folder lists the flock's Agents of that harness (and untied ones it can tie), or makes a new one and asks its kind. The new Agent's default name is that of the folder's Agent under another harness (from .flocktab, or the one the console last saw in this folder or repo), in its project; otherwise the console links it to the project it is named like or, failing that, the one Jev judges it belongs to, and names it after the folder. One dim line says why. The slug adds the harness (dash-f4f-claude). The choice goes into .flocktab at the git root, one entry per harness, and a key for that Agent is minted and kept on this machine. A git worktree of the project (git worktree add, or Claude Code's .claude/worktrees) runs as the main checkout's Agent: .flocktab is not committed, so tab reads the main checkout's.
tab use codex changes the answer for one harness; bare tab use sets the folder's default, which every other command (tab python …) runs as. An older .flocktab with a single Agent applies to every harness until one is set apart.
An Agent that already holds a key on another machine can be used here too, but minting a key here replaces the one there. tab asks before doing it.
| Example | What it does |
|---|---|
| tab use | pick this folder's Agent again, from a list |
| tab use codex | pick the Agent tab codex runs as here |
| tab agent create api-test --api --cap 5 --harness claude && tab use | try an API-key Agent in this folder; tab use again to go back |
Run an agent on the tab
Prefix the agent you already use. Its calls are gated, recorded and, on an API-key Agent, charged to the cap.
tab claude | codex | grok | kimi | <cmd>
Run an agent on this folder's tab. Everything after the name goes to the agent untouched.
tab claude [args]
tab codex [args]
tab grok [args]
tab kimi [args]
tab <any command> [args]tab sets the environment that agent reads (its base URL and key, or for Codex a home folder of its own) and starts it. It does not wrap or parse the agent's traffic; the proxy does the gating.
Codex's tab home starts from your own ~/.codex/config.toml: approval policy, sandbox mode, model and effort, MCP servers, profiles and trusted folders all apply under tab codex. Only the tab's keys (where the calls go, the flocktab provider) are layered on top.
On an API-key Agent every call is held, settled and charged to the cap, and a call that would pass the cap is refused before the provider with 402 tab_closed. The key is the one the agent already has: a harness set up with its own vendor key (ANTHROPIC_API_KEY, OPENROUTER_API_KEY, ...) keeps it, and tab only moves where it is sent (the proxy's /t/<key>/<vendor>/v1 route, which forwards the key untouched). A vendor the agent has no key for uses the flock's key, if the flock has one.
On a Subscription Agent the agent keeps its own login (Claude Max, ChatGPT, SuperGrok, Kimi). On an API-key Agent, Grok Build runs through the tab on its own XAI_API_KEY when it has one, else the flock's xAI key (refused when a self-hosted proxy has none), in a Grok home of tab's own with no SuperGrok login in it (your Grok settings are not carried there). On an API-key Agent, Kimi Code runs on Moonshot's API through the tab (kimi-k2.7-code), from a Kimi home of tab's own with no Kimi login in it: on its own MOONSHOT_API_KEY when it has one, else the flock's. The tab key rides in the base URL, the same kill switch and policies apply before the vendor is reached, the call is recorded at list price under the account the vendor names, and nothing is charged to the cap.
OpenCode (tab opencode) is given an inline config that points its openai, anthropic and openrouter providers at the tab and switches every other provider off, since OpenCode would otherwise use any key it finds in the environment and go straight to the vendor. Your own OPENCODE_CONFIG_CONTENT is kept; only the providers are taken over. Pick a model as usual: -m openai/..., anthropic/... or openrouter/.... OpenCode runs metered: it has no plan login FlockTab can pass through.
Pi, Goose, Aider and Copilot CLI are set up the same way, each in the form it reads: Pi loads a FlockTab extension (pi -e) that moves its providers; Goose gets its hosts and runs its openai or anthropic provider; Aider gets its Anthropic and OpenRouter bases; Copilot CLI runs its own-key provider against the tab, never GitHub's models. A model named vendor/model (GOOSE_MODEL, COPILOT_MODEL) goes to OpenRouter. OpenCode, Pi, Goose and Copilot turn on any provider they find a key for, so keys for vendors the tab cannot route (KIMI_API_KEY, GEMINI_API_KEY, ...) are hidden from them. tab says at launch which of the agent's own keys it is using.
With no Anthropic key, Anthropic's API goes to OpenRouter's Messages endpoint instead: with the agent's own OPENROUTER_API_KEY if it has one, else (self-hosted) the flock's OpenRouter key on the box. Claude Code included.
OpenClaw gets a config of tab's own (OPENCLAW_CONFIG_PATH) that includes yours and replaces only its model providers with ones through the tab (flocktab/<openrouter model>, flocktab-openai/..., flocktab-anthropic/...); it needs Node 24.16 or later. Cline gets a --config folder of tab's own with an OpenAI-compatible provider on the tab, on your own Cline model when you have one. A key a harness keeps in its own files (Codex's API-key login in ~/.codex/auth.json, OpenCode's auth.json) counts as its own like one in the environment.
Gemini CLI (tab gemini) and Antigravity (tab agy) speak Google's own API: tab gives them GEMINI_API_KEY and GOOGLE_GEMINI_BASE_URL on the tab (their own Gemini key through the own-key lane), drops what would send them to Vertex or Code Assist around it, and gives Gemini CLI a home of its own whose settings choose the API-key sign-in (yours are copied, not touched). A GEMINI_API_KEY in the .env files Gemini CLI reads (the folder and its parents, ~/.gemini, ~) counts as its own. Antigravity needs modelProvider gemini in its own settings once.
Any other command works too: tab points both the OpenAI and the Anthropic variables at the proxy and runs it. An agent with no consumer plan on a Subscription Agent runs metered on the flock's key, and tab says so.
With logins in the pool for that vendor, a Subscription Agent runs as the login with most room. See tab pool.
--observe (Claude Code 2.1.278 or later and Codex 0.155.1 or later, on macOS and Linux, after tab login) adds hooks that report when a session or a subagent starts and stops, and when one agent sends another a message: identifiers and outcomes only, never the prompt, the message or any tool output. Observability's map draws the links between Agents from these reports, and its Agents reporting line counts the Agents that sent them in the last 24 hours. Codex asks once to trust the hooks; a hook the harness skips leaves links missing, not proof that nothing happened.
| Option | What it does |
|---|---|
| --observe | Claude Code and Codex: report sessions, subagents and messages between agents to Observability (metadata only) |
| --as <login> | run as one pool login and never move off it |
| --no-pool | ignore the pool and use the agent's usual login |
| --pool | require the pool; fail rather than fall back when it cannot be used |
| Example | What it does |
|---|---|
| tab claude | Claude Code on this folder's tab |
| tab codex resume <id> | arguments pass straight through; Codex sees the conversations in ~/.codex |
| tab claude --as work | pin the pool login named work |
| tab claude --observe | Claude Code, with its sessions and messages drawn on Observability's map |
| tab opencode run -m openrouter/anthropic/claude-sonnet-4.5 "fix the tests" | OpenCode on the tab, through the flock's OpenRouter key |
| tab python agent.py | any script, with OPENAI_* and ANTHROPIC_* pointed at the tab |
tab alias setup | remove | list
Make the plain command (codex) run through the tab (tab codex).
tab alias setup <name>...
tab alias remove <name>...
tab alias listWrites a small shim named like the agent into ~/.flocktab/bin. With that folder first on your PATH, typing codex runs tab codex. tab removes that folder from the PATH of the agent it starts, so the shim never calls itself.
tab alias setup prints the PATH line to add to your shell if it is not there yet.
| Example | What it does |
|---|---|
| tab alias setup claude codex | plain claude and codex now run on the tab |
| tab alias remove codex | undo one |
Agents, caps and policy
Everything the console's Agent page does, from the terminal. Leave the Agent out and the command acts on this folder's.
tab agent create | kind
Make an Agent, or change its kind or harness.
tab agent create <name> --subscription|--api [--harness claude|codex|grok|kimi] [--cap <dollars>]
tab agent kind <agent> api|subscription
tab agent harness <agent> claude|codex|grok|kimi|anyAn Agent is one harness on one project, with one tab. Two things are declared: its kind (api: the cap is the meter, paid by the agent's own vendor key or else the flock's; subscription: your own plan logins, nothing charged) and its harness (claude, codex, grok, kimi, or any for scripts). The proxies enforce the harness: a Claude Agent's key cannot pass a Codex login through (403 wrong_harness), so Claude and Codex on one folder are two Agents and count as two.
A subscription Agent's cap is never touched, so tab list shows none; its tab is the kill switch.
Changing the kind applies to the next launch. tab claude reads it fresh every time. It also applies at once to sessions already running: a subscription session is refused with 403 not_subscription on its next call once its Agent is api. To try an API-key Agent in a folder that has sessions running, make a new one and tab use it there instead, then tab use the original again.
| Option | What it does |
|---|---|
| --subscription | --api | the kind of the new Agent (api when neither is given) |
| --cap <dollars> | the new Agent's cap; 50 when left out |
| --harness claude|codex|grok|kimi | which harness this Agent is; any when left out |
| Example | What it does |
|---|---|
| tab agent create billing-api --api --cap 20 | a metered Agent with a $20 cap |
| tab agent create dash-f4f-codex --subscription --harness codex | a Codex Agent for the dash folder |
| tab agent harness dash-f4f codex | tie an untied Agent to Codex |
| tab agent create my-laptop --subscription | an Agent for your own plan logins |
| tab agent kind billing-api subscription | switch an existing Agent |
See also: tab use · tab cap · tab accounts
tab list
Every Agent: kind, state, spent of cap, window, project.
tab listOne row per Agent in the flock. The same list tab use chooses from.
| Option | What it does |
|---|---|
| --json | the rows as JSON |
| Example | What it does |
|---|---|
| tab list | every Agent in the flock |
| tab list --json | the same, for a script |
See also: tab status · tab live
tab close | open [agent]
The kill switch. Close stops the next call; open lets calls through again.
tab close [agent]
tab open [agent]Closing a tab takes effect on the next call: it is refused before the provider or vendor with 402 tab_closed. Calls already in flight finish. This works the same on API-key and Subscription Agents.
A tab that closed itself by reaching its cap reopens by itself when its window rolls over (unless its reopen rule says manual or never), or now with tab open.
| Example | What it does |
|---|---|
| tab close | stop this folder's Agent |
| tab open billing-api | let a named Agent run again |
See also: tab cap · tab policy
tab cap
Set the hard cap, its window, and what happens at the cap.
tab cap [agent] <dollars>
tab cap [agent] --on-cap close|pause --reopen window|manual|neverThe cap is a hard dollar limit on one Agent for one window. Before every call the proxy holds the call's worst case against it (its input, counted a quarter high, plus its whole output limit), so a call cannot start unless it fits. What is charged is the vendor's own count: if that comes in above the estimate (a long system prompt, tool schemas, images), the call is settled at it and the tab closes, and nothing runs after it.
A call whose worst case does not fit what is left (a harness that asks for 64,000 output tokens on a $1 tab) is fitted instead: its output limit is lowered to what the remaining budget pays for, and the provider is asked for that; the reply says so in x-flocktab-fitted-max-tokens, and the decision log reads fitted to N of M output tokens. Below 2,048 output tokens (8,192 for a call with a reasoning effort or a thinking budget, which spends output before it answers) the call is refused instead (this call could cost up to $X; $Y left on the tab), and the tab stays open. The tab closes when its spend reaches the cap.
The window is how often the spent amount starts again: hour, day, week or month, from the start of each in the flock's time zone (Settings); run and lifetime never reset. Changing the window starts the new one from now.
--on-cap close (the default) closes the tab at the cap, the same as tab close. --on-cap pause refuses calls over the cap but leaves the tab open: the next window, or a higher cap, carries on by itself.
--reopen says when a tab its cap closed opens again: window (at the next window), manual (tab open, the default) or never (only after you change this). A tab you closed yourself is never reopened for you.
| Option | What it does |
|---|---|
| --window run|hour|day|week|month|lifetime | when spent starts again |
| --on-cap close|pause | close the tab at the cap, or only refuse until the next window |
| --reopen window|manual|never | when a tab its cap closed opens again |
| Example | What it does |
|---|---|
| tab cap 25 --window week | $25 a week for this folder's Agent |
| tab cap nightly-bot 10 --window day --reopen window | $10 a day, back on its own each morning |
| tab cap --on-cap pause | stop at the cap without closing the tab |
See also: tab close · tab policy · tab spend
tab policy
Show or set the rules checked before every call.
tab policy [agent]
tab policy [agent] --velocity N|none --models a,b|none --allow tool,tool|none
tab policy [agent] --guard off|watch|ask|deny --loops off|watch|pause
tab policy --all --guard off|watch|ask|deny --guard-level ... --loops ...
tab policy --default-guard off|watch|ask|deny
tab policy [agent] --guard-level relaxed|balanced|strict --reach on|off --flag <pattern>|none --trust <pattern>|none --forget <pattern>Checked in this order, first refusal wins: tab state, cap, velocity (calls per minute, 429), model allowlist (403 model_blocked), irreversible tools (403 risk_blocked), per-tool caps (402 tool_cap).
A tool FlockTab does not know is treated as a write, not a read. Irreversible tools (payments, sending email, deletes, production deploys) are denied unless named in --allow, and even then only while at least $25.00 of the cap remains.
--guard turns on Agent Guard and --loops the loop watch for tab claude, tab codex, tab gemini, tab agy, tab opencode, tab goose, tab cline, tab grok, tab kimi and tab pi, from the next launch. Agent Guard judges each tool call before the harness runs it: known irreversible commands (a force-push, DROP TABLE, a production deploy, a payment) by rule, the rest by TypeSafe's judgment model. watch records, ask has you confirm in the terminal (Codex, OpenCode, Goose, Cline and Kimi Code have no way to ask from a hook, and nobody can answer a headless run such as -p: the agent is told to ask you), deny refuses. In Cline a refused call is not held open (Cline gives a plugin three seconds): it is refused at once and stays in the review queue, so you can allow it there or with tab guard allow and the agent retries. Goose on Windows is not covered yet: its commands run unchecked, and tab says so at launch. Read-only tools and agents messaging each other (SendMessage, the task tools) are never judged. A plainly read-only shell command (readers such as ls, cat, grep, find, sed -n …p, sort, tree, diff, git status or git log, piped into each other or after a cd into another folder, with nothing redirected and none of their writing options; git after a cd is judged, since another repo's config can run code) and a call already allowed earlier in the same session go ahead at once and are recorded afterwards. An agent rewriting Claude's or Codex's own permission settings always asks. If flocktab.com cannot answer in time, the rules decide alone. Your answers in Claude Code's own prompt teach it: a no flags that exact command on the Agent at once (at most 40 learned rules, kept apart from your own patterns and never replacing them); a yes trusts nothing until you confirm it on the console's Agent Guard page.
--guard-level sets how sensitive the guard is (balanced unless set). relaxed stops only what surely cannot be undone, by rule, has TypeSafe's model flag a call only when it is 80% sure, and never checks reach. balanced adds calls the model is 50% sure cannot be undone, and reach. strict also stops any git push, any delete, a web request that sends data, a database or cloud write, and an MCP tool that creates, changes or sends, and has the model flag from 30%.
With the guard on, reach (on unless --reach off) also stops calls outside the project by rule: ssh, scp or rsync to another machine, sudo, kubectl exec, a database client pointed at another host, reading private keys or credentials files, and Claude Code turning its own sandbox off (dangerouslyDisableSandbox). A plainly read-only command, such as reading a file in another folder, may leave the sandbox without asking; reading keys or credentials (however the path is written, in any case, globbed, after a cd into their folder, or by a recursive grep, rg or diff over any folder they sit under, such as ~/.config or your home folder) or anything under /etc, /var or /private other than listing it still asks. Codex does not tell hooks when it asks to leave its sandbox, so there the guard judges the command itself. When only the model thinks a call reaches past the folder (a grep or a cd elsewhere), it asks only if the call may also be hard to undo or carries some risk.
Tune it with your own patterns; case and repeated spaces do not matter. --flag adds one the guard always stops: it matches when the command, or the tool's name, starts with it, and * matches anything ("*prod*", "mcp__linear__delete*"). --trust adds one it always lets through, before every rule, and trusts exactly what it names: without * only that command; with *, anything it matches except text that chains or redirects (; && || | ` $( > <), so "npm test*" never trusts "npm test; rm -rf ~" ("ssh staging-bastion*"): keep those narrow. --forget removes a pattern; none clears a list. Up to 40 of each. The same settings are in the console, on Policies and on the Agent's page.
The loop watch looks at the last ten tool calls every three calls and records an agent that keeps repeating itself, or that has spent half an hour or more only waking up to re-run the same check; pause also closes its tab, the same as tab close, once it has been stuck that many checks in a row (two unless --pause-after says otherwise). Each tool call (the command and its arguments, including the text of a file write) goes to TypeSafe's judgment model with keys, tokens and passwords removed, and only a 200-character summary is kept; tool output never leaves the machine. Codex asks once to review FlockTab's hooks: choose Trust all and continue. codex exec never asks: until that one-time answer it skips the hook and its commands run unchecked, and tab says so.
| Option | What it does |
|---|---|
| --velocity N|none | most calls per minute (a new Agent starts at 120); none removes the limit |
| --models a,b|none | the only models allowed; none allows any |
| --allow tool,tool|none | irreversible tools this Agent may call |
| --guard off|watch|ask|deny | Agent Guard judges tool calls before they run; ask or deny stops irreversible ones |
| --loops off|watch|pause | the loop watch spots an agent stuck repeating itself; pause closes its tab |
| --pause-after 1-5 | how many checks in a row (one every 3 tool calls) must find no progress before pause closes the tab; default 2, since one stuck check can just be a slow step |
| --all | every Agent at once: takes --guard, --guard-level, --reach, --loops and --pause-after; prints each Agent and a total |
| --default-guard off|watch|ask|deny | the Agent Guard mode new Agents start with (Settings in the console) |
| --guard-level relaxed|balanced|strict | how sensitive the guard is; strict also stops pushes, deletes and writes outside the folder |
| --reach on|off | the guard also stops ssh, sudo, remote databases, reading keys and the sandbox off |
| --flag <pattern>|none | a command or tool the guard always stops; * matches anything |
| --trust <pattern>|none | a command or tool the guard always lets through |
| --forget <pattern> | remove one of your patterns |
| Example | What it does |
|---|---|
| tab policy --velocity 60 --models claude-sonnet-5,gpt-5 | slow it down and pin its models |
| tab policy --guard ask --loops watch | confirm irreversible calls, record stuck sessions |
| tab policy --all --guard watch --default-guard watch | every Agent, and every new one, on watch |
| tab policy --guard ask --guard-level strict | ask before any push, delete or write outside the folder |
| tab policy nightly-bot --guard deny --loops pause | an unattended Agent: refuse and stop |
| tab policy --trust "ssh staging-bastion*" | one machine this Agent may reach without asking |
| tab policy --flag "*prod*" | stop anything that names production |
See also: tab cap · tab ledger · tab guard
tab guard [allow|deny <id>]
Review what Agent Guard held or blocked: keep it blocked, or propose an allow to confirm in the console.
tab guard [--agent slug] [--filter pending|blocked|allowed|all]
tab guard allow <id> [--always [--pattern <p>]]
tab guard deny <id>When Agent Guard refuses a call (deny, or ask under Codex), the call waits for a person, 45 seconds unless the Agent says otherwise. Allow it in that time and it runs there and then; otherwise it is refused and stays in the list.
deny keeps it blocked, there and then. allow only proposes: it prints a link and a code, and the call is allowed when you confirm it in the console, signed in. The agent can reach the terminal it runs in, and so tab's login, but not your browser session. Confirmed, the exact call runs if it is still waiting, else its next try within 10 minutes passes; --always also trusts one narrow rule on that Agent, the exact command by default (never a bare * or a shell by name). Other unanswered requests for that exact command on the same Agent are answered together, including expired requests; earlier answers are kept. Every decision is final and recorded with who made it.
tab guard allow and deny also refuse inside an agent tab launched, under a harness process (claude, codex and the rest), and without a terminal. The full command is read from this machine, where the agent ran, so what you propose is what you saw; the console's Agent Guard page can also decide, but not a call it could not show in full.
| Option | What it does |
|---|---|
| --agent <slug> | only this Agent's calls |
| --filter pending|blocked|allowed|all | which calls to list (all by default) |
| --always | with allow: also trust that exact command on this Agent from now on |
| --pattern <p> | with --always: the rule to trust instead of the exact command |
| Example | What it does |
|---|---|
| tab guard | what is waiting, and what was blocked |
| tab guard allow <id> | propose letting that exact call run once; confirm in the console |
| tab guard allow <id> --always | propose trusting that exact command on its Agent |
| tab guard deny <id> | keep it blocked |
See also: tab policy · tab top
tab rename
Rename an Agent. Its slug, and so its console URL and .flocktab files, stay.
tab rename <agent> <name>The display name changes everywhere. The slug is permanent so folders and links keep working.
| Example | What it does |
|---|---|
| tab rename landing-page "Landing page" | change how the Agent is shown; its slug stays landing-page |
tab key rotate [agent]
Mint a new key for an Agent, kept on this machine. The old one stops working.
tab key rotate [agent]Keys look like ft_live_... and are stored hashed; FlockTab cannot show one again. The old key is refused (401 key_revoked) from the next call, on every machine that still holds it.
| Option | What it does |
|---|---|
| --show | print the new key once, for a machine without tab |
| Example | What it does |
|---|---|
| tab key rotate | a new key for this folder's Agent; the old one stops working |
| tab key rotate landing-page --show | print the new key once, for a machine without tab |
See also: tab use
tab project | projects
Group Agents under a project for chargeback (Team plan and up).
tab projects
tab projects add <name>
tab project [agent] <project>|none [--create] [--repo owner/name]A project is a label on FlockTab's own meter: what these Agents spent, together. --repo links a GitHub repository so outside spend (Actions, storage) can be attributed to the same project.
With one word, tab project puts this folder's Agent in that project. With two, the first is the Agent (its name or slug, as tab list shows) and the rest is the project. Quote a project name with spaces. tab project help, like tab <command> help for every command, prints this page.
| Option | What it does |
|---|---|
| --create | make the project if it does not exist |
| --repo owner/name | link a GitHub repository |
| Example | What it does |
|---|---|
| tab projects | every project in the flock |
| tab projects add "Landing page" | make a project |
| tab project "Landing page" | put this folder's Agent in it |
| tab project landing-page "Landing page" | put another Agent in it: the first word is the Agent |
| tab project "Landing page" --create --repo acme/landing | make it if it is new, and link its GitHub repository |
| tab project none | take this folder's Agent out of its project |
See also: tab spend · tab outside
tab archive
Close an Agent for good and take it off the bill. Its history stays.
tab archive [agent]The tab closes for good, the Agent leaves the lists and stops counting towards the plan's Agents. Its ledger rows stay.
Its keys stop working everywhere (the proxies answer key_revoked). A folder still bound to it asks for an Agent again on the next launch.
| Option | What it does |
|---|---|
| --yes | do not ask |
| Example | What it does |
|---|---|
| tab archive old-experiment | close it for good; asks first |
| tab archive old-experiment --yes | without asking |
Subscriptions and the pool
Agents that run on your own Claude, ChatGPT, SuperGrok or Kimi plan, and choosing between several logins of one vendor.
tab accounts
Every plan login your Subscription Agents were seen on, and how used it is.
tab accountsAccounts are discovered, never typed in: the vendor names the login on every reply, and FlockTab files the call under it. Each row shows the plan, the seat price taken from the plan tier, what the last 30 days would have cost at list price, the number of calls, and the usage the vendor last reported per window. A ChatGPT login that has rate-limit resets banked says how many (2 resets banked).
The console shows the same under Setup, Subscriptions, where a label or a seat price of your own is set.
| Example | What it does |
|---|---|
| tab accounts | each login, its plan, and how used each window is |
tab pool [add | login | at | swap]
Several logins of one vendor on this machine; the agent runs as the one with most room.
tab pool
tab pool add claude|codex|grok|kimi <name> [--email <address>] [--dir <folder>]
tab pool login [claude|codex|grok|kimi] <name>
tab pool remove claude|codex|grok|kimi <name>
tab pool at [claude|codex|grok|kimi] [7d] <percent>|default
tab pool rebalance <points>|off
tab pool swap auto|launchpool login <name> signs a login in again, in its own folder, with the vendor's own browser sign-in: for one whose sign-in expired (Claude says Not logged in). Name the vendor first when the same name is in more than one pool; in a terminal tab asks which. Windows already running on that login pick it up on their next call. On macOS tab reads when Claude Code last refreshed each login (the keychain entry's date, never the login): one not refreshed for three days is marked in tab pool as last refreshed N days ago, and the pool does not move onto it while another login has room.
A pool member is a folder the agent signs in to itself (CLAUDE_CONFIG_DIR, CODEX_HOME, GROK_HOME, KIMI_CODE_HOME). tab never reads, copies or forwards a login, and neither proxy holds one: tab only chooses which folder a launch uses. pool add opens the vendor's own browser sign-in and finishes by itself. The login then shows in the console under Subscriptions at once, before its first call: tab tells the console the account's id, email and plan tier as the agent's own files state them, never the login itself.
Usage is what the vendor last reported for that account. The short window (Claude's 5 hours, Codex's primary) decides: at or over the threshold, the login gives way. The long window (the week) is ignored until it reaches its guard, 95% unless set, and then the login gives way whatever the short window says. Between logins within five points of each other, the one with more of its week left goes first. A login never seen through FlockTab counts as unused.
At launch tab takes the login with most room. While running (swap auto) it looks once a minute; when the login in use is over a limit and another is not, it waits for a quiet moment (this session has no call in flight and began none in the last 20 seconds; other sessions do not hold it back), stops the agent and starts it again as the other login in the same conversation, reopened by its own id, so two sessions in one folder each come back as themselves (Claude Code: the conversation the window is in at that moment, as its status line last said, so after a /clear or /resume too; one where nothing was said yet starts again under the same id. Codex: when tab can tell which conversation was this run's; otherwise the folder's most recent, and tab says so). Windows move onto one login one at a time, about 90 seconds apart, so they do not all refresh its sign-in at once. When the harness ends at once on the new login, tab goes back to the one it came from, in the same conversation, and does not try that login again in this run. The vendor's prompt cache does not carry over, and anything typed but not sent is lost. Rebalance (30 points unless set) also moves off a login that is fine when another's week is at least that many points emptier and its short window has the same margin to spare, at launch and while running; the margin keeps two logins from trading places. A running agent reads the pool's settings at every check, so changing them moves it within a minute. When every login is over, nothing moves, and at launch a login with a banked rate-limit reset (ChatGPT) runs first, else the least used.
Members share your own conversations (~/.claude, ~/.codex, ~/.grok, ~/.kimi-code), so a conversation continues under another login and can be resumed with or without the pool. The pool lives in ~/.flocktab/pool.json on this machine only.
| Option | What it does |
|---|---|
| --email <address> | pool add: prefill the sign-in page (a name that is an email does this by itself) |
| --dir <folder> | pool add: use a config folder you already have instead of making one |
| --paths | pool: also show each login's folder |
| at <percent> | the short-window threshold for every vendor (default 80) |
| at <vendor> <percent> | one vendor's own threshold; default clears it |
| at [vendor] 7d <percent> | the weekly guard (default 95) |
| rebalance <points>|off | move to a login whose week is that many points emptier, even while the current one is fine (default 30) |
| swap auto|launch | auto also moves a running agent when idle; launch only chooses at start |
| Example | What it does |
|---|---|
| tab pool add claude me@example.com | sign a Claude login in; the email is prefilled |
| tab pool | every login: plan, usage bar, each window and its reset, and which runs next |
| tab pool at claude 70 | Claude logins give way at 70% of the 5-hour window |
| tab pool at 7d 90 | any login gives way once 90% of its week is used (for Claude, the general week or Fable's own, whichever is fuller) |
| tab pool rebalance 20 | spread the week: move to any login 20 points emptier, running agents included |
| tab claude --as me@example.com | pin one login for this run |
See also: tab accounts · tab claude
See what happened
Read commands. Add --json to any of them for scripts and agents.
tab status
Which flock, which Agent this folder runs as, its kind, and whether the proxy answers.
tab statusThe first thing to run when something is off. Exit code 0 only when the machine is logged in, the folder has an Agent with a key here, and the proxy is healthy.
| Example | What it does |
|---|---|
| tab status | is this machine logged in, which Agent is this folder, does the proxy answer |
See also: tab login · tab use · tab up · tab whoami
tab whoami
Which Agent this folder runs each harness as, and whether this machine's key for it works.
tab whoamiOnly reads: it never asks, and never creates or keys an Agent. A folder with no Agent says so; a key the proxy refuses (key_revoked) is shown with the command that fixes it.
A launch whose key is refused stops the same way instead of starting the harness, and tab never creates an Agent from closed input: with nobody to answer (an agent's shell tool, a closed pipe) the picker stops and says so.
| Example | What it does |
|---|---|
| tab whoami | this folder's Agent per harness, and whether each key works here |
See also: tab status · tab key · tab use
tab top [--every <seconds>] [--once]
The flock live in a scrolling screen: Agents, the leaderboard, subscriptions and their windows, the pool, outside spend, the ledger.
tab top
tab top --every 5
tab top --onceAn always-on dashboard in the terminal, redrawn every 2 seconds (--every sets it). When npm has a newer tab (asked every half hour), a line above everything says so: q, then tab update. At the top: the flock, its plan, Agents used of the plan's limit, whether the proxy answers. Then who is working right now, calls per minute, calls blocked and spend in the last 5 minutes (5m), with their trend; every Agent with its harness, project, spent of cap, calls per minute, calls blocked in the last 5 minutes and its last decision (an Agent run from two terminals at once, two `tab claude` launches in one folder, reads ×2, and the working count adds the sessions); every subscription login with each of its windows (for Claude, the general 5h and 7d windows and Fable 7d, Fable's own week) and how long until each resets, its calls in the last 30 days (30d), the rate-limit resets a ChatGPT login has banked, and the pool's next pick marked, with every Agent on that login (an Agent shows only under its own vendor's login: a Claude Agent under Claude, a Codex Agent under ChatGPT, even when both logins share an email); outside spend by project over the last 30 days with the unattributed share; and the ledger's latest decisions as they happen. Under the Agents, Branches today, in your flock's time zone (Settings), not this machine's: each branch a tab session was on (with its pull request number in front when the GitHub CLI, gh, is signed in on your machine), with what went on the tab, subscription use at list price and the share of each login's week it took (≈), the minutes with calls and the sessions (the Projects page has the last 30 days). Then the Leaderboard for your flock's day (midnight in the flock's timezone), with the week's biggest token user beside its title: Token hogs (most tokens in and out per Agent), Speed demons (the fastest models by median output tokens per second, once a model has 5 timed calls), Peak pace (each Agent's busiest minute and the flock's, with when), Big spender (the single priciest call at list price) and Cache champ (the biggest share of input read from cache, once an Agent has 5 calls). When one of them is broken while you watch (a new first place, a busier minute, a pricier call), a line reads 🏆 new record for 30 seconds. The boards are read every 30 seconds. Calls settled by a proxy older than the boards have no timing or cache count and are left out of those two. Tally, FlockTab's sheepdog, sits beside the header in a colour terminal at least 24 rows tall: he trots while Agents work, barks when calls are blocked or the proxy is down, and wags when all is quiet. On a dark background he wears a lighter coat so he does not vanish: tab top asks the terminal for its background colour (or reads COLORFGBG), and t switches his coat by hand and keeps the choice.
The header (Tally and the totals) stays put and everything under it scrolls: every Agent, every login, every outside project and the whole ledger tape are there, never cut to fit. ↑/↓ or j/k move a line, PgUp/PgDn or space/b a page, g or Home the top, G or End the bottom, and the mouse wheel three lines. A dim footer says which lines you are looking at when there is more than the screen holds, and a refresh keeps your place.
q, Escape or Ctrl-C leaves and the terminal is as it was, mouse included; r redraws at once. --once prints everything once and returns, for a pipe or a quick look. A panel the console cannot answer on a tick is a line above the footer, and the last good read stays on screen. Everything comes from the console the other commands read, so nothing here disagrees with tab list, tab pool, tab accounts or the Console.
| Option | What it does |
|---|---|
| --every <seconds> | how often to redraw (default 2, 1 to 3600) |
| --once | print everything once, then return |
| Example | What it does |
|---|---|
| tab top | the live screen; q quits |
| tab top --every 5 | redraw every 5 seconds |
| tab top --once | print it once, for a script or a screenshot |
See also: tab list · tab pool · tab accounts · tab live · tab status
tab statusline [harness]
One line for a harness's status bar: the Agent and its tab, or the plan's windows.
tab statusline [claude|codex|grok|kimi]
tab statusline install grok|kimiPrints what this folder runs the harness as, then either spent of cap for an API-key Agent or, for a subscription, the login in use and each window's usage as the vendor last reported it (5h 36% · 7d 29%). On a pooled run it names the pool login the run is on and how many logins the pool has (pool me@x.com (4)). Read from the console at most once a minute, so a status bar that refreshes every few seconds costs nothing.
Your own status line stays. tab runs it first (Claude Code's from settings.local.json or settings.json, Grok's and Kimi's from their config, with the same stdin the harness gives) and adds its own line after it, every line of yours kept. Claude Code shows the pair on every tab claude, passed on the command line so no file of yours is touched (your own --settings wins). Grok Build and Kimi Code read a status line only from their config; a pool member gets it (that home is tab's), and tab statusline install grok|kimi puts it in your own config after asking: the file is backed up next to it first and a command already there is set aside and keeps running first. Codex takes no command and already shows its own limits.
| Example | What it does |
|---|---|
| tab statusline claude | the line, as Claude Code's status bar would show it |
| tab statusline install grok | add it to ~/.grok/config.toml |
See also: tab status · tab accounts
tab log [-f] | log --proxy
Everything that went through the tab, one line per call.
tab log [-f] [--all] [--lines N]
tab log --proxy [-f]tab log reads the flock's ledger and shows the calls of the Agents keyed on this machine: time, Agent, what was called, tokens in and out, the amount, and the outcome (settled, subscription, refunded, blocked and why). It works the same on hosted and self-hosted.
tab log --proxy (also tab logs) is the self-hosted proxy's own log on this machine: one line per call with the vendor, model, status, cached tokens and milliseconds. Neither log ever contains a key, a login, a prompt, an email or an IP address.
| Option | What it does |
|---|---|
| -f | follow: keep printing new calls |
| --all | every Agent in the flock, not only this machine's |
| --lines N | how many to start with (30) |
| --proxy | the local proxy's log instead |
| Example | What it does |
|---|---|
| tab log -f | follow the calls as they happen |
| tab log --all --lines 50 | the last 50 calls of every Agent in the flock |
| tab log --proxy -f | follow the self-hosted proxy's own log |
See also: tab ledger · tab live
tab ledger
One row per call, with the hold and what it settled at.
tab ledger [agent]SETTLED $0.08 of $0.14 held means $0.14 was held before the call and $0.08 was the real cost; the rest went back. REFUNDED means the provider failed and nothing was charged. SUBSCRIPTION is a call on your own plan, priced at list and not charged. BLOCKED names the rule that refused it.
| Option | What it does |
|---|---|
| --limit N | how many rows |
| --blocked | only refused calls |
| Example | What it does |
|---|---|
| tab ledger | this folder's Agent, one row per call |
| tab ledger landing-page --blocked | only the calls refused for that Agent |
| tab ledger --limit 100 | more rows |
tab spend
What was spent through the tab, and outside it, grouped: by Agent, project, day, or model and effort.
tab spend [agent|project|day|model]Meter spend is what went through FlockTab. Outside spend is what the connected billing sources report (Team plan and up), so the two can be told apart.
tab spend project is the last 30 days for every figure, as the Projects page: each project's meter (committed calls), its outside spend and the unattributed outside; --since does not change it.
tab spend model lists each model with the reasoning effort the requests asked for (OpenAI's reasoning effort, Anthropic's effort or thinking budget), how many calls, what they cost and how they were paid: charged to a tab, or priced at list on a plan. The console shows the same under Spend, Models.
| Option | What it does |
|---|---|
| --by agent|project|day|model | how to group |
| --since 7d | how far back |
| --agent <agent> | only one Agent |
| Example | What it does |
|---|---|
| tab spend model --since 30d | a month per model and effort |
See also: tab outside · tab ledger
tab outside
The outside-spend connections and their totals per project.
tab outsideConnections are made in the console (Spend, Outside spend): provider admin APIs and cloud billing. They answer whether a dollar went through a tab or around it.
The console pulls every connected source on its own, once an hour; the last sync shows per connection.
| Example | What it does |
|---|---|
| tab outside | each connection and its spend per project |
See also: tab spend · tab project
tab live
Who is active right now.
tab liveEach Agent's pulse (active, quiet, idle, stopped), calls per minute and last decision. Active means a call was admitted in the last minute. Quiet means calls in the last five minutes, but not the last minute.
| Option | What it does |
|---|---|
| --watch N | refresh every N seconds |
| Example | What it does |
|---|---|
| tab live | who is active right now |
| tab live --watch 5 | refresh every 5 seconds |
tab web
Open the Agent's page in the console.
tab web [agent]Opens this folder's Agent when none is named.
| Example | What it does |
|---|---|
| tab web | this folder's Agent in the console |
| tab web landing-page | another Agent's page |
Self-hosted proxy
Provider keys stay on your machine; the ledger stays on flocktab.com.
tab up | down
Start or stop the self-hosted proxy on this machine.
tab up
tab downThe self-hosted proxy is one binary (flocktab-proxy). Your provider keys live in ~/.flocktab/proxy.env on this machine, owner-only, and never reach FlockTab. The proxy asks flocktab.com to hold, settle or refund each call with the Agent's own key, so caps, policies, the kill switch and the ledger work exactly as on hosted.
tab up asks for provider keys the first time (typed without echo), starts the proxy on 127.0.0.1:8787 and waits until it answers. tab claude on a self-hosted machine starts it by itself when it is down.
tab down stops the proxy that tab started. Anything running through it is cut, so stop your agents first.
| Example | What it does |
|---|---|
| tab up | start the self-hosted proxy; asks for provider keys the first time |
| tab down | stop it |
See also: tab log · tab update · tab status
This machine
The CLI itself.
tab update
Install the newest tab from npm, and with it the newest proxy.
tab update
tab update --quietRestarts a self-hosted proxy that was running, so it runs the new version. Stop your agents first on a self-hosted machine. A proxy started with provider keys in its environment (not saved in proxy.env) is left running instead, with the keys a restart would drop named: restart it yourself with them set.
In a colour terminal, Tally asks npm for the newest version first, trots beside the install (in the coat tab top gives him: the one t chose, else lighter on a dark background), and ends with the new versions and two or three lines on what is new. Already on the newest, nothing is installed. If npm does not answer, nothing changes and tab exits non-zero.
--quiet (or -q), a pipe or NO_COLOR prints plain lines and always reinstalls from npm.
| Example | What it does |
|---|---|
| tab update | the newest tab and proxy |
| tab update --quiet | plain lines, for a script |
See also: tab version
tab version
The versions of tab and of the proxy it carries.
tab versionA proxy that is older than tab can miss features; tab says so when it notices.
| Example | What it does |
|---|---|
| tab version | tab's version and the proxy's |
tab logout
Forget this machine's session and Agent keys.
tab logoutRemoves ~/.flocktab/config.json. The pool, the proxy's provider keys and each folder's .flocktab are left alone. The Agents and their history are untouched on FlockTab.
| Example | What it does |
|---|---|
| tab logout | forget this machine's session and keys; tab login brings them back |
See also: tab login
Environment
For CI and scripts, where there is no folder to ask and nobody to approve a login.
| Variable | What it does |
|---|---|
| FLOCKTAB_KEY | The Agent's virtual key. With it set, no folder or login is consulted. |
| FLOCKTAB_UNLOCK | The flock's unlock, for a hosted API-key Agent. |
| FLOCKTAB_PROXY_URL | The proxy to use; tab login does not ask when it is set. |
| FLOCKTAB_HOME | Where tab keeps its files, instead of ~/.flocktab. |
| FLOCKTAB_CALL_LOG=0 | Self-hosted proxy: turn the per-call log line off. |