https://github.com/commands-com/claude-stacks
Import/Export your Claude mcps/agents/commands/hooks/settings in seconds
https://github.com/commands-com/claude-stacks
claude claude-ai claude-code claudecode cli cli-tool
Last synced: 6 months ago
JSON representation
Import/Export your Claude mcps/agents/commands/hooks/settings in seconds
- Host: GitHub
- URL: https://github.com/commands-com/claude-stacks
- Owner: Commands-com
- License: mit
- Created: 2025-08-23T02:49:04.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-08-31T13:23:32.000Z (6 months ago)
- Last Synced: 2025-08-31T15:28:04.381Z (6 months ago)
- Topics: claude, claude-ai, claude-code, claudecode, cli, cli-tool
- Language: TypeScript
- Homepage: https://commands.com
- Size: 16.4 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Claude Stacks

[](https://www.npmjs.com/package/claude-stacks)
[](https://opensource.org/licenses/MIT)
Share your Claude Code environment in seconds - export and import development stacks.
## What is Claude 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.
## Installation
Install globally via npm:
```bash
npm install -g claude-stacks
```
Or use npx to run without installing:
```bash
npx claude-stacks --help
```
## Quick Start
### Export Your Current Setup
```bash
claude-stacks export
```
### List Your Stacks
```bash
claude-stacks list
```
### Export with Custom Metadata
```bash
claude-stacks export --name "My Dev Stack" --description "Full-stack development environment"
```
### Import from a Stack
```bash
claude-stacks import my-stack.json
```
### Share via Commands.com
```bash
# 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-name
```
## Commands
### Core Commands
- **`export [filename]`** - Export current environment to a stack file
- **`import `** - Import environment from a stack file
- **`publish `** - Publish stack to Commands.com marketplace
- **`install `** - Install stack from Commands.com
- **`browse`** - Browse marketplace stacks interactively
### Management Commands
- **`list`** - List local stacks
- **`scan-hooks`** - Scan hooks for potential security issues
- **`delete `** - Delete published stack from Commands.com
- **`rename `** - Rename published stack
- **`clean`** - Clean up local stack metadata
### Export Options
- `--name ` - Custom stack name
- `--description ` - Stack description
- `--stack-version ` - Set version (default: auto-increment)
- `--include-global` - Include global `~/.claude` configurations
- `--include-claude-md` - Include `CLAUDE.md` files
### Import Options
- `--overwrite` - Overwrite existing files (default: merge)
- `--global-only` - Only import to global `~/.claude`
## What Gets Exported?
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-md` is used)
- **Global Configurations** - User-level settings (when `--include-global` is used)
## Hook Safety
Claude Stacks automatically analyzes hook scripts for potential security risks during export:
```bash
# Scan hooks independently
claude-stacks scan-hooks
# Security analysis is included during export
claude-stacks export my-stack.json
```
**Risk 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.
## Authentication
To publish or manage stacks on Commands.com, you'll need to authenticate:
```bash
claude-stacks publish my-stack.json
```
The CLI will automatically guide you through the OAuth authentication process on first use.
## Stack File Format
Stack files are JSON documents containing:
```json
{
"name": "My Development Stack",
"description": "Full-stack development environment with MCP servers",
"version": "1.0.0",
"author": "Your Name",
"mcpServers": [...],
"commands": [...],
"agents": [...],
"settings": {...}
}
```
## Development
### Prerequisites
- Node.js 18+
- npm or yarn
### Setup
```bash
# 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 test
```
### Development Scripts
- `npm run dev` - Run in development mode
- `npm run build` - Build TypeScript to JavaScript
- `npm run test` - Run test suite with coverage
- `npm run lint` - Lint code
- `npm run format` - Format code with Prettier
- `npm run quality` - Run all quality checks
### Testing
The project has comprehensive test coverage (90%+):
```bash
# 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
```
## Contributing
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Run quality checks (`npm run quality`)
5. Commit your changes (`git commit -m 'Add amazing feature'`)
6. Push to the branch (`git push origin feature/amazing-feature`)
7. Open a Pull Request
## Security
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
## License
MIT License - see [LICENSE](LICENSE) file for details.
## Support
- [GitHub Issues](https://github.com/commands-com/claude-stacks/issues) - Bug reports and feature requests
- [Commands.com](https://commands.com) - Browse and share stacks
---
Made with ❤️ for the Claude Code community