planmode

CLI Reference

planmode install

planmode install <package> [--version <ver>] [--rule] [--no-input] [--set key=value...]

Install a package into the current project.

Arguments

  • <package> — package name (e.g., nextjs-tailwind-starter or @mycompany/deploy)
  • --version <ver> / -v <ver> — install specific version (default: latest)
  • --rule — force install as a rule to .claude/rules/
  • --no-input — fail if any required variable is missing (no interactive prompts)
  • --set key=value — set template variables (e.g., --set project_name=myapp)

File placement

  • rule.claude/rules/<name>.md
  • planplans/<name>.md + @import in CLAUDE.md
  • promptprompts/<name>.md

Example

planmode install nextjs-tailwind-starter
planmode install nextjs-tailwind-starter --set project_name=myapp
planmode install typescript-strict@^1.0.0
planmode install @mycompany/deploy-playbook -v 2.0.0

planmode uninstall

planmode uninstall <package>

Remove an installed package. Removes the file, updates CLAUDE.md and planmode.lock. Dependencies shared with other packages are kept.

planmode search <query> [--type <type>] [--category <cat>] [--json]

Search the registry by name, description, tags, or author.

Flags

  • --type <type> — filter by type: prompt, rule, plan
  • --category <cat> — filter by category
  • --json — output as JSON

Example

planmode search nextjs
planmode search auth --type plan
planmode search docker --category devops --json

planmode run

planmode run <prompt> [--var value...] [--no-input] [--json]

Render a templated prompt and output to stdout.

Flags

  • --no-input — fail if any required variable is missing
  • --json — output as JSON

Example

# Render and print to stdout
planmode run weather-image --location "Tokyo" --style watercolor

# Pipe into Claude Code
planmode run rest-api-generator --resource users | claude

# Interactive — prompts for missing variables
planmode run weather-image

planmode publish

planmode publish

Publish the current directory as a package. Reads planmode.yaml, validates it, creates a git tag, forks the registry repo, and opens a PR.

Requirements

  • GitHub auth configured (planmode login)
  • Current directory is a git repo with a remote
  • planmode.yaml is present and valid

planmode update

planmode update [package]

Update installed packages to the latest compatible versions. If no package is specified, updates all.

planmode list

planmode list

List all installed packages from planmode.lock with their type, version, and file location.

planmode info

planmode info <package>

Show detailed metadata for a package: description, author, license, versions, dependencies, variables, and download count.

planmode init

planmode init

Initialize a new package in the current directory. Interactively prompts for name, type, description, author, license, tags, and category. Creates planmode.yaml and a stub content file.

planmode login

planmode login [--token <token>] [--gh]

Configure GitHub authentication for publishing and private packages.

Flags

  • --token <token> — store the token directly
  • --gh — read token from gh auth token (GitHub CLI)

Tokens are stored in ~/.planmode/config. You can also set the PLANMODE_GITHUB_TOKEN environment variable.

planmode doctor

planmode doctor

Check project health. Verifies that all installed packages have matching files on disk, CLAUDE.md imports are correct, content hashes haven't drifted, and there are no orphaned files.

What it checks

  • Every lockfile entry has a corresponding file on disk
  • Content hashes match (detects local modifications)
  • Every installed plan has an @import in CLAUDE.md
  • Every CLAUDE.md import points to an existing file
  • Untracked files in plans/

planmode test

planmode test

Test the current package before publishing. Run this in a directory with a planmode.yaml to validate everything is ready.

What it checks

  • Manifest parses and passes all validation rules
  • All fields required for publishing are present
  • Content file exists and is non-empty
  • Templates render successfully with default variable values
  • Declared dependencies exist in the registry
  • Content size is reasonable (warns above 100KB)

Example

# In a directory with planmode.yaml
planmode test

# Fix any errors, then publish
planmode publish

planmode mcp

planmode mcp setup
planmode mcp remove

Register or remove the Planmode MCP server with Claude Code. Once registered, Claude can search, install, preview, and manage packages directly from your conversations — no terminal needed.

Subcommands

  • setup — register the planmode MCP server with Claude Code
  • remove — remove the planmode MCP server from Claude Code

Example

# Register (one-time setup)
planmode mcp setup

# Or register manually
claude mcp add --transport stdio planmode -- planmode-mcp

After setup, Claude Code gains access to all planmode tools: planmode_search, planmode_install, planmode_preview, planmode_read, planmode_doctor, planmode_test, and more.