claudex-cli
v0.1.0
Published
Scaffold a super .claude folder for any repo — rules, commands, hooks, agents, teams, and more
Maintainers
Readme
claudex
Scaffold a super .claude folder for any repo in one command — rules, commands, hooks, agents, teams, and more.
Quick Start
npx claudex-cli@latestThat's it. You'll get an interactive setup that creates everything Claude Code needs.
Usage
# Scaffold in current directory (interactive)
npx claudex-cli@latest
# Scaffold in a specific directory
npx claudex-cli@latest ./my-project
# Skip prompts, accept all defaults
npx claudex-cli@latest --yes
# Preview what would be created (no writes)
npx claudex-cli@latest --dry-run
# Overwrite existing files
npx claudex-cli@latest --force
# Minimal setup (rules + commands + settings only)
npx claudex-cli@latest --yes --minimal
# Skip MCP config
npx claudex-cli@latest --yes --no-mcp
# Skip root-level CLAUDE.md files
npx claudex-cli@latest --yes --no-root-files
# Show file tree after scaffolding
npx claudex-cli@latest --yes --print-treeOptions
| Flag | Description |
| ----------------- | -------------------------------------------------------- |
| [targetDir] | Target directory (default: .) |
| -y, --yes | Skip prompts; accept defaults |
| --force | Overwrite existing files without asking |
| --dry-run | Print what would happen; no writes |
| --no-mcp | Skip creating .mcp.json |
| --no-root-files | Skip CLAUDE.md / CLAUDE.local.md in root |
| --minimal | Only settings, rules, commands (no hooks/agents/teams) |
| --print-tree | Print file tree after scaffolding |
| -V, --version | Show version |
| -h, --help | Show help |
What It Creates
your-project/
├── CLAUDE.md # Team project memory
├── CLAUDE.local.md # Personal notes (gitignored)
├── .mcp.json # MCP filesystem server config
└── .claude/
├── README.md
├── settings.json # Shared permissions & hooks
├── settings.local.json # Personal overrides (gitignored)
├── rules/
│ ├── 00-project.md
│ ├── 10-style.md
│ ├── 20-testing.md
│ ├── 30-security.md
│ ├── 40-architecture.md
│ ├── 50-git-prs.md
│ ├── 60-docs.md
│ └── 70-ops.md
├── commands/
│ ├── review-pr.md
│ ├── write-tests.md
│ ├── refactor.md
│ ├── bug-triage.md
│ ├── security-review.md
│ ├── performance.md
│ ├── release-notes.md
│ ├── explain.md
│ └── team.md
├── hooks/
│ ├── pretool_guard.sh # Blocks dangerous commands
│ ├── format.sh # Auto-format after tool use
│ └── test.sh # Run tests after changes
├── agents/
│ ├── backend.md
│ ├── frontend.md
│ ├── data.md
│ ├── devops.md
│ ├── security.md
│ └── teams/
│ ├── orchestrator.md
│ ├── reviewer.md
│ ├── implementer.md
│ ├── tester.md
│ ├── devops.md
│ └── threat-modeler.md
├── teams/
│ ├── TEAM.md
│ ├── engineering.md
│ ├── release.md
│ ├── incident.md
│ └── security.md
├── templates/
│ ├── pr_description.md
│ └── adr.md
└── checklists/
├── release.md
└── incident.mdSafety
- Non-destructive by default: existing files are never overwritten unless you use
--forceor confirm per-file - Idempotent: safe to re-run;
.gitignoreentries are appended only if missing - Dry-run mode: preview everything with
--dry-run - Gitignored secrets:
CLAUDE.local.mdandsettings.local.jsonare automatically added to.gitignore
Conflict Resolution
| Mode | Behavior |
| ------------- | --------------------------------------------- |
| Interactive | Prompt per file: skip / overwrite / overwrite all |
| --yes | Skip conflicting files (safe default) |
| --yes --force | Overwrite everything |
| --dry-run | Report conflicts, write nothing |
Development
# Install dependencies
npm install
# Build
npm run build
# Run locally
node dist/index.js --dry-run
# Link globally for testing
npm link
claudex --help
# Run tests
npm testHow to Publish
# 1. Make sure you're logged in
npm login
# 2. Build
npm run build
# 3. Publish (prepublishOnly runs build automatically)
npm publish
# If using a scoped name (@your-scope/claudex):
npm publish --access publicLicense
MIT
