Motir

The Motir CLI

Install it, sign in, point it at your project, and hand one work item to your own coding agent — in about five minutes, without cloning anything.

Before you start

A Motir account, and Node >=22. That is the list. You do not need a checkout of Motir itself, and you do not need to mint a token by hand — step 2 signs you in from the terminal.

1Install

Motir ships as a global npm package. pnpm add -g and yarn global add install the same thing. Runtime: Node >=22, ESM.

install
npm install -g @motir/cli
motir --help

2Sign in

motir login prints a short code, opens Motir in your browser, and waits for you to approve it there. Nothing has to exist on this machine first — no token to mint, no file to create.

sign in
motir login
No browser on this box — an SSH session, a container? The code and the URL are printed either way: open the URL on any device and enter the code. For an unattended agent set MOTIR_TOKEN instead, and there is no login step and no file at all.

4Check it

One read-only pass that answers *is my setup correct?* before a dispatch stops halfway through — your credential, the link, the project, your agent binary and its own sign-in.

preflight
motir doctor

It exits non-zero when a hard check fails, so motir doctor && motir auto is a usable gate, and --json emits the same report machine-readably. It never reads your secret: the credential checks ask only whether a path exists or an env var is set.

5See what is ready

Get your bearings before you pick anything up: where the project stands, what the current sprint holds, and what can actually start right now.

read
motir status      # ready / in-flight counts + the active sprint
motir sprint      # the active sprint, and what blocks what
motir ready       # what can be picked up right now

motir sprint and motir ready print dependency edges in their own columns, so you can see which item unblocks the most before choosing one.

6Dispatch one item

Read the card first. motir show gives you the whole thing — its fields, its readiness, its dependency edges and, for a story, its children in build order. That is where you notice the item assumes something that does not exist yet.

dispatch
motir show MOTIR-42       # the item you are about to hand an agent
motir next --print        # claim the top item, print its prompt

--print writes the prompt to stdout and everything else — the repo, the resolved path, the workflow mode — to stderr, so motir next --print | pbcopy copies the prompt alone while you still see the context. Paste it into whatever agent you like. When its pull request is merged, close the item out:

close out
motir done --via in_review MOTIR-42
Want Motir to launch the agent for you? motir next --agent "<your agent command>" runs it on the prompt, and motir auto drains the whole ready set unattended. Motir is BYOK: you bring your own agent and your own model key, and Motir never reads either.
A card the CLI dispatched lands at Implemented, not In Review: the code is committed, pushed and its pull request is open, and nothing has compiled it yet. CI moves it to In Review when the checks on that commit go green — server-side, minutes after your terminal has exited, with nothing to wait for locally. A red build leaves the card at Implemented with a comment naming the failed check; push a fix to the same branch and the card promotes itself. Merging closes it — and for a motir auto run, one merge closes every card that branch carries.

Where Motir keeps things

Motir keeps exactly two files, and only one of them holds a secret.

files

Path
~/.config/motir/config.json
What it holds
Secret — never commit. The credential store, chmod 600 inside a 0700 directory, keyed by server URL.
Path
.motir.json (workspace root)
What it holds
No secret — safe to commit. The link: server, workspace, project, and the optional repo checkout-path overrides.

The CLI talks to https://app.motir.co unless you tell it otherwise. Self-hosting? --server <url> beats everything on any command, and motir help environment prints the whole resolution ladder from the shipped code.

Every command

Derived from the CLI’s own command record, so a command the tool gains appears here with no edit to this page. Run motir help <command> for its flags.

setup

Command
motir login
What it does
Connect this terminal: shows a code, opens Motir, waits for your approval.
Command
motir logout
What it does
Disconnect this terminal: remove the stored token for a server.
Command
motir auth
What it does
Authenticate to a Motir server with a PAT.
Command
motir auth login
What it does
Validate and store a personal access token for a server.
Command
motir auth status
What it does
Show the resolved server, token prefix, and owning user.
Command
motir auth logout
What it does
Remove the stored token for a server.
Command
motir link
What it does
Bind this workspace-root folder to a project, and clone the repositories it is missing.
Command
motir link add <repo> <path>
What it does
Add a repo checkout-path override (relative to the link root, or absolute).
Command
motir link remove <repo>
What it does
Remove a repo checkout-path override.
Command
motir doctor
What it does
Preflight your BYOK setup: auth, project link, agent binary, credential presence.

read

Command
motir ready
What it does
List the linked project’s ready set (every dependency satisfied).
Command
motir status
What it does
Show the project pulse: ready / in-flight counts + the active sprint.
Command
motir sprints
What it does
List the project’s sprints: state, item count, points, window.
Command
motir sprint [ref]
What it does
List ONE sprint’s work items (defaults to the active sprint).
Command
motir show <key>
What it does
Read one work item (e.g. ACME-7): fields, readiness, children, edges, body.
Command
motir open <key>
What it does
Open a work item (e.g. ACME-7) in the browser; prints the URL.

work loop

Command
motir next
What it does
Dispatch the next ready work item: claim it and deliver its prompt.
Command
motir run <scope>
What it does
Run a scope: one work item, a whole story, or sprint for the active one.
Command
motir auto
What it does
Drain the ready set unattended: one item at a time onto a session branch.
Command
motir batch
What it does
Implement a FROZEN snapshot of the ready set: one pull request per item.
Command
motir plan [args...]
What it does
Plan by talking: resume the project’s planning conversation, add turns, submit.
Command
motir done [key]
What it does
Close out a merged item — or a whole merged session branch.

help

Command
motir help [command...]
What it does
Show help for a command, or read a help topic.

What next

You have a working CLI and one item dispatched. Three places to go from here, and each owns something this page deliberately does not.

hand-offs

Read this
docs/cli.md
For
The reference: every flag, the three run shapes, session branches, the failure policy, agent wiring, troubleshooting.
Read this
The agent sandbox guide
For
Running an agent unattended inside a confined container, so a loop cannot reach the rest of your machine.
Read this
The API reference
For
Driving Motir over HTTP instead of from a terminal — the same work loop, as /api/v1.

Next: Agent sandbox · API reference · Getting started