Use from your shell
Two different tools share the name marrow — pick by what you’re doing:
marrow-setup(run vianpx, nothing installed) wires Marrow into an AI agent over MCP. See Use with AI agents.@marrowdev/cli(installed on yourPATH) is for using Marrow straight from your shell — terminals, scripts, CI, and bash-style agents.
This page is the second one.
Install
Section titled “Install”npm i -g @marrowdev/cli # or: bun add -g @marrowdev/climarrow --helpAuthentication — you probably already have it
Section titled “Authentication — you probably already have it”If you’ve ever set Marrow up in an agent with marrow-setup, your key is already in ~/.config/marrow/config.json — and the CLI reads the same file. There’s nothing to log in to. Just check:
marrow usageNo key yet? Get a free one (no card, idempotent) — this also wires up any agents you have:
npx -y marrow-setup --email you@example.comAlready have a key but it isn’t saved? Either of these:
marrow login --api-key mrw_xxx # writes ~/.config/marrow/config.jsonexport MARROW_API_KEY=mrw_xxx # or just this, per shellResolution order: --api-key flag → MARROW_API_KEY → saved config.
Commands
Section titled “Commands”marrow https://astro.build # shortcut for: marrow readmarrow read <url> --md # clean markdownmarrow read <url> --change-tracking # section-level diff vs your last readmarrow scout <url> # links + structure (cheap; scout→read saves tokens)marrow search "rust async runtime" --limit 5marrow crawl <url> --limit 10 --max-depth 2 # site → pagesmarrow screenshot <url> -o shot.png # full-page PNG (writes a file)marrow usage --md # plan, credits, daily rate, monitorsMonitoring is the same flat-rate watch you get in the agent — frequency is free:
marrow monitor create <url> --interval 30 --webhook https://you/hookmarrow monitor listmarrow monitor run <id>marrow monitor delete <id>Every command goes through the same billed API as the MCP server — there’s no separate path. Failed requests cost nothing; a cache hit costs ~0.1 credit.
Output
Section titled “Output”By default the CLI emits Flux NDJSON — one compact JSON object per line ({v, source, type, event, …}) — so it pipes cleanly into jq and other tools. Add --md for markdown, or -o FILE to write to a file.
marrow usage# {"v":1,"source":"marrow","type":"usage","event":"reported","plan":"free",...}
marrow scout https://astro.build | jq -r 'select(.type=="link") | .url'| command | signal |
|---|---|
read, crawl | doc:fetched |
scout | link:found |
search | result:found |
read --change-tracking, monitor run | chunk:{added,modified,moved,removed} + diff:completed |
usage | usage:reported |
screenshot returns a binary PNG, so it writes a file (-o, or an auto-named marrow-shot-<host>-<ts>.png) instead of NDJSON.
Teach your agent to use it (skill)
Section titled “Teach your agent to use it (skill)”Working through a shell-first agent (Claude Code, hsh-bash)? Add a skill so it reaches for
marrow on its own — the CLI counterpart of the scout → read → watch skill that
marrow-setup installs for MCP. A one-command installer will come later; for now, drop the
file in by hand. For Claude Code, save it as ~/.claude/skills/marrow-cli/SKILL.md:
---name: marrow-clidescription: Efficient web research, change tracking and monitoring from the shell via the `marrow` CLI — scout before reading to save tokens, get section-level diffs on re-read, and watch pages flat-rate. Use when the marrow CLI is on PATH and you're working through bash.---
# Marrow CLI: scout → read → watch (from the shell)
Use the `marrow` CLI for web work when you're running shell commands. It prints Flux NDJSONby default (pipe into `jq`); add `--md` for markdown. Auth comes from`~/.config/marrow/config.json` or `MARROW_API_KEY` — if `marrow usage` works, you're set.
## 1. scout, then read- `marrow scout <url>` — links + structure, cheap. List URLs: `marrow scout <url> | jq -r 'select(.type=="link") | .url'`- `marrow read <url> --md` — clean markdown. Let scout narrow first; don't dump whole sites.- Re-reads are cache-hits (~free).
## 2. "What changed?"`marrow read <url> --change-tracking` — section-level diff vs your last read (`chunk:*` +`diff:completed`), not the whole body. The diff rides free.
## 3. "Watch this"`marrow monitor create <url> [--interval N] [--webhook URL]` · `list` · `run <id>` · `delete <id>`.Billed flat — frequency is free.
Other: `marrow search "<q>" --limit N` · `marrow crawl <url> --limit N` ·`marrow screenshot <url> -o shot.png` · `marrow usage --md`.
Why: scouting saves tokens, change tracking returns just the delta, monitoring is flat-rate.Failed requests cost nothing; cache hits ~0.1 credit.CLI or MCP?
Section titled “CLI or MCP?”Same capabilities, different door. If you’re inside an AI agent with the MCP server, just talk to it — see Use with AI agents. If you live in a shell, a CI pipeline, or a Flux-native shell, reach for the CLI. Use whichever fits; they read the same key.