Skip to content

Use a tree

Every published abtree workflow installs and runs the same way. This page is the canonical reference — individual tree READMEs link here instead of duplicating it.

Prerequisites

Install these on your PATH:

  • abtree CLI — see Get started for one-liner installers (macOS, Linux, Windows).
  • An agent. abtree is agent-agnostic. Examples on this site use Claude Code, but any LLM agent that runs shell commands works.
  • A node package managerBun, pnpm, or npm.

Install the abtree skill

The skill is the prompt template that teaches your agent how to drive an abtree execution. If you kick off a workflow and the agent does not seem to know what to do, the skill is missing:

sh
abtree install skill

You only do this once per agent setup, not per tree.

Install the tree

Choose one of two options. Either way, the tree lands as a node package — abtree finds it by path or by slug at execution time.

In the repository you want to run the workflow against:

sh
bun add --dev <pkg>
sh
pnpm add -D <pkg>
sh
npm install --save-dev <pkg>

The tree lands at ./node_modules/<pkg>/. It is a dev-time tool — nothing ships in your runtime bundle.

Option B — global

Install once, run from any repository:

sh
bun add -g <pkg>
sh
pnpm add -g <pkg>
sh
npm install -g <pkg>

The tree lands at $(npm root -g)/<pkg>/ (use pnpm root -g or bun pm -g bin for those managers).

Pin a version

Pin an npm version for byte-stable resolution across machines:

sh
bun add <pkg>@1.2.0

For full reproducibility, commit your lockfile (package-lock.json, pnpm-lock.yaml, or bun.lock).

Install from sources other than npm

If you consume a tree that is not published to npm (a private fork, an unpublished prototype, a local tarball), every supported package manager already documents Git, local-path, tarball, and URL forms — see the manager's add/install reference: npm install, pnpm add, bun add.

Run the workflow

Hand a brief to your agent. The exact phrasing does not matter — the agent reads the skill, calls abtree --help, and figures out the protocol from there:

sh
# Option A — per-repo install
claude 'Using the abtree cli, run the tree ./node_modules/<pkg>'
sh
# Option B — global install
claude "Using the abtree cli, run the tree $(npm root -g)/<pkg>"

The agent walks the tree and persists state to a new .abtree/ directory at the repo root. Gitignore it, or commit it if you want shareable run history.

What gets written

Every execution writes the same three artefacts under .abtree/executions/:

PathPurpose
.abtree/executions/<id>.jsonFull execution document — input, output, every state mutation.
.abtree/executions/<id>.mermaidLive Mermaid diagram of the run, regenerated on every state change.
.abtree/executions/<id>.svgLive SVG diagram of the run, same trigger.

Individual trees also write workflow-specific files (reports, plans, and so on) — see the tree's own README.

Reference

Next

  • Writing trees — build the bundled hello-world tree from scratch.

MIT licensed