Getting Started

Up and running in
5 minutes

pm-cli is a git-native CLI. No database, no server, no signup. Items live in .agents/pm/ right alongside your code.

npm View docs
Latest: v2026.6.17
Prerequisites

What you need

Three things — that's it. If you've been writing Node.js code you likely already have all of them.

🟢

Node.js 20+

Install from nodejs.org or via nvm. pm-cli uses modern ESM and requires Node 20 or higher.

📦

npm or pnpm

Comes bundled with Node.js. Use npm, pnpm, or yarn — whichever you prefer for global installs.

📁

A git repository

pm-cli stores items in your repo. Run git init if you don't have one yet. Any existing repo works immediately.

Installation

Follow along step by step

Seven steps take you from a bare repository to a fully tracked project with history, comments, stats, and agentic planning.

1

Install pm-cli

Install the package globally so the pm command is available everywhere on your system.

Install
$ npm install -g @unbrained/pm-cli
added 1 package in 3s
Verify
$ pm --version
2026.6.17
2

Initialize your workspace

Inside your git repository, run pm init. It creates the .agents/pm/ directory structure and a default config — zero prompts, zero fuss.

Initialize
$ pm init
✓ initialized .agents/pm/ — ready to track work
.agents/pm/items/
.agents/pm/history/
.agents/pm/config.json
✓ added .agents/pm/ to .gitignore exceptions

Tip: Commit the .agents/pm/ folder just like you commit your code. Every team member and AI agent gets a shared, version-controlled view of your project items.

3

Create your first item

Create a work item with a type, title, and priority. pm-cli supports 11 built-in types — Chore, Decision, Epic, Event, Feature, and more.

Create a task
# --type, --title, and --priority are the most common flags
$ pm create --type Task --title "Ship dark mode" --priority 1
item created — id: pm-abc123
type: Task
title: Ship dark mode
priority: 1
status: open
4

List and find work

Three commands cover most day-to-day browsing: pm list-open for a quick table, pm context for an AI-optimized snapshot, and pm search for keyword or semantic lookup.

List open items
$ pm list-open
pm-abc123 Task p1 open Ship dark mode
AI context snapshot (token-efficient)
$ pm context
project: my-project items: 1 open: 1 in_progress: 0
pm-abc123 Task p1 open Ship dark mode
Search by keyword
$ pm search "dark mode"
1 match
pm-abc123 Task p1 open Ship dark mode
5

Claim and work

pm start-task claims an item and moves it to in_progress — preventing double-work when multiple agents or developers are active. Add comments to capture progress notes as you go.

Start working on an item
$ pm start-task pm-abc123
✓ claimed pm-abc123 → in_progress
Add a progress comment
$ pm comments pm-abc123 "Working on the CSS variables"
✓ comment added
6

Plan agentic workflows New

pm plan is purpose-built for coding agents and AI-driven workflows. Create a structured plan with ordered steps, link dependencies between items, and materialize steps into real work items — all in a deterministic, scriptable way. Agents can use pm plan approve <id> to gate execution until a human signs off.

Create a plan
# Create a plan — returns a plan ID
$ pm plan --title "Refactor auth module"
plan created — id: pm-plan-d4e5f6
title: Refactor auth module
status: draft
Add steps and approve
# Add steps to the plan
$ pm plan step pm-plan-d4e5f6 --title "Extract JWT helpers"
✓ step added — step.1
$ pm plan step pm-plan-d4e5f6 --title "Write unit tests"
✓ step added — step.2
# Approve — gates agent execution until a human confirms
$ pm plan approve pm-plan-d4e5f6
✓ plan approved — ready for agent materialization
# Materialize steps into real pm items
$ pm plan materialize pm-plan-d4e5f6
✓ 2 items created from plan steps

Tip for agents: Use pm plan at the start of a task to decompose work into auditable steps. The approve gate lets a human review the plan before any items are materialized — preventing runaway agent execution.

7

Close and track

Close work with a resolution note — that note lands in the append-only history log. Then run pm stats to see project-level metrics.

Close with a resolution note
$ pm close-task pm-abc123 "Shipped in v2.3.0"
✓ pm-abc123 closed — recorded in .agents/pm/history/
View project stats
$ pm stats
total: 1 open: 0 in_progress: 0 closed: 1
types: Task ×1
✓ all items accounted for

You're done. That's the complete workflow. Every step — create, claim, comment, close — is preserved as an RFC6902 patch in .agents/pm/history/. Nothing is ever lost.

Concepts

Key concepts to know

A handful of ideas underpin everything pm-cli does — understand these and the whole CLI clicks into place.

📁

.agents/pm/ Storage

Items live as JSONL files inside your repository — fully version-controlled, no external database, no credentials to manage. git diff and git log work on your project data too.

🏷️

Item Types

11 built-in types: Chore, Decision, Epic, Event, Feature, Issue, Meeting, Milestone, Plan, Reminder, Task. Each type has its own option policies and smart defaults. Custom types via config or extensions.

🔄

Status Flow

Items move through a clear lifecycle: draftopenin_progressclosed or canceled. A blocked status is also available for items waiting on external work.

🖨️

TOON Output

Token-Optimized Object Notation — a sparse output format designed for AI agents. Only changed fields are emitted, keeping LLM context windows lean without sacrificing readability. Machine contracts available via pm contracts --json.

📜

Append-only History

Every change is recorded as an RFC6902 JSON patch in .agents/pm/history/ — full audit trail with content hashes and timestamps. The log never loses data and supports full state replay.

🔌

Extension System

9 capability types to extend pm-cli: custom commands, schemas, hooks, importers, renderers, search providers, preflights, services, and command flags. Publish and install extensions with a single command.

Quick Reference

Essential commands

The ten commands you'll use on every project. For the full 96+ command reference, visit the commands page.

Command Description
pm init Initialize workspace — creates .agents/pm/ in your repo
pm create Create a new item with type, title, priority, and more
pm list List active items with optional filters by type, status, priority
pm context AI-optimized context snapshot — sparse, token-efficient project state
pm search <terms> Search items by keyword (or semantic with an extension)
pm start-task <id> Claim an item and move it to in_progress
pm close-task <id> <reason> Complete and close an item with a resolution note
pm update <id> Update any field on an existing item
pm comments <id> Add a comment or view the comment thread on an item
pm history <id> View the full change history for an item as RFC6902 patches
pm plan New Create structured agentic plans with steps, approval gates, and materialization into items
pm package New Install, manage, and explore pm packages — the preferred replacement for pm extension