M
Modular Chunks
Sign inGet Started
Back to home
/ CLI

The Chunky CLI

Drive the chunk-by-chunk build with the modular-chunks-cli. Currently version 0.13. Run chunky start for a guided flow, or use individual commands for fine-grained control.

Run chunky start to go from idea or codebase to buildable chunks in one guided flow. Or use individual commands for fine-grained control over each pipeline stage.

STEP 1

·

Install the CLI

Install globally via npm. Requires Node.js 18+.

bash

npm install -g modular-chunks-cli

Or run without installing: npx modular-chunks-cli init

STEP 2

·

Create or log in to your account

New users: run chunky signup to create an account directly from the terminal. Returning users: run chunky login.

bash

# New user
chunky signup

# Returning user
chunky login

# Verify who you're logged in as
chunky whoami

STEP 3

·

Start the guided wizard (recommended)

The fastest way to get started. One command that walks you through scanning, auditing, and generating blueprints — whether you have an existing codebase or a brand new idea.

bash

chunky start

The wizard runs the full pipeline in order:

02 Brief03 Architecture03b PRD04 Design Intake (UI kit prompt — hard gate, mirrors the platform) → 05 Blueprint.

New idea? Describe what you want to build, pick a tech stack, pick a UI kit, and get chunk blueprints with design instructions baked in.

Existing codebase? Scan your code, run an AI audit, review findings, and generate fix blueprints — design intake still applies.

After chunks are generated, 19 MCP tools auto-register for Claude Code, Cursor, and Windsurf so your AI agent can pick up chunks one at a time.

The steps below are for manual control. If you ran chunky start, these are handled automatically.

STEP 4

·

Upload an existing codebase (optional)

Already have a project? Upload it to the platform and get auto-generated briefs, architecture, and blueprints. Works with any codebase — the CLI detects your stack, frameworks, databases, and dependencies automatically.

bash

# Upload current directory to a new project
chunky upload

# Upload with a project name (skips the prompt)
chunky upload --name "My SaaS App"

# Upload snapshot only — configure on the web later
chunky upload --skip-brief

Upload goals

During upload you can choose a goal: full (analyse everything), extend (build new features on top), audit (improve what exists), or upload-only (just push the snapshot).

STEP 5

·

Connect to your project

Run chunky init inside your project directory. It will prompt for your platform URL, project ID, and API token.

bash

chunky init

Get your project ID and API token from the platform:

Sign in to the platform, open the in-app CLI Token settings, copy the token and your project ID, then paste them into the chunky init prompts.

bash

# Or set values directly without the prompt
chunky config set platformUrl https://your-app.vercel.app
chunky config set projectId <your-project-id>
chunky config set apiToken <your-token>

STEP 6

·

Run the planning pipeline

Run the full intake pipeline to go from idea to approved chunk blueprints, or step through each phase individually.

bash

# Full pipeline: intake → brief → architecture → blueprint
chunky intake

# Or step through individually
chunky brief          # Refine the project brief
chunky arch           # Refine the architecture
chunky blueprint generate   # Generate chunk blueprints
chunky blueprint list       # Review blueprints
chunky blueprint approve    # Approve interactively

STEP 7

·

Build chunks and validate

Pull your approved chunk blueprints from the platform, then build them one by one — or hand the entire loop to autopilot.

bash

# Pull latest blueprints from the platform
chunky pull

# See all chunks and their status
chunky status

# Show the next chunk to build
chunky next

# Show the full prompt for a specific chunk
chunky show "Auth Service"

# Validate built output against the chunk contract
chunky validate

# Sync validation results back to the platform
chunky sync

Autopilot mode — run the entire build loop unattended:

bash

# Runs all chunks, validates, syncs — no manual steps
chunky autopilot

# With options
chunky autopilot --sync --max-retries 5 --slack --autonomous

--sync auto-syncs each PASS · --slack sends a notification when retries are exceeded · --autonomous pre-approves all Claude Code tool calls

STEP 8

·

Launch and deploy

Once chunks are validated, run the launch and deploy analysis.

bash

# Gap analysis, deployment config, and launch brief
chunky launch

# Deployment readiness checklist for your platform
chunky deploy --platform vercel
chunky deploy --platform railway
chunky deploy --platform fly

# Approve any gap chunks added by launch
chunky approve --all

Command reference

Account

chunky signup

Create a Modular Chunks account from the terminal.

chunky login

Log in to your Modular Chunks account.

chunky logout

Log out of your current session.

chunky whoami

Show the currently logged-in account.

Getting started

chunky start

Guided setup wizard — new idea or existing codebase. Generates Brief → Architecture → PRD → Design Intake (UI kit prompt, hard gate) → Blueprint, with codebase grounding and per-chunk validation. v0.13+.

chunky init

Connect to a project. Shows existing projects to continue or switch, create new, or link by API key. Supports multi-project workflows.

chunky upload

Upload an existing codebase to a new or existing project. Detects stack, frameworks, databases. Flags: --name, --skip-brief.

Pipeline

chunky pull

Pull latest approved blueprints from the platform.

chunky status

Show all chunks and their current validation status.

chunky next

Show the next chunk that needs to be built.

chunky show <chunk>

Print the full prompt for a specific chunk (by name, number, or ID).

chunky validate [chunk]

Validate built output against the chunk contract. Flags: --skip-tsc, --dir.

chunky sync [chunk]

Sync validation results back to the platform.

chunky serve

Start the MCP stdio server. 19 tools auto-registered on `chunky init` for Claude Code, Cursor, and Windsurf — no manual MCP config required.

chunky autopilot

Autonomous build loop — all chunks, validate, sync. Flags: --sync, --max-retries, --slack, --autonomous.

chunky prebuild [chunk]

Pre-execution reasoning pass — grounds the next chunk in your actual files (imports, types, naming) before any AI writes code. Reduces hallucinated cross-chunk references.

Planning

chunky intake

Run the full upstream pipeline: intake → brief → architecture → blueprint.

chunky brief

Review and refine the project brief interactively.

chunky arch

Review and refine the project architecture (alias: chunky architecture).

chunky blueprint generate

Generate chunk blueprints from the brief and architecture. Flag: --from-audit (target audit findings).

chunky blueprint list

List all chunk blueprints.

chunky blueprint approve [id]

Approve chunk blueprints interactively (or a specific blueprint by ID). Use --all to approve all at once.

chunky blueprint audit

Audit for missing chunks (setup, frontend, SDK, devops) and add them without restarting.

chunky blueprint delete [ref]

Delete chunks by number, name, or ID. Without args: interactive multi-select.

Build management

chunky context

Show active context: guideline, playbook, review, brief, architecture, chunks.

chunky log [decision]

Log a decision to user-log.md — injected into all future chunk prompts. --chunk to scope it.

chunky log list

Show all logged user decisions.

chunky assembly

Show assembly session state and chunk validation summary.

chunky approve [chunk]

Approve chunks from the terminal. Flags: --all (approve all), --list (show status).

chunky checkpoint [message]

Save a named checkpoint for crash recovery. Flags: --pivot, --files.

chunky resume

Reconstruct session context after a crash and print a Resume Brief. Flag: --from-platform.

chunky reset [stage]

Reset pipeline stages: brief, architecture, blueprint, session, or all.

chunky roadmap

Show the feature roadmap — what's ready, what's blocked, and the prerequisites needed to unlock blocked features.

Quality

chunky review create

Create a new code review guideline via interactive wizard.

chunky review list

List all saved code review guidelines.

chunky review use <id>

Set a review guideline as active.

chunky review edit <id>

Edit a review guideline.

chunky review run [chunkId]

Run a code review checklist interactively.

chunky audit init

Scan the local codebase and show a stack summary (dry run — nothing is sent).

chunky audit push

Push a codebase snapshot and generate an AI audit report. Flag: --focus to target a specific area (e.g. security, payments).

chunky audit status

Show the latest audit report for this project.

chunky audit ui

UI-specific audit — finds disconnected routes, missing pages, design issues, and error-handling gaps in the frontend.

chunky audit chunks

Audit existing chunks against the actual codebase — finds duplicates, disconnected, and irrelevant chunks before they ship.

chunky audit wiring

Post-build wiring audit — finds disconnected API routes, orphan pages, unused components, and generates focused wiring chunks to reconnect them.

chunky debug [chunk]

Triage a stuck issue and generate a focused agent prompt. Flag: --inject.

Delivery

chunky launch

Gap analysis, deployment config, and launch brief. Flags: --tier mvp|saas|enterprise, --dir.

chunky deploy

Deployment readiness checklist and interactive Q&A. Flags: --platform vercel|railway|render|fly|docker, --no-qa.

AI tools

chunky council [member]

Chat with a Chunky Council advisor: cto, product, qa, devops, or security.

chunky ideate

Brainstorm a new feature, requirement, chunk, or skill with the AI; the platform records it in the right place (PRD, blueprint, skill library) for downstream stages to pick up.

chunky assistant

Interactive AI DevOps assistant. Supports multiple providers. Flags: --provider claude|openai|gemini|ollama, --model.

chunky ui

Launch a local web dashboard — build status, council chat, and debug. Flag: --port (default: 3131).

chunky tui

Interactive terminal dashboard — navigate chunks, view details, and track session state.

chunky setup [agent]

Configure a coding tool for Chunky: cursor, copilot, windsurf, aider, claude, cline, or junie.

chunky extension [sub]

Manage the Chunky VS Code extension — install, build, or open for development.

Standards

chunky guideline create

Create a new engineering guideline via interactive wizard.

chunky guideline list

List all saved guidelines.

chunky guideline show <id>

Show details for a guideline.

chunky guideline use <id>

Set a guideline as active for all chunk prompts.

chunky guideline edit <id>

Edit a guideline.

chunky playbook create

Create a new domain playbook via interactive wizard.

chunky playbook list

List all saved playbooks.

chunky playbook show <id>

Show details for a playbook.

chunky playbook use <id>

Set a playbook as active for all chunk prompts.

chunky playbook edit <id>

Edit a playbook.

chunky skills list

List all skills across all chunks (deduplicated).

chunky skills scan [chunkId]

Scan chunks for AI-suggested skills from the platform.

chunky skills apply <id> [chunkId]

Apply a skill to a chunk.

Config

chunky config set <key> <value>

Set a config value: platformUrl, projectId, apiToken.

chunky config show

Show current CLI configuration.

chunky --version

Print the installed CLI version.

Environment variables

CHUNKY_TOKEN

Auth token — alternative to running chunky login.

CHUNKY_PROJECT_ID

Override the active project ID (useful in CI pipelines).

ANTHROPIC_API_KEY

Required by Claude Code for chunk execution. Also used by chunky assistant --provider claude.

OPENAI_API_KEY

Used by chunky assistant --provider openai (GPT models).

GEMINI_API_KEY

Used by chunky assistant --provider gemini (Google Gemini models).

OLLAMA_HOST

Ollama server URL for chunky assistant --provider ollama (default: localhost:11434).

CHUNKY_DEBUG=1

Enable verbose logging for troubleshooting.