Getting Started
Prerequisites, installation, and setting up xiv with xiv init and xiv update.
Prerequisites
| Requirement | Why | Needed for |
|---|---|---|
| bun | The CLI runs from source under bun; xiv init also runs bun install inside SMITHERS_HOME | everything |
gh CLI, authenticated | Opening, reading, and pushing PRs | ship, the pr family, stack push / stack review |
claude and codex CLIs, logged in | The agents the workflows drive | any workflow that runs agent steps |
| Linear MCP configured on those agents | Issues are the unit of work — workflows fetch them over MCP | implement, ship, stack plan / build |
jj (Jujutsu) on PATH (brew install jj) | The rebase engine for stacked features, run colocated with git | xiv stack only |
| A git repo on its base branch | Commands act on the repo you invoke them from (default base main; --base otherwise) | every workflow command |
You do not install Smithers separately. The engine (smithers-orchestrator) is a dependency of the workflow pack: xiv init copies the pack into SMITHERS_HOME and runs bun install there, and workflows execute through that copy's own node_modules/.bin/smithers.
Environment
| Variable | Default | Meaning |
|---|---|---|
SMITHERS_HOME | ~/.smithers | Where the managed pack, engine, and all run state live. If HOME is unset you must set this explicitly. |
SMITHERS_TARGET_CWD | (set by xiv) | The repo a workflow operates on — always the directory you invoked the command from (or --cwd for dev/check). You never set this yourself. |
Model-tier variables (XIV_TIER, XIV_MODEL_HEAVY, XIV_AGENT_MAX_USD, …) are covered in Model tiers.
Installation
Installing means cloning the repo — the xiv command runs straight from the clone's source:
git clone https://github.com/jacobdcastro/xiv.git && cd xiv
bun install
bun linkbun link points the xiv command at this repo's src/cli.ts. There is no build or publish step — the CLI runs from source, so pulling new CLI code takes effect immediately. The clone can live anywhere (nothing depends on its path); wherever you keep it becomes the machine's canonical copy. Only the pack and skills need an explicit install step, which is what init and update do.
xiv init and xiv update — the two layers
Both commands install the same two layers; init is the first-time run, update is every run after (they share an implementation).
| Layer | Source | Destination | Read by |
|---|---|---|---|
| Workflow pack | pack/ in this repo | SMITHERS_HOME | the Smithers engine, when running a workflow |
| Skills | skills/ in this repo | your agent directories, via the skills CLI | the agent driving xiv |
xiv init # first time: pack + skills
xiv update # after pulling changes: pack + skills
xiv update --no-skills # pack only (offline, or keep the agents' current skills)What each half does:
- Pack: every file under
pack/is hashed and copied intoSMITHERS_HOME, a manifest is written to.xiv/manifest.json, andbun installruns there. If a managed file inSMITHERS_HOMEwas edited since the last install, the drifted copy is backed up to.xiv/backups/<timestamp>/before being overwritten — see Managed files. - Skills: installed with
npx skills@latest add <repo-root> --skill '*' --global. It installs all of this repo's skills but prompts you for which agents to install into — that choice is deliberately never auto-answered.
Two behaviors worth knowing:
First run
From the repo you want worked on:
cd /path/to/target-repo
xiv implement ENG-123This launches the linear-implement workflow against that repo: fetch ENG-123 from Linear, plan, then loop implement → validate → review on a dedicated branch until validation passes and the local review isn't requesting changes — up to 3 passes by default (--max-iterations, clamped 1–10). Everything stays local; nothing is pushed.
While it runs, observe rather than wait:
xiv ps # what's running
xiv logs # stream a run's logs
xiv ui # live graph in the browser
xiv panic # cancel ALL runs immediately (alias for xiv down)When you want the same work to end in a PR, use xiv ship ENG-123 — implement plus opening a PR and settling its CI and comments. From there:
- Single issues and PRs → Commands
- A whole feature as stacked PRs →
xiv stack - What's actually happening underneath → How It Works