Skip to main content

kapi up

kapi up

Bring the project up to date: the recipe declares the languages, the flow, and the gates that decide shippable; kapi up runs the project's default flow (defaults.flow) over every target language, looping until every gated scope is shippable or parked for a human.

Without defaults.flow, up runs the built-in default flow — Memory reuse (recycle) followed by AI translate — so a recipe needs no flow YAML at all to catch up. Setting defaults.flow replaces the built-in default.

Before each pass, up re-syncs the project block store with the working tree: edited source files, a store written by another kapi version, or a missing store trigger a re-extraction (the same shared path behind the desktop's Re-extract). --no-extract opts out.

Each pass re-derives coverage from the working tree, runs the flow only for the locales still short of their gate, and stops when everything ships, a pass makes no progress (the remainder parks — it needs a human), or the pass cap is reached. After each pass the project's bound checks run over what was produced: a unit with failing findings (dropped placeholders, terminology violations) counts as drafted, not translated, so it cannot lift its locale over the gate until fixed. --no-checks opts out.

When the loop ends, the materialize policy decides whether target-language files are written from the project store: 'defaults.materialize: on-converge' (or the --materialize flag) writes them for every locale whose gated scopes are all shippable; the default ('manual') leaves that to 'kapi merge'.

Venue: in a server-connected project (a recipe with a server: block, with the bowrain plugin installed) the loop runs on the Bowrain server by default — on the org's keys, against the org's shared Memory and terminology — and this command pushes local changes, streams the server run's live progress, and pulls the produced targets. --local keeps the loop on this machine and then pushes the results so the server never goes stale; --server fails rather than falling back to a local run. The resolved venue is printed first whenever a server: block is present. Without a server: block, up is purely local.

--plan is a dry run in every venue: instead of running anything, up reports the pending work per (collection, locale) — units missing a target, exact Memory leverage, the remaining AI work, and a rough token estimate — computed locally against the working tree, with no provider calls and no writes. Combine with --json for agents.

up never fails the build on target drift: parked, pending target content is normal toil, reported rather than thrown. Use 'kapi status' to inspect standing without running anything, and 'kapi check --ship' to enforce the gates (e.g. before a release tag).

--passes 1 runs a single pass (the behavior of the bare 'kapi run'); --passes N caps the loop at N passes.

Commandup
Groupwork
Try it

Runs in your browser against a small sample file. Edit the command before running, or press Run to execute it as shown.

kapi up # loop the default flow until every gated scope ships or parks
Flags
FlagTypeDefaultDescription
--api-keystringAPI key for the AI provider
--batchingstringhow many blocks share one LLM call: auto (default), single
--concurrency, -jint0number of files to process at once (0 = auto)
--contextstringwhat the model is told about a block besides the block: none, key (default), neighbours
--credentialstringsaved credential name to use (see 'kapi credentials list')
--encoding, -estringUTF-8input file encoding
--explainboolfalseprint the resolved source → sink bindings and exit without running
--format, -fstringoverride input format detection
--input, -istringSliceinput file path(s); repeat for multiple files
--instructionstringextra guidance for the model while translating (e.g. "informal register; keep product names in English")
--jobsint0how many languages to catch up concurrently per pass (0 = the recipe's defaults.jobs, else 4)
--jsonboolfalseoutput the structured result as JSON
--localboolfalserun the loop on this machine even when the recipe declares a server (the results are then pushed so the server stays current)
--materializeboolfalseafter the loop, write target-language files from the project store for every shippable locale (forces defaults.materialize: on-converge)
--memorystringnamed Memory for recycle flow (resolves from KAPI_HOME)
--modelstringAI model name
--no-checksboolfalseskip the bound checks in the loop (produced units count as translated even when failing guardrails)
--no-extractboolfalseskip the pre-pass source-drift check and block-store re-extraction
--output, -ostringoutput path or template (e.g. ./out/{name}_{lang}.{ext})
--packboolfalsewhen transforming a .kpz, also eject the result to the .kpz (auto-pack)
--parallel-blocksint0fan out block processing across N goroutines (0 = off)
--passesint0maximum reconciliation passes (0 = loop until up to date or parked, capped at 5; 1 = single pass)
--planboolfalsedry run: report pending work, content-memory leverage, and a token estimate per (collection, locale) — no provider calls, no writes
--project, -pstringpath to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted)
--providerstringanthropicAI provider (anthropic, openai, ollama)
--serverboolfalserequire the server venue: fail rather than run the loop locally when the recipe has no server or the server plumbing is unavailable
--source-langstringensource language (e.g. en, en-US)
--statsboolfalseinclude part/block counts in output
--target-langstringtarget language (e.g. fr, de-DE)
--termstorestringnamed terms store for term-lookup/enforce (resolves from KAPI_HOME)
--timeoutduration15m0sserver venue: maximum time to wait for the server run to finish before pulling available results
--tracestringwrite flow trace JSON to file (for flow visualization)
More examples
kapi up --plan # dry run: pending work, content-memory leverage, and a token estimate per locale
kapi up --passes 1 # a single pass over every locale that needs work
kapi up --materialize # also write target-language files for the shippable locales
kapi up --local # connected project: run the loop on this machine, then push the results
kapi up -p kapi.yaml # bring an explicit project recipe up to date

← Back to the Command Reference