067 · CLI parity
The command line as a first-class Blitz: a banner that says whose it is, completion that knows every command, sub-command and value, help that answers questions, configuration by asking the agent, and every setting the desktop app can change.
| Status | Phases 1–4 built: CLP-01–04 (the banner, colour rules, first-run hints; the update notice waits for spec_054’s check to be cached) and CLP-10–14 (the command tree, completion at every level, the hint and fuzzy Tab, shell completion; ranking by use isn’t built) and CLP-20–24 (help from the tree, the docs in the binary, ask Blitz from them, the offline answer, errors; help.model and --debug aren’t built) and CLP-30–32, 35 (/configure and blitz configure, MCP servers from a page with env, headers and secrets, the settings the agent may set; providers, CLP-33, and the deletes, CLP-34, go to phase 5); phase 5 in part: CLP-40 (`config get |
| Source | apps/cli/ (cobra commands, helpgroups.go, configcmd.go, mcp.go, do.go); apps/cli/internal/tui/ (repl.go, render.go, terminal.go, commands.go, commands_extra.go, status.go, theme.go); pkg/api/blitzcommands.go (the catalog), pkg/engine/blitzcommands.go (its handlers), pkg/engine/tools/blitz.go; pkg/config/mcpedit.go, providers.go (SetValue); pkg/i18n/locales/ |
| Tests | Listed with each phase (§4). Every phase ends with the CLI’s tests, tools/check_format.sh, and the journey tests of §4.8 |
| Depends on | spec_019_tui, spec_020_cli, spec_060_blitz_tools (the catalog, approvals, blitz do), spec_009_mcp, spec_004_i18n, spec_008_web |
The desktop app has had the attention, and the CLI shows it. Today (from a survey of c8e251ba):
- Start-up prints one plain line (
Blitz 1.2.0 agent … · model …) and two hints that both say “Type /help”. There is no brand, no colour control (NO_COLORis ignored), and the status shows only after the first prompt. - Completion knows slash-command names from a hand-kept list (
main.go:651) and one level of arguments. Readline prints the candidates as a bare list on Tab. It doesn’t complete/modelnames, themes, styles, personalities, config keys,/cdpaths or aliases.blitz completionis cobra’s default and has no dynamic values. - Help comes from three hand-kept places that disagree:
/help’s table (commands.go:191), the completer, and the dispatcher./helpleaves out/resume,/skills install,/model --refreshand the aliases. No help links to the docs. Cobra’s text isn’t localised, and the docs aren’t in the binary (only the desktop page bundles them). - Configuration through the agent works only part of the way.
blitz mcp addthrough the agent can’t set env vars or headers, so an MCP server that needs a token can’t be set up.settings settakes five keys, and there is no provider set-up, no deletes and nomcp remove. - Parity. About 200 of the service’s ~420 RPCs have no CLI route. Desktop-only today: personality editing, About you, browser profiles, logs, Reasoning, workspace health, workflow runs, job editing, eval and skill authoring, connector test, schema and delete, secret delete, rule and guardrail delete, language-server status, and the settings file check.
- Rough edges.
- The same word means different things:
blitz agentslists background runs, while/agentslists personas. - Short flags clash:
-wis the worktree in one place and the workspace in another;-aand-flikewise. - Deletes don’t ask, and most lists have no
--json. - Errors are raw:
Error: rpc error: …. - Unknown sub-commands of
/skillsand/sessiondo nothing.
- The same word means different things:
This spec fixes that in phases small enough to land one at a time, each with its tests.
- One catalog, four readers. Every command, sub-command, argument and value source is declared once. The dispatcher,
/help, the completer and shell completion all read that declaration, so they can’t drift. A test fails when a handled command isn’t declared. - Same nouns as the desktop. A thing has the same name in the desktop, the CLI and the
blitztool: agents, skills, rules, guardrails, workflows, jobs, connectors, MCP servers, secrets, personalities and browser profiles. The form isblitz <noun> <verb>, plus/<noun> <verb>in the REPL. - Through the service. Settings changes go through the service’s RPCs (or
RunBlitzCommand) when attached, so the desktop sees them at once. They fall back in-process when no service is running. - Asks like the desktop does. A change the agent proposes goes through the same approval, with a diff, as the desktop’s form (spec_060). Secrets are asked as hidden input and never echoed or logged.
- Plain terminals stay plain.
NO_COLOR,TERM=dumb, a non-TTY output and--jsonall mean no colour, no banner art, no spinner and no menus.- Every list has
--json. - Exit codes stay those of spec_020.
- CLP-01 The banner.
- The interactive CLI opens with a Blitz wordmark: block letters about 5 lines tall in the brand’s lightning yellow-to-orange gradient, truecolor where the terminal says so (
COLORTERM), 256 colours otherwise. - Beside or under the wordmark: powered by Retail Cortex, the version, and the update notice when a newer release is out (from spec_054’s check, never a network call of its own).
- Below it, one status block:
- the workspace (its folder, with a git branch when there is one)
- agent · model (or “no model yet: run
/setup models”) - the permission mode, in red when unsafe
- the sandbox in one word
- the organization, when connected
- One hint line:
/help · Tab completes · ? asks Blitz · Ctrl+C exits.
- The interactive CLI opens with a Blitz wordmark: block letters about 5 lines tall in the brand’s lightning yellow-to-orange gradient, truecolor where the terminal says so (
- CLP-02 Width and quiet.
- Under 60 columns the wordmark gives way to a one-line
⚡ Blitzmark. ui.banner = "full" | "compact" | "off"(defaultfull) is settable from/configand Settings.--quiet/-qand one-shot runs (blitz "prompt",exec) print no banner.- A resumed session shows the compact banner, then its recap.
- Under 60 columns the wordmark gives way to a one-line
- CLP-03 Colour rules apply to every CLI output, not only the banner:
NO_COLOR(any value) turns colour off.CLICOLOR_FORCE/FORCE_COLORturn it on.TERM=dumbor non-TTY output turns it off.--color=auto|always|neveroverrides all three.- One helper (
tui.Style) replaces the raw ANSI constants inrender.go:28-39, andwarnFnuses it too.
- CLP-04 The duplicate hints go (
banner.hintandrepl.hintsay the same thing). The sandbox, steer and key hints show once per install (counted in the CLI’s state file) or with/help keys.
-
CLP-10 One command tree.
tui.Commandsdeclares each slash command once. A declaration holds:- its name, aliases, group and one-line help (an i18n key)
- its sub-commands, recursively
- its arguments, each with a value source: static choices, agents, models, sessions, themes, styles, personalities, locales, config keys, a config key’s values, workspace paths, directories, skills, MCP servers, connectors, secrets’ names, jobs, tasks or processes
- its flags
The dispatcher looks commands up in the tree.
/help, the completer and the desktop’s parity test (slashParity.test.ts, now checked both ways) read it. The hand-kept lists atmain.go:648-745andcommands.go:191-262go. -
CLP-11 Completion at every level:
- any depth of sub-command (
/skills registry add,/permissions allow,/session load <id>) - flags (
--save,--force) key=valuefor/configand/set: the keys from the settings reference (GetSettingsReference), then each key’s allowed values (enums, booleans, models, themes)- aliases
- custom commands as they are now, not as they were at start-up
@files and@db:connections, as today
- any depth of sub-command (
-
CLP-12 A completion menu and a hint.
- Tab on one candidate completes in place. On several, it completes as far as they agree, then opens readline’s menu under the line: Tab and the arrows move, Enter takes.
- As a slash command is typed, a dim hint after the cursor shows the rest of the word the candidates agree on (→ takes it). Once the command’s name is typed, the hint is its usage and what it does:
/permissions [allow|ask|deny|remove <rule> [--save]] — Rules for what runs…. - No hint without colour (CLP-03), while Ctrl+R searches, or when it wouldn’t fit on the line.
- The hint uses only values already known (a source’s answer is kept 10 s), so typing never waits on the service.
- ergochat/readline’s menu has no room for descriptions, so they’re in the hint and in
/help <command>instead.
-
CLP-13 Fuzzy, not only prefix. A candidate matches by prefix first, then by words (
/perm a→/permissions allow), then by subsequence. (Ranking ties by use in this install is for later.) Tab takes a fuzzy match only when it is the one candidate and none starts with what’s typed. -
CLP-14 Shell completion from the same tree.
- The cobra commands get
ValidArgsFunctionand flag completion from one table: agents, models, MCP servers, connectors, jobs, specs, skills, plugins, sessions, workspaces and config keys. Values come from the settings files and the catalog, never the network or the service (agents, models, jobs, specs and sessions are for later). blitz completion installwrites the script for the user’s shell (zsh, bash or fish; PowerShell prints it), anddoctorsays when completion isn’t installed (spec_020 CLI-42).
- The cobra commands get
-
CLP-20
/helpfrom the tree./helplists the groups with one line per command./help <command>shows its usage, sub-commands, flags, two or three examples and a link to its page on the docs site./help keysshows the key bindings, and/help topicsthe guide pages.blitz help <command>and--helpdo the same for the cobra commands: Examples on every command, and a “Learn more:” link. -
CLP-21 The docs in the binary.
- The user docs (getting started, guide, tutorials, products and releases; no pictures) are embedded in the Go binaries as Markdown, by
//docs(docs/embed.go), from the same files the desktop page bundles. They add about 0.6 MB. pkg/userdocsreads them once, on first use: each page split into sections at its headings, searched by BM25, with words in a page’s title or the heading counting more and release notes counting less.blitz docs [page|words]and/docs …list the pages, show one (rendered with glamour, its links pointing at the site), or the best matches with their headings and addresses.
- The user docs (getting started, guide, tutorials, products and releases; no pictures) are embedded in the Go binaries as Markdown, by
-
CLP-22 Ask Blitz.
? <question>in the REPL,/help <question>(words that name no command and aren’t a slip of one), andblitz help "<question>"ask Blitz.- The question goes to the session’s model as an aside: recorded nowhere, its tools read-only. Its prompt carries the docs’ sections that best match the question (at most 14,000 characters), and asks for the command to type and a link to the page used, with no invented commands.
- The docs travel in the prompt rather than through a docs tool. Each built-in agent lists its tools and only
blitzhas theblitztool, so this way any agent and any model, a small local one too, can answer. blitz help "<question>"runs in a session kept nowhere.help.model, a model of its own for help, is for later; for now it’s the session’s model (the owner’s choice).
-
CLP-23 Offline fallback. When no model can be built (
ModelErr) or the call fails, the question is answered without a model:- the best matching docs sections (CLP-21) and commands (CLP-10, a word in the name counting more than one in the description), each with its first lines
- how to set up a model to ask in your own words
A help question never fails just because there is no model.
-
CLP-24 Errors that help.
- An error shows the service’s own message, without the RPC’s code (
not_found: …,rpc error: code = … desc = …).BLITZ_DEBUG=1prints it whole; a--debugflag is for later. - An unknown command suggests the nearest (“Did you mean /permissions?”; a swap of two letters counts as one edit). So does an unknown sub-command, which used to do nothing.
- Turning every raw
%vin the REPL into one sentence of what to do is phase 6’s.
- An error shows the service’s own message, without the RPC’s code (
- CLP-30 Ask to configure.
/configure <what>(a bundled command run by theblitzagent, which hasweb_fetchand theblitztool) andblitz configure <what>set Blitz up as asked./setupwas already the project’s setup, hence the name. For “the MCP server described at https://…”:- It reads the page with
web_fetch, which asks for the host as usual. - It finds the server’s command or URL and what it needs: env vars or headers, and which are secrets.
- It calls
mcp addwith all of it and the page assource. The person sees one approval: the server’s[[mcp.servers]]entry as a diff, where it came from, and the secrets it’ll ask for. - On yes, it asks each secret not yet kept, hidden, saves them as the workspace’s Blitz secrets and the server, reloads MCP, lists the server’s tools (
mcp test), and says when it signs in with OAuth (blitz mcp login <name>).
- It reads the page with
- CLP-31
mcpthrough the tool, completed.mcp addandmcp edittakeenv,headers(an address’s only),prefix,agents,tools,timeout_secondsandsource.- A value with
${NAME}(or{secrets:NAME}) names a secret. A literal value of a secret-looking name (a token, key, secret, password,Authorization) is dropped and asked, named from the server and the variable (LINEAR_API_TOKEN,Bearerkept). Either way the settings hold{secrets:NAME}, and the agent never sees the value. mcp editdiffs the old entry against the new.mcp removeshows what goes.mcp testconnects and lists the tools (MCPManager.ToolNames).- Workspace scope only, as the tool’s changes are (DRV-06): the person moves one to every workspace (
blitz mcp make-global, Settings).
- CLP-32 Settings through the tool.
settings settakes, besides its five, the workspace’s settings an agent may change:ui.*,search.*, the models (llm.*.model,llm.*.models,blitz.default_model,images.model,audio.model,health.model),audio.voice,llm.provider,llm.providersandblitz.default_agent.- It never takes what loosens limits (the mode beyond tightening, agency, jobs’ policy), what redirects requests (base URLs, auth, projects and locations), what writes elsewhere (folders), or the person’s own (
profile.*). Those are refused with theblitz config setcommand the person can run. - The mode still only tightens, and unsafe is never reachable (spec_060, 63d9fb62).
settings reference [key|prefix]lists the sections, or each key’s type, default, what it does, and whether the agent may set it.
- CLP-33 Providers through the tool.
provider list,provider add <name>(the provider, its base URL, project or location; the key asked as hidden input and stored likeconfig set-key),provider check <name>(CheckApiKey), andprovider remove.provider addis always asked, and it’s refused while an organization provides the models (org policy).
- CLP-34 The rest of the catalog’s gaps.
- Delete for connectors, rules, guardrails, secrets, agents, skills, workflows and jobs. Each is always asked and shows what goes.
connector test.rule save/guardrail savediff against the old file (today the old side is empty).job createthrough the tool (rejected today,blitzcommands.go:1091).
- CLP-35 Safety unchanged.
- Every change keeps spec_060’s rules:
askChangewith a diff,MustAskfor what brings code (MCP servers, hooks, plugins),ErrConfirmWhileAgentWorks,BLITZ_AGENTrefusing--yes, and the organization’s policy. - A fetched page’s text is data: the agent shows where each value came from (the page’s URL) in the approval’s detail.
- Every change keeps spec_060’s rules:
The desktop’s settings and Studio, reachable from the CLI. Each item is a blitz <noun> <verb> command with --json, plus the REPL’s /<noun> where it’s used in a session. They go through the service when attached.
- CLP-40 Settings.
blitz config get <key>andblitz config set <key> <value> [--workspace]cover every reference key./configtakeskey valueas well askey=value, and--savewrites either scope (today only global, and only seven keys).blitz config editopens the settings file in$EDITORand checks it on save (CheckConfigFile), offering to reopen on an error.blitz config checkchecks it without opening.
- CLP-41 Providers and models.
blitz providers list|add|check|remove|use.useis the default provider:SetProvider.config set-keyvalidates withCheckApiKeybefore saving./modelcompletes every provider’s models (spec_061).
- CLP-42 Personality and About you.
blitz personality list|show|use|new|edit|try|remove.newandeditopen$EDITORon the Markdown.blitz profile show|set name|pronouns|…(About you)./personalitykeeps picking.
- CLP-43 Agents, skills, rules, guardrails, workflows, evals, jobs. For each:
list,show,new/edit(in$EDITOR, saved through the service with its validation),remove, andenable/disablewhere the desktop has them.- Rules:
reorderandtry. Guardrails:try. - Skills:
try,files,trust. - Workflows:
run,runs,watch,stop. - Jobs:
new,edit,remove,schedule(preview). - Evals:
new,draft(DraftEvalCases),stop. - Human tasks:
blitz tasks list|answer, and/tasksanswers them.
- CLP-44 Connectors and secrets.
blitz connectors list|show|add|edit|test|schema|remove|enable|disable|make-global.addasks each field in turn, from the connector’s descriptor, with secrets hidden.blitz secrets list|set|remove.
- CLP-45 Browser profiles.
blitz browser profiles list|new|remove|clear|open|sites, andblitz browser use <profile>for the workspace. - CLP-46 Health, logs, language servers.
blitz health [--watch], the Studio overview’s checks.blitz service logsis the service’s log (--day,--level,--grep,-n,-f,--days,--json), read from its files.blitz logstakes that name once the old command, a run’s log, has moved toblitz runs logs(CLP-50).blitz lsp status|restart.
- CLP-47 Reasoning in the terminal.
/reasoning [turn]draws a turn’s graph (GetReasoning) as an indented tree: calls, steps of reasoning, tools with ✓ or ✗, sub-agents, and tokens and cost per call.- It folds to a summary per call, and
/reasoning <n> --fullprints every node. blitz sessions reasoning <id> [--turn n] [--json].
- CLP-48 Sessions.
blitz sessions list|show|export|usage|remove.listis missing today. - CLP-49 Voice. The settings only:
blitz voice show|setfor the[voice]keys. Talking stays in the desktop app (spec_063).
- CLP-50 One word, one meaning.
blitz runs(list,logs,stop,attach) is the background runs. Built.blitz attach,logsandstopwork for a release, hidden, each saying its new name.blitz agentslists the runs for a release, saying it moves. It can’t mean both at once; from the next release it lists the agents, as/agentsdoes.
- CLP-51 Flags mean one thing. Built in part.
- The root’s
-w(--worktree) and-a(--agent) work for a release, saying they’ll mean--workspaceand--allas they do elsewhere (pflag’s deprecated shorthands). -fkeeps its usual meanings, follow forlogsand force elsewhere, astail,dockerandgituse them.-yis--yeswhere a command asks.- A test that walks the command tree for short flags with two meanings is for later.
- The root’s
- CLP-52 Removal is
remove. Every noun usesremove, withrmanddelete(anduninstallfor plugins and skills) as aliases. A remove asks on a terminal unless-yis given. In a script it does as it did, so scripts keep working. Built formcp,plugin,skills,memory,picture,jobsandproviders(asksBeforeRemove). - CLP-53
--jsonon every list and show, with the same field names as the RPC’s JSON. Built forruns,sessions list,mcp list(names, targets, scope and state, never env or header values),memory list,config getandconfig reference, besidedo,data,eval,search,pkg validateandpicture show. The rest (models,plugin list,skills list,jobs list,spec list,worktrees list,config keys,enterprise …) and a test running each against the fake service are for later. - CLP-54 Exit codes. “Not found” exits with
exitNotFoundeverywhere (a new code, documented in spec_020), and usage errors withexitUsage. - CLP-55 Localised help. Cobra’s Short, Long and Example text and flag usage come from the i18n catalogs (
cli.cmd.<path>.shortand so on), soblitz --helpreads in the person’s language. The i18n lint covers the cobra tree.
- CLP-60 Scripted journey tests drive the REPL through a pseudo-terminal against the fake service and a strict fake model. Each phase adds its own:
- Banner: full, compact under 60 columns, none with
NO_COLORor a pipe. - Completion:
/skTab →/skills,/skills reTab →registry,/config theme=Tab → the themes, the menu moved and taken. - Help:
/help mcp,? how do I add an MCP serverwith the fake model (the answer cites the MCP guide), and the same with no provider (offline matches). - Configure: “set up the MCP server described at
”. The fake model fetches the page, proposes mcp addwith a header, the approval shows the diff, the hidden secret is answered, and the server is saved with{secrets:…}and listed. - Parity: each new command’s
--jsonagainst the fake service.
- Banner: full, compact under 60 columns, none with
Phases in order. Each phase is one commit with its tests, and each leaves the CLI working. The time estimates are for this session’s pace.
| Phase | What | Requirements | Est. |
|---|---|---|---|
| 1 | Banner, colour rules, start-up tidy | CLP-01–04 | 1 h |
| 2 | The command tree; completion menu, ghost text, fuzzy; shell completion | CLP-10–14 | 2 h |
| 3 | /help from the tree, docs embedded, blitz docs, ask Blitz with offline fallback, helpful errors |
CLP-20–24 | 1.5 h |
| 4 | Configure through the agent: mcp with env, headers and secrets, settings at any key, providers, deletes, /setup <what> |
CLP-30–35 | 1.5 h |
| 5 | Parity commands, highest use first: config get/set/edit, providers, sessions list, connectors, secrets, reasoning tree, personality/profile, the Studio nouns, browser, health/logs/lsp, voice | CLP-40–49 | 2.5 h+ |
| 6 | Consistency: runs/agents, flags, remove, --json, exit codes, localised help |
CLP-50–55 | 1 h |
Phase 5 is the longest and can be cut at any noun. What isn’t done by the end of the session stays listed in §5 with its status.
Each phase also updates:
- spec_019 and spec_020 where it changes them
- the guide: the CLI page,
docs/content/products/cli.md(the banner, completion, help, configure by asking), withmcp.md,configuration.mdandblitz-commands.mdupdated - the three locales, edited line by line
- the 1.3.0 release notes
- A full-screen TUI: panes, mouse, a file tree. The CLI stays a line REPL with menus.
- Voice in the terminal.
- Git commit, branches and sync from the REPL:
!gitis there, and the agent has git. - A terminal workflow canvas: workflows are edited as files and run from the CLI.
- The wordmark: block letters (█-style, 5 lines) with “⚡ powered by Retail Cortex · v
” under them. - Renames (CLP-50, 51): yes —
blitz agents→blitz runs,-w→--workspace, with one release of hidden aliases. - Docs in the binary (CLP-21): yes, embedded for offline help.
- Ask Blitz’s model: the session’s model;
help.modeloverrides it.