Package Exports
- @claudetools/cli
- @claudetools/cli/dist/cli.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@claudetools/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ClaudeTools CLI
A command-line toolkit for AI-assisted project onboarding and documentation generation. ClaudeTools automatically detects your tech stack, generates comprehensive documentation, and creates context files that help AI agents like Claude Code understand your codebase.
Key features:
- Dynamic AI questions — Only one hardcoded question; all follow-ups are generated by AI based on your project
- Live version fetching — Fetches latest package versions from npm, never recommends outdated dependencies
- Compatibility checking — Validates peer dependencies to ensure packages work together
- New project scaffolding — Bootstrap projects with current, compatible tech stacks
Installation
npm install -g @claudetools/cliRequirements:
- Node.js 18.0.0 or higher
- Optional: Claude CLI for AI-powered analysis
- Optional: mcp-cli for Context7 documentation fetching
Quick Start
# Navigate to your project
cd my-project
# Run the onboarding wizard
claudetools onboardThat's it. ClaudeTools will analyze your project, ask a few questions, and generate everything needed for AI-assisted development.
Commands
claudetools onboard
The primary command. Runs a 4-phase onboarding workflow that analyzes your project and generates comprehensive AI context.
claudetools onboard [options]Options:
| Flag | Description |
|---|---|
-r, --refresh |
Re-fetch and regenerate all documentation |
--skip-docs |
Skip documentation generation (faster) |
--verbose |
Show detailed output |
--no-update |
Skip auto-update check |
Examples:
# Standard onboarding
claudetools onboard
# Refresh existing documentation
claudetools onboard --refresh
# Quick run without docs
claudetools onboard --skip-docsclaudetools init
Minimal setup that creates the .claude/ directory structure without the full onboarding process.
claudetools initclaudetools cleanup
Removes legacy configuration files from previous versions.
claudetools cleanupGlobal Options
claudetools --version # Show version and check for updates
claudetools --help # Show help messageHow It Works
Phase 1: Stack Detection
ClaudeTools scans your project for manifest files and automatically detects:
- Package Managers: npm, pnpm, yarn, bun, pip, poetry, go modules, cargo
- Frameworks: React, Vue, Next.js, Nuxt, Astro, Express, FastAPI, NestJS, and 25+ more
- Libraries: Database (Prisma, Drizzle), State Management (Zustand, Redux), UI Components (Radix, shadcn/ui), and 40+ categories
- Dev Tools: TypeScript, ESLint, Prettier, Vitest, Jest, Playwright
Supported manifest files:
package.json(JavaScript/TypeScript)requirements.txt,pyproject.toml(Python)go.mod(Go)Cargo.toml(Rust)
Phase 2: Quick Questions
Only one question is hardcoded:
- "What do you want to build?" — Brief project description (required for new projects)
All follow-up questions are dynamically generated by AI based on your description. The AI analyzes what you want to build and asks targeted questions about:
- Technical decisions (database, auth, deployment)
- Constraints (team size, timeline, integrations)
- Project-specific requirements
This means every project gets questions tailored to its needs — no generic checklists.
Phase 3: AI Analysis & Proposal
If the Claude CLI is installed, ClaudeTools uses it to:
- Analyze your codebase and generate a stack summary
- Fetch latest package versions from npm registry in real-time
- Check compatibility via peer dependencies to ensure packages work together
- Propose a configuration with current, compatible versions
- Accept feedback and refine the proposal iteratively
For new/empty projects, it will:
- Fetch current versions of popular frameworks from npm (React, Next.js, Vue, etc.)
- Recommend a complete tech stack using the latest stable versions
- Verify compatibility between packages via peer dependency checking
- Offer to scaffold the project (create
package.json, install dependencies)
Approval workflow:
┌─ Proposed Configuration ────────────────
│
│ A task management CLI with local storage
│
│ Frameworks: commander, ink
│ Libraries: chalk, conf, ora
│ Dev Tools: typescript, vitest, tsup
│ Architecture: CLI with command pattern
│
│ Recommendations:
│ • Use commander for argument parsing
│ • Store data in ~/.config with conf
│ • Add --json flag for scriptability
│
└──────────────────────────────────────────
? How does this look?
❯ Looks good, proceed
I have feedback
Skip AI analysisPhase 4: Documentation Generation
ClaudeTools generates comprehensive documentation:
- Fetches official docs via Context7 MCP for all detected libraries
- Creates organized documentation in
.claudetools/docs/ - Generates AGENTS.md — the primary AI context file
Output Structure
After running claudetools onboard, your project will have:
project-root/
├── AGENTS.md # Primary AI context file
├── .claude/
│ └── CLAUDE.md # Pointer to AGENTS.md
└── .claudetools/
└── docs/
├── index.md # Documentation hub
├── architecture/
│ ├── index.md
│ ├── system-design.md
│ ├── data-flow.md
│ └── components.md
├── api/
│ ├── index.md
│ └── endpoints.md
├── guides/
│ ├── getting-started.md
│ ├── development.md
│ └── contributing.md
├── reference/
│ ├── configuration.md
│ └── environment.md
├── patterns/
│ ├── coding-standards.md
│ └── naming-conventions.md
├── testing/
│ └── strategy.md
├── deployment/
│ └── environments.md
└── libraries/
├── index.md
├── react.md # Framework-specific docs
└── [library].md # Library-specific docsAGENTS.md
The primary AI context file contains:
- Project Overview: Name, description, and key technologies
- Stack Summary: Detected frameworks, libraries, and dev tools
- Directory Structure: Project tree (up to 4 levels)
- Entry Points: Main files and their purposes
- Conventions: Detected coding patterns and standards
- Documentation Links: References to generated docs
This file is designed to be read by AI agents at the start of a session to understand your project quickly.
New Project Support
ClaudeTools fully supports empty/new projects:
mkdir my-new-project
cd my-new-project
claudetools onboardFor new projects, ClaudeTools will:
- Ask what you want to build (the only hardcoded question)
- Generate AI-powered follow-up questions specific to your description
- Fetch latest package versions from npm registry
- Recommend a complete tech stack with current, compatible versions
- Offer to scaffold the project:
- Create
package.jsonwith recommended dependencies - Detect and use your preferred package manager (pnpm, bun, yarn, npm)
- Install dependencies automatically
- Create
- Generate AGENTS.md with the proposed configuration
Example flow:
▸ Phase 1/4: Stack Detection
ℹ New project - let's set it up
▸ Phase 2/4: Quick Questions
┌─ Quick Context ───────────────────────
│
│ New project setup
│ Tell us what you want to build.
│
└──────────────────────────────────────────
? What do you want to build? A REST API for managing bookmarks
◐ Analyzing your requirements...
(AI generates follow-up questions based on your description)
? Which database approach fits your needs?
❯ PostgreSQL with Prisma ORM
SQLite for simplicity
MongoDB for flexible schemas
Serverless (Planetscale/Neon)
? Do you need user authentication?
❯ Yes, JWT-based
Yes, session-based
OAuth only (Google, GitHub)
No authentication needed
? What's your deployment target?
❯ Docker/self-hosted
Vercel/serverless
AWS Lambda
Traditional VPS
▸ Phase 3/4: AI Analysis
◐ Fetching latest package versions...
Current versions from npm:
- hono@4.11.5
- prisma@7.3.0
- typescript@5.9.3
- vitest@4.0.18
✓ Proposal ready
? How does this look? Looks good, proceed
? Create package.json and install dependencies? Yes
✓ Scaffolded with pnpm
▸ Phase 4/4: Building Documentation
✓ Generated 12 docs
✓ Created AGENTS.mdConfiguration
Environment Variables
| Variable | Description |
|---|---|
CLAUDETOOLS_NO_UPDATE |
Set to 1 to disable auto-update checks |
CLAUDETOOLS_DEBUG |
Set to 1 to show detailed Claude CLI output |
Auto-Updates
ClaudeTools checks for updates automatically and prompts to upgrade when a new version is available. Disable with:
# Per-command
claudetools onboard --no-update
# Permanently
export CLAUDETOOLS_NO_UPDATE=1Integration with Claude Code
ClaudeTools generates files specifically designed for Claude Code:
- AGENTS.md — Placed in project root, automatically read by Claude Code
- .claude/CLAUDE.md — Points to AGENTS.md, follows Claude Code conventions
- Documentation structure — Organized for easy AI navigation
When you start a Claude Code session, it will automatically have context about:
- Your tech stack and dependencies
- Project structure and entry points
- Coding conventions and patterns
- Links to relevant documentation
Context7 Integration
ClaudeTools integrates with Context7 to fetch up-to-date documentation for your dependencies. When available, it will:
- Resolve library names to Context7 IDs
- Fetch official documentation, best practices, and examples
- Generate markdown files in
.claudetools/docs/libraries/
This requires mcp-cli to be configured with Context7 access.
Supported Technologies
Frameworks (25+)
| Category | Frameworks |
|---|---|
| Frontend | React, Vue, Svelte, Angular, Solid |
| Backend | Express, Fastify, Hono, NestJS, Koa |
| Full-stack | Next.js, Nuxt, Astro, Remix, SvelteKit |
| Mobile | React Native, Expo |
| Desktop | Electron, Tauri |
Libraries (40+ categories)
| Category | Examples |
|---|---|
| Database | Prisma, Drizzle, Mongoose, TypeORM |
| State Management | Zustand, Redux, Jotai, MobX |
| Validation | Zod, Yup, Joi, Valibot |
| Authentication | Lucia, NextAuth, Clerk |
| UI Components | Radix, shadcn/ui, Headless UI |
| Styling | Tailwind CSS, Emotion, styled-components |
| HTTP Clients | Axios, ky, got |
| Testing | Vitest, Jest, Playwright, Cypress |
Dev Tools
| Category | Tools |
|---|---|
| Type Checking | TypeScript |
| Linting | ESLint, Biome |
| Formatting | Prettier, Biome |
| Bundling | Vite, Webpack, esbuild, tsup |
| Testing | Vitest, Jest, Playwright |
Troubleshooting
"Claude CLI not available"
The AI analysis features require Claude CLI. Install it from claude.ai/cli.
Without Claude CLI, ClaudeTools will:
- Still detect your stack automatically
- Skip AI-powered proposal generation
- Generate documentation based on detected dependencies
"No project files detected"
This message appears for empty directories. ClaudeTools now supports new project setup — just answer the questions and it will recommend and scaffold a stack for you.
Documentation not generating
Ensure you have:
mcp-cliinstalled and configured- Context7 MCP server accessible
- Network connectivity
Use --verbose to see detailed output:
claudetools onboard --verboseRefreshing stale documentation
If your dependencies have changed:
claudetools onboard --refreshThis will re-fetch all documentation and regenerate AGENTS.md.
Uninstalling
npm uninstall -g @claudetools/cliTo remove generated files from a project:
rm -rf AGENTS.md .claude .claudetoolsContributing
ClaudeTools is part of a monorepo. To contribute:
git clone https://github.com/claudetools/claudetools
cd claudetools
pnpm install
pnpm devRun tests:
pnpm testLicense
MIT
Built for AI-assisted development. ClaudeTools reduces the friction of onboarding AI agents to your codebase by automatically generating comprehensive context files.