Skip to content

CLI Reference

Complete reference for the Claude Craft command-line interface.


NPX Installation

The recommended way to install Claude Craft is via NPX:

bash
npx @the-bearded-bear/claude-craft [command] [options]

Available Commands

CommandDescription
installInstall Claude Craft to a project
initInitialize workflow (shows instructions)
flattenGenerate flattened codebase context
ralphRun Ralph Wiggum continuous loop
checkVerify claude-craft installation structure
listDetailed component inventory
doctorEnvironment diagnostics & health check
updateRefresh existing installation
helpShow help message
(no command)Interactive installation wizard

Interactive Wizard

Run without arguments for the interactive wizard:

bash
npx @the-bearded-bear/claude-craft

The wizard will guide you through:

  1. Target directory - Where to install
  2. Technology stack - Which framework(s) to use
  3. Language - Documentation language (en, fr, es, de, pt)
  4. Options - Backup, force overwrite, etc.

Install Command

Basic Usage

bash
npx @the-bearded-bear/claude-craft install <target-directory> [options]

Options

OptionShortDescription
--tech=<technology>-tTechnology stack to install
--lang=<language>-lDocumentation language
--force-fOverwrite existing files
--backup-bCreate backup before install
--dry-run-dSimulate without making changes
--preserve-configKeep existing CLAUDE.md

Technology Options

ValueDescription
symfonySymfony/PHP backend
flutterFlutter/Dart mobile
reactReact frontend
reactnativeReact Native mobile
pythonPython backend
angularAngular frontend
csharpC#/.NET backend
laravelLaravel/PHP backend
vuejsVue.js frontend
phpPHP Clean Architecture
commonCommon rules only
allAll technologies

Language Options

ValueLanguage
enEnglish (default)
frFrench
esSpanish
deGerman
ptPortuguese

Examples

bash
# Install Symfony rules in French
npx @the-bearded-bear/claude-craft install ~/my-project --tech=symfony --lang=fr

# Install multiple technologies
npx @the-bearded-bear/claude-craft install . --tech=react
npx @the-bearded-bear/claude-craft install . --tech=python

# Force reinstall with backup
npx @the-bearded-bear/claude-craft install ~/app --tech=flutter --force --backup

# Dry run to preview changes
npx @the-bearded-bear/claude-craft install . --tech=angular --dry-run

# Install all technologies
npx @the-bearded-bear/claude-craft install ~/project --tech=all --lang=en

Check Command

Verify the structure of a claude-craft installation.

Usage

bash
npx @the-bearded-bear/claude-craft check [target-directory]

Description

Scans the .claude/ directory and reports a summary of installed components: commands (by namespace), agents, references, skills, checklists, and templates.

Examples

bash
# Check current directory
npx @the-bearded-bear/claude-craft check

# Check a specific project
npx @the-bearded-bear/claude-craft check ~/my-project

List Command

Display a detailed inventory of all installed claude-craft components.

Usage

bash
npx @the-bearded-bear/claude-craft list [target-directory]

Description

Lists every installed component grouped by category (commands, agents, skills, references, checklists, templates) with counts and names. Useful for verifying what was installed and comparing across projects.

Examples

bash
# List components in current directory
npx @the-bearded-bear/claude-craft list

# List components in a project
npx @the-bearded-bear/claude-craft list ~/my-project

Doctor Command

Run environment diagnostics and installation health checks.

Usage

bash
npx @the-bearded-bear/claude-craft doctor [target-directory]

Description

Checks the development environment for required and recommended tools:

CheckStatus
Node.js >= 20[OK] / [FAIL]
npm[OK] / [FAIL]
Claude Code[OK] / [WARN]
git[OK] / [FAIL]
yq[OK] / [WARN]
.claude/ structure[OK] / [WARN]
Shell script permissions[OK] / [WARN]
i18n directories[OK] / [WARN]

Examples

bash
# Check current project
npx @the-bearded-bear/claude-craft doctor

# Check a specific project
npx @the-bearded-bear/claude-craft doctor ~/my-project

Update Command

Refresh an existing claude-craft installation by re-running install scripts.

Usage

bash
npx @the-bearded-bear/claude-craft update [target-directory] [options]

Options

OptionDescription
--tech=<technology>Specific technology to update (if omitted, auto-detects from installed references)
--lang=<language>Language override (default: en)

Description

Re-runs install scripts with --force to refresh all files. Common rules are always refreshed first, then tech-specific rules. If --tech is omitted, the command auto-detects installed technologies from .claude/references/.

Examples

bash
# Update all detected technologies
npx @the-bearded-bear/claude-craft update ~/my-project

# Update only React rules in French
npx @the-bearded-bear/claude-craft update ~/my-project --tech=react --lang=fr

# Update current directory
npx @the-bearded-bear/claude-craft update .

Flatten Command

Generate a flattened summary of your codebase for AI assistants.

Usage

bash
npx @the-bearded-bear/claude-craft flatten [options]

Options

OptionDescription
--output=<file>Output filename (default: CODEBASE.md)
--max-tokens=<n>Maximum tokens before sharding
--exclude=<patterns>Additional patterns to exclude

Examples

bash
# Generate flattened codebase
npx @the-bearded-bear/claude-craft flatten

# Custom output file
npx @the-bearded-bear/claude-craft flatten --output=CONTEXT.md

# Limit token count (enables sharding for large codebases)
npx @the-bearded-bear/claude-craft flatten --max-tokens=50000

# Exclude additional directories
npx @the-bearded-bear/claude-craft flatten --exclude="*.test.ts,*.spec.ts"

Output

The flatten command generates:

  • File tree structure
  • Priority-ordered file contents
  • Token estimation
  • Automatic sharding for large projects

Makefile Commands

When you clone the repository, you can use Make for installation.

Installation Commands

bash
# Install specific technology
make install-symfony TARGET=~/project
make install-flutter TARGET=~/project RULES_LANG=fr
make install-react TARGET=~/project OPTIONS="--force"

# Install presets
make install-all TARGET=~/project         # Everything
make install-common TARGET=~/project      # Common rules only
make install-web TARGET=~/project         # React
make install-backend TARGET=~/project     # Symfony + Python
make install-mobile TARGET=~/project      # Flutter + React Native

# Install tools
make install-tools                         # All tools
make install-statusline                    # Custom status line
make install-multiaccount                  # Multi-account manager
make install-projectconfig                 # Project config manager
make install-rtk                           # RTK token optimizer

Dry Run Commands

bash
make dry-run-all TARGET=~/project
make dry-run-symfony TARGET=~/project
make dry-run-flutter TARGET=~/project

Configuration Commands

bash
make config-list                           # List projects in YAML config
make config-validate                       # Validate YAML config
make config-install PROJECT=my-project     # Install from config
make config-install-all                    # Install all from config
make config-dry-run PROJECT=my-project     # Dry run from config

Utility Commands

bash
make help                                  # Show all available commands
make list                                  # List available components
make list-agents                           # List all agents
make list-commands                         # List all commands
make stats                                 # Show statistics
make tree                                  # Show project structure
make fix-permissions                       # Fix script permissions

Migration Commands

bash
make migrate-check                         # Check migration status

Plugin Export

bash
make plugin-export                         # Export as Claude Code plugin
make plugin-export-all                     # Export all technologies

Direct Script Execution

For advanced control, run installation scripts directly.

Syntax

bash
./Dev/scripts/install-{tech}-rules.sh [options] <target-directory>

Available Scripts

ScriptTechnology
install-common-rules.shCommon/transversal
install-symfony-rules.shSymfony
install-flutter-rules.shFlutter
install-react-rules.shReact
install-reactnative-rules.shReact Native
install-python-rules.shPython
install-angular-rules.shAngular
install-csharp-rules.shC#/.NET
install-laravel-rules.shLaravel
install-vuejs-rules.shVue.js
install-php-rules.shPHP

Script Options

OptionDescription
--installFresh installation (default)
--updateUpdate existing files only
--forceOverwrite all files
--preserve-configKeep CLAUDE.md and project context
--dry-runSimulate without changes
--backupCreate backup before changes
--interactiveGuided installation
--lang=XXSet language (en, fr, es, de, pt)
--agents-onlyInstall only agents
--commands-onlyInstall only commands
--rules-onlyInstall only rules
--templates-onlyInstall only templates
--checklists-onlyInstall only checklists

Examples

bash
# Basic installation
./Dev/scripts/install-symfony-rules.sh --lang=fr ~/my-project

# Update existing installation
./Dev/scripts/install-flutter-rules.sh --update ~/my-app

# Force reinstall with backup
./Dev/scripts/install-python-rules.sh --force --backup ~/api

# Interactive mode
./Dev/scripts/install-react-rules.sh --interactive ~/frontend

# Install only agents
./Dev/scripts/install-symfony-rules.sh --agents-only ~/project

Ralph Wiggum CLI

Run Claude in a continuous loop until task completion.

Usage

bash
npx @the-bearded-bear/claude-craft ralph "task description" [options]

Options

OptionDescription
--fullEnable all DoD validators
--max-iterations=<n>Maximum iterations (default: 10)
--dod=<file>Custom DoD configuration file

Examples

bash
# Basic task
npx @the-bearded-bear/claude-craft ralph "Implement user authentication"

# With full DoD checks
npx @the-bearded-bear/claude-craft ralph --full "Fix the login bug"

# Custom iteration limit
npx @the-bearded-bear/claude-craft ralph --max-iterations=20 "Refactor the payment module"

Configuration File

YAML Configuration

For monorepos and multi-project setups, use claude-projects.yaml:

yaml
settings:
  default_lang: "en"

projects:
  - name: "my-monorepo"
    description: "My fullstack application"
    root: "~/Projects/my-monorepo"
    lang: "fr"
    common: true
    modules:
      - path: "frontend"
        tech: react
      - path: "backend"
        tech: symfony
      - path: "mobile"
        tech: flutter
      - path: "api"
        tech: [python, react]  # Multiple technologies

Environment Variables

VariableDescriptionDefault
CLAUDE_CRAFT_LANGDefault languageen
CLAUDE_CRAFT_TARGETDefault target directory.
CLAUDE_CRAFT_CONFIGConfig file pathclaude-projects.yaml

Exit Codes

CodeMeaning
0Success
1General error
2Invalid arguments
3Missing prerequisites
4Target directory not found
5Permission denied

Troubleshooting

NPX cache issues

bash
# Clear NPX cache
npx clear-npx-cache
# or
rm -rf ~/.npm/_npx

Script not executable

bash
chmod +x Dev/scripts/*.sh
# or
make fix-permissions

Wrong yq version

bash
# Claude Craft requires yq v4 (Mike Farah's version)
yq --version
# Should show: yq (https://github.com/mikefarah/yq/) version v4.x.x

See Also