ClaudeKit CLI
raw JSON →claudekit-cli is a command-line interface tool designed to streamline the initialization and maintenance of ClaudeKit projects. Its primary function is to bootstrap new projects using predefined boilerplate templates and facilitate updates to existing ones. The package is currently in active development, with recent releases indicating a focus on continuous integration and refinement, often denoted by 'dev' suffixes (e.g., v3.41.4-dev.45). It requires Node.js version 18.0.0 or higher to operate. As a CLI, its core utility lies in command execution rather than programmatic imports, serving as an essential tool for developers working within the ClaudeKit ecosystem to quickly set up and manage their applications, offering a consistent and automated approach to project scaffolding.
Common errors
error Error: Command failed with exit code 127: npx claudekit create... ↓
node -v and npm -v to verify. error Error: Cannot find module '...' from 'claudekit-cli' ↓
npm uninstall -g claudekit-cli followed by npm install -g claudekit-cli. If using npx, clear npm cache with npm cache clean --force. error Error: EACCES: permission denied, access '...' or 'npm ERR! Could not install packages.' ↓
sudo (on macOS/Linux: sudo npx claudekit create...) or fix npm permissions (search for 'fixing npm permissions' for your OS). For local project creation, ensure your user has write access to the target directory. Warnings
breaking The `claudekit-cli` requires Node.js version 18.0.0 or higher. Running with older versions will result in execution errors. ↓
gotcha The project is undergoing rapid development, with many recent releases being 'dev' versions (e.g., v3.41.4-dev.45). While this indicates active maintenance, it may also imply potential instability or frequent, undocumented minor changes. ↓
gotcha When using `npx`, ensure you have an active internet connection as it will attempt to download the latest version of `claudekit-cli` if not already cached. For offline use or specific version control, consider global installation (`npm install -g claudekit-cli`). ↓
Install
npm install claudekit-cli yarn add claudekit-cli pnpm add claudekit-cli Imports
- claudekit wrong
import { claudekit } from 'claudekit-cli'correctnpx claudekit <command> - create wrong
require('claudekit-cli').create()correctnpx claudekit create my-new-project - update wrong
import { update } from 'claudekit-cli'correctnpx claudekit update
Quickstart
import { execSync } from 'child_process';
const projectName = 'my-claudekit-app';
const template = 'default'; // Or 'desktop', 'web', etc.
try {
console.log(`Creating a new ClaudeKit project: ${projectName} using template: ${template}...`);
// This simulates running the CLI command programmatically
const output = execSync(`npx claudekit create ${projectName} --template ${template}`, {
stdio: 'inherit'
});
console.log(`Project '${projectName}' created successfully.`);
console.log(`
Now, navigate into your project and start developing:`)
console.log(`cd ${projectName}`)
console.log(`npm install`)
console.log(`npm run dev`)
} catch (error) {
console.error(`Failed to create project: ${error.message}`);
process.exit(1);
}