Share your Claude Code environment in seconds - export and import development stacks.
Claude Stacks is a CLI tool that allows you to:
- Export your Claude Code environment configurations as portable stack files
- Share development stacks with your team or the community via Commands.com
- Import environments quickly across different projects and machines
- Browse and install stacks from the Commands.com marketplace
Perfect for sharing MCP server configurations, project setups, and development environments with Claude Code users.
Install globally via npm:
npm install -g claude-stacksOr use npx to run without installing:
npx claude-stacks --helpclaude-stacks exportclaude-stacks listclaude-stacks export --name "My Dev Stack" --description "Full-stack development environment"claude-stacks import my-stack.json# Publish to the marketplace
claude-stacks publish my-stack.json
# Browse available stacks
claude-stacks browse
# Install from marketplace
claude-stacks install org-name/stack-nameexport [filename]- Export current environment to a stack fileimport <filename>- Import environment from a stack filepublish <filename>- Publish stack to Commands.com marketplaceinstall <stack-id>- Install stack from Commands.combrowse- Browse marketplace stacks interactively
list- List local stacksscan-hooks- Scan hooks for potential security issuesdelete <stack-id>- Delete published stack from Commands.comrename <stack-id>- Rename published stackclean- Clean up local stack metadata
--name <name>- Custom stack name--description <description>- Stack description--stack-version <version>- Set version (default: auto-increment)--include-global- Include global~/.claudeconfigurations--include-claude-md- IncludeCLAUDE.mdfiles
--overwrite- Overwrite existing files (default: merge)--global-only- Only import to global~/.claude
Claude Stacks captures your Claude Code environment including:
- MCP Server Configurations - All configured MCP servers and their settings
- Project Commands - Custom commands defined for your project
- Agent Configurations - Custom agents and their configurations
- Hook Scripts - User hook scripts with security analysis
- Project Settings - Claude Code project-specific settings
- CLAUDE.md Files - Project instructions (when
--include-claude-mdis used) - Global Configurations - User-level settings (when
--include-globalis used)
Claude Stacks automatically analyzes hook scripts for potential security risks during export:
# Scan hooks independently
claude-stacks scan-hooks
# Security analysis is included during export
claude-stacks export my-stack.jsonRisk Levels:
- 🔴 High - Dangerous operations (command execution, file deletion)
- 🟡 Medium - Potentially risky operations (network requests, file writes)
- 🟢 Low - Minor concerns (environment variable access)
Supports Python, JavaScript, TypeScript, and Bash hook analysis.
⚠️ Important: Hook analysis provides guidance only. Users install and execute hooks at their own risk. Always review hook code before use, especially from untrusted sources.
To publish or manage stacks on Commands.com, you'll need to authenticate:
claude-stacks publish my-stack.jsonThe CLI will automatically guide you through the OAuth authentication process on first use.
Stack files are JSON documents containing:
{
"name": "My Development Stack",
"description": "Full-stack development environment with MCP servers",
"version": "1.0.0",
"author": "Your Name",
"mcpServers": [...],
"commands": [...],
"agents": [...],
"settings": {...}
}- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/commands-com/claude-stacks.git
cd claude-stacks
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm testnpm run dev- Run in development modenpm run build- Build TypeScript to JavaScriptnpm run test- Run test suite with coveragenpm run lint- Lint codenpm run format- Format code with Prettiernpm run quality- Run all quality checks
The project has comprehensive test coverage (90%+):
# Run all tests
npm test
# Run specific test types
npm run test:unit
npm run test:integration
npm run test:e2e
# Watch mode during development
npm run test:watch- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run quality checks (
npm run quality) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This tool handles your Claude Code configurations and requires network access to Commands.com. All data transmission is encrypted and the tool follows security best practices:
- OAuth 2.0 PKCE for secure authentication
- HTTPS-only API communication
- Local credential storage with appropriate permissions
- Input validation and sanitization
- Automated security analysis of hook scripts
MIT License - see LICENSE file for details.
- GitHub Issues - Bug reports and feature requests
- Commands.com - Browse and share stacks
Made with ❤️ for the Claude Code community