ccmd

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2025 License: MIT

README ΒΆ

ccmd - Claude Command Manager

Go Version License Go Report Card PRs Welcome

A simple and powerful command-line tool for managing custom commands in Claude Code. Install, update, and share commands from Git repositories with the ease of a package manager.

Table of Contents

Overview

ccmd (Claude Command Manager) brings package management capabilities to Claude Code, allowing you to:

  • Easily install commands from Git repositories
  • Keep commands updated with simple commands
  • Share your own commands with the community
  • Manage project-specific command configurations

Features

  • πŸ“¦ Easy Installation - Install commands from any Git repository with a single command
  • πŸ”„ Version Management - Pin specific versions or update to the latest
  • πŸ” Command Discovery - Search for commands in the community registry
  • πŸ”’ Lock File Support - Reproducible installs across team members
  • πŸš€ Fast & Lightweight - Minimal dependencies, maximum performance
  • πŸ“ Project Scoped - Commands are installed per project, not globally
  • πŸ›‘οΈ Safe Updates - Update with confidence using lock files

Installation

Using Homebrew (macOS/Linux)
brew tap gifflet/ccmd
brew install ccmd
Using Go
go install github.com/gifflet/ccmd/cmd/ccmd@latest
Download Binary

Download the latest binary for your platform from the releases page.

# Example for macOS (Apple Silicon)
curl -L https://github.com/gifflet/ccmd/releases/latest/download/ccmd-darwin-arm64.tar.gz | tar xz
sudo mv ccmd /usr/local/bin/
Build from Source
git clone https://github.com/gifflet/ccmd.git
cd ccmd
make build
sudo make install

Quick Start

1. Initialize ccmd in your project
cd your-project
ccmd init

This creates a .claude directory in your project for storing commands.

2. Install a command
# Install from GitHub
ccmd install github.com/user/my-command

# Install specific version
ccmd install github.com/user/my-command@v1.0.0

# Install with custom name
ccmd install github.com/user/my-command --name mc
3. List installed commands
ccmd list
4. Update commands
# Update specific command
ccmd update my-command

# Update all commands
ccmd update --all
5. Remove a command
ccmd remove my-command

Commands

ccmd init

Initialize ccmd in the current project. Creates the .claude directory structure.

ccmd init
ccmd install

Install a command from a Git repository.

# Basic usage
ccmd install <repository>

# With version
ccmd install <repository>@<version>

# Options
ccmd install github.com/user/cmd --name custom-name
ccmd install github.com/user/cmd --force  # Reinstall
ccmd list

List all installed commands.

# Basic list
ccmd list

# Detailed output
ccmd list --long

# JSON output
ccmd list --json
ccmd update

Update installed commands to their latest versions.

# Update specific command
ccmd update <command-name>

# Update all commands
ccmd update --all

# Update to specific version
ccmd update <command-name>@v2.0.0
ccmd remove

Remove an installed command.

ccmd remove <command-name>

# Remove multiple
ccmd remove cmd1 cmd2 cmd3

Search for commands in the registry.

# Search by keyword
ccmd search automation

# Search with filters
ccmd search --tags testing,ci
ccmd search --author gifflet
ccmd info

Display detailed information about a command.

# Show info for installed command
ccmd info <command-name>

# Show info from repository
ccmd info github.com/user/command
ccmd run

Run an installed command (useful for testing).

ccmd run <command-name> [args...]

Creating Commands

Creating a command for ccmd is simple. Your repository needs:

  1. ccmd.yaml - Command metadata
  2. index.md - Command instructions for Claude
  3. README.md - Documentation for users
Example Command Structure
my-awesome-command/
β”œβ”€β”€ ccmd.yaml          # Command metadata (required)
β”œβ”€β”€ index.md           # Command for Claude (required)
β”œβ”€β”€ README.md          # User documentation
β”œβ”€β”€ examples/          # Usage examples
β”‚   └── example.md
└── LICENSE           # License file
ccmd.yaml Format
name: my-awesome-command
version: 1.0.0
description: Automates awesome tasks in Claude Code
author: Your Name
email: your.email@example.com
repository: https://github.com/username/my-awesome-command
license: MIT
entry: index.md  # Optional, defaults to index.md
tags:
  - automation
  - productivity
  - testing
dependencies:  # Optional
  - other-command@^1.0.0
index.md Example
# My Awesome Command

You are an AI assistant helping with task automation. When the user invokes this command, you should:

## Instructions

1. Analyze the current project structure
2. Generate appropriate configuration files
3. Set up the automation pipeline
4. Provide clear feedback to the user

## Parameters

- `--type`: Type of automation (test, build, deploy)
- `--config`: Path to configuration file

## Examples

When user says "setup automation", you should...

See our Command Creation Guide for detailed instructions.

Configuration

ccmd stores all data in your project's .claude directory:

your-project/
β”œβ”€β”€ .claude/
β”‚   β”œβ”€β”€ commands/          # Installed command files
β”‚   β”œβ”€β”€ commands.lock      # Lock file for reproducible installs
β”‚   └── config.yaml        # Project configuration (optional)
β”œβ”€β”€ src/
└── ...
Project Configuration (Optional)

Create .claude/config.yaml for project-specific settings:

# Registry to use for searches
registry: https://registry.ccmd.dev

# Default author for installs
preferred_authors:
  - gifflet
  - trusted-org

# Auto-update check
auto_update: true
update_check_interval: 24h

Development

Prerequisites
  • Go 1.23 or higher
  • Git
  • Make (optional but recommended)
Setup
# Clone repository
git clone https://github.com/gifflet/ccmd.git
cd ccmd

# Install dependencies
go mod download

# Run tests
make test

# Build
make build

# Run locally
./bin/ccmd --help
Running Tests
# All tests
make test

# With coverage
make test-coverage

# Specific package
go test ./pkg/commands/...
Code Style

We use standard Go formatting and linting:

# Format code
make fmt

# Run linter
make lint

# Run all checks
make check

Contributing

We welcome contributions! Please see our Contributing Guidelines for details on:

  • Code of Conduct
  • Development workflow
  • Submitting pull requests
  • Reporting issues

Roadmap

  • Core command management (install, update, remove)
  • Git repository support
  • Version management
  • Lock file support
  • Official command registry
  • Command dependencies
  • Command signing and verification
  • Plugin system for extending ccmd
  • Global command installation option

Community

License

ccmd is released under the MIT License. See LICENSE for details.


Made with ❀️ for the Claude Code community

Directories ΒΆ

Path Synopsis
cmd
ccmd command
remove
Package remove provides the remove command for ccmd.
Package remove provides the remove command for ccmd.
internal
fs
Package fs provides file system operations for ccmd
Package fs provides file system operations for ccmd
git
Package git provides a client for Git operations.
Package git provides a client for Git operations.
lock
Package lock provides utilities for managing the commands.lock file that tracks installed commands, their versions, and installation details.
Package lock provides utilities for managing the commands.lock file that tracks installed commands, their versions, and installation details.
models
Package models defines data structures used throughout ccmd.
Package models defines data structures used throughout ccmd.
output
Package output provides colored output utilities for command-line interface.
Package output provides colored output utilities for command-line interface.
validation
Package validation provides command structure and metadata validation utilities.
Package validation provides command structure and metadata validation utilities.
pkg
git
Package git provides a simple wrapper around go-git for common Git operations.
Package git provides a simple wrapper around go-git for common Git operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL