Commands Reference
Complete reference for all ContextMark CLI commands.
Getting Started
contextmark init-library
Initialize the ContextMark library at ~/.contextmark.
Options: -f, --force - Reinitialize even if exists
contextmark init
Register a project with ContextMark. Keeps existing CLAUDE.md or creates a new one.
Options: -p, --profile - Use a profile to generate CLAUDE.md (advanced), -f, --force - Reinitialize
Config Sync Commands
contextmark push
Push local config (CLAUDE.md, .claude/) to the library.
Options: -g, --global - Push global config (~/.claude/), -f, --force - Skip confirmation
contextmark pull
Pull config from library to local project.
Options: -g, --global - Pull global config (~/.claude/), -f, --force - Skip confirmation
contextmark diff
Compare local config with library version.
Options: -g, --global - Compare global config (~/.claude/)
contextmark status
Show project sync status.
Options: -g, --global - Show global config status, -a, --all - Show all projects in library
Library Sync Commands
contextmark sync status
Check Git synchronization status with remote.
contextmark sync push
Commit and push library changes to remote Git.
contextmark sync pull
Pull library changes from remote Git.
contextmark sync setup
Configure Git remote for library synchronization.
Agent Commands
contextmark agents
List all available agents in your library.
contextmark agent create <slug>
Create a new agent.
Options: -n, --name, -d, --description
contextmark agent show <slug>
Display agent content.
contextmark agent edit <slug>
Open an agent in your default editor.
contextmark agent remove <slug>
Remove an agent.
Options: -f, --force - Skip confirmation
contextmark add-agent <slug>
Add an agent to the current project.
Command Commands
contextmark commands
List all available commands in your library.
contextmark command create <slug>
Create a new command.
Options: -n, --name, -d, --description
contextmark command show <slug>
Display command content.
contextmark command edit <slug>
Open a command in your default editor.
contextmark command remove <slug>
Remove a command.
Options: -f, --force - Skip confirmation
contextmark add-command <slug>
Add a command to the current project.
Advanced: Block Commands
Blocks are reusable context fragments. Use them to compose CLAUDE.md from modular pieces.
contextmark blocks
List all available blocks in your library.
Options: -a, --all - Show as flat table
contextmark block create <slug>
Create a new block. Slug format: category/name (e.g., laravel/base).
contextmark block show <slug>
Display the content of a block.
contextmark block edit <slug>
Open a block in your default editor.
contextmark block remove <slug>
Remove a block from the library.
Options: -f, --force - Skip confirmation
Advanced: Profile Commands
Profiles combine multiple blocks. Use with contextmark init --profile.
contextmark profiles
List all available profiles.
contextmark profile create <slug>
Create a new profile.
contextmark profile show <slug>
Display profile configuration.
contextmark profile edit <slug>
Open a profile in your default editor.
contextmark profile remove <slug>
Remove a profile.
Options: -f, --force - Skip confirmation
Advanced: Update Commands
Update CLAUDE.md when using blocks and profiles.
contextmark update
Update CLAUDE.md with latest blocks from profile.
Options: -a, --all - Update all projects, -d, --diff - Show changes, -f, --force
Need Help?
Run contextmark --help or contextmark <command> --help for detailed usage.