onpush
OnPush CLI

// TODO: write docsDone.

OnPush uses AI agents to explore your codebase and generate comprehensive Markdown documentation. Incremental updates keep everything in sync with every commit.

$npm install -g onpush-cli
Read the documentation →

Open source. Works with Claude Code and GitHub Copilot.

onpush generate --verbose

Generate with onpush generate

One command produces Product Overviews, Architecture docs, API References, Security audits, and more. Choose from 9 built-in document types or define your own.

Stay current with git diff

After the initial generation, OnPush analyzes your git history and incrementally updates only the docs affected by code changes. No stale documentation, ever.

Ship with --ci

Drop OnPush into your GitHub Actions pipeline. Structured exit codes, JSON output, and cost limits (Claude Code only) make it production-ready for any CI/CD workflow.

Set up in seconds with onpush init

The interactive setup wizard walks you through project configuration, AI provider selection, and document type choices. Your settings are stored in .onpush/config.yml — version it with your code.

onpush init
$ onpush init
Welcome to OnPush! Let's set up your project.
? Project name: my-awesome-app
? AI Provider: anthropic
? Model: claude-sonnet
? Output directory: ./docs
✓ Configuration saved to .onpush/config.yml
Run `onpush generate` to create your docs.

Pick your AI, your way --provider

Use Anthropic's Claude or GitHub Copilot as your documentation engine. Bring your own API key, use your existing CLI auth, or connect via environment variables. Switch providers per-run with --provider.

Provider selection
$ onpush generate --provider copilot
OnPush | Provider: copilot
Analyzing repository...
✓ Detected 234 files across 18 directories
Generating documentation...
✓ Product Overview 1.8s
✓ Architecture 3.2s
✓ API Reference 2.9s

Manage doc types with onpush types

A built-in TUI lets you browse, enable, disable, and create custom documentation types. Define target audiences, sections, and guidance to shape exactly what the AI produces.

onpush types
$ onpush types
Document Types:
✓ Product Overview enabled
✓ Architecture enabled
✓ API Reference enabled
✓ Security enabled
✓ Testing enabled
○ Data Model disabled
○ Deployment & Ops disabled
↑↓ navigate · Enter toggle · n new · q quit

Monitor costs with onpush cost

When using Claude Code, every generation run is tracked. View historical cost data, set per-run limits with --cost-limit, and get automatic abort if spending exceeds your threshold. Full transparency, no surprises. Cost tracking is not available with the Copilot provider.

onpush cost
$ onpush cost
Cost History Total: $1.47
─────────────────────────────────────────────────
2025-03-28 14:32 generate $0.12
2025-03-27 09:15 generate --full $0.89
2025-03-25 16:44 generate $0.08
2025-03-24 11:20 generate $0.06
2025-03-22 08:55 generate --full $0.32

Local and remote repos

Document the repo you're in, or point OnPush at any Git URL, GitHub shorthand, or local path. Generate docs for your entire organization from one config.

Works inside your guardrails

OnPush reads your code but never modifies it. Exclude sensitive files with glob patterns. Set cost limits (Claude Code only). Run in CI with structured exit codes for safe automation.

Extensible document types

Beyond the 9 built-in types, create custom document types with specific audiences, sections, and AI guidance. Tailor documentation to your team's exact needs.

Stop writing docs.
Start shipping them.

Install OnPush and generate your first docs in under a minute.

$npm install -g onpush-cli

Resources

Frequently asked questions

Run npm install -g onpush-cli. You'll need Node.js 20+ and either Claude Code or GitHub Copilot CLI installed and authenticated.

Anthropic (Claude) and GitHub Copilot. Configure your provider during onpush init or override per-run with the --provider flag.

9 built-in types: Product Overview, Architecture, API Reference, Business Overview, Security, Testing, Data Model, Deployment & Operations, and Known Issues. You can also create custom types.

OnPush itself is free and open source under the Elastic License 2.0. You only pay for the AI provider usage — Anthropic API costs or your existing Copilot subscription. Cost tracking and limits are only available when using Claude Code as the provider.