@grazulex/contextmark
v2.0.0
Published
Your Claude Code context, versioned and portable. Stop copying CLAUDE.md. Start composing it.
Downloads
8
Maintainers
Readme
ContextMark
Your Claude Code Context, Versioned and Portable
Stop copying CLAUDE.md. Start syncing it.
Synchronize your Claude Code contexts (CLAUDE.md, rules, skills) across all your projects and machines - like EnvMark for your AI contexts.
Quick Start • Documentation • Why ContextMark?
🚀 The Problem
Managing Claude Code contexts across 20+ repositories and 2 machines:
~/projects/
├── reposentinel/
│ └── CLAUDE.md ← copied from backmark, modified since
├── backmark/
│ └── CLAUDE.md ← "original" version but which one?
├── shipmark/
│ └── CLAUDE.md ← outdated, forgot to update
├── new-project/
│ └── ??? ← start from scratch again
└── ~/.claude/
├── CLAUDE.md ← global config, only on this machine
└── rules/ ← lost if machine diesDaily frustrations:
- Global config (
~/.claude/) only exists on this machine - Copy-paste between repos = inevitable divergence
- Two machines = double maintenance, guaranteed drift
- No backup of your carefully crafted Claude instructions
⚡ Quick Start
# Install globally
npm install -g @grazulex/contextmark
# Initialize your context library
contextmark init-library
# Save your global Claude config to the library
contextmark push --global
# Register and save a project
cd ~/projects/my-project
contextmark init
contextmark push
# Sync to Git remote (backup + cross-machine sync)
contextmark sync setup [email protected]:user/claude-configs.git
contextmark sync pushOn another machine:
contextmark init-library
contextmark sync setup [email protected]:user/claude-configs.git
contextmark sync pull
contextmark pull --global # Restore your global config→ Complete Getting Started Guide
✨ Why ContextMark?
🔄 Simple Push/Pull
Like EnvMark for your Claude configs:
pushsaves to librarypullrestores from librarydiffshows changes
🌐 Cross-Machine Sync
Git-based synchronization keeps your library in sync across all your development machines.
📁 Complete Backup
Back up everything:
~/.claude/CLAUDE.md~/.claude/rules/*~/.claude/skills/*- Per-project configs
📝 Zero Lock-in
Standard Markdown and YAML files. No proprietary formats. Your context will be readable forever.
🛠 Commands
Simple Mode (Recommended)
# Global config (~/.claude/)
contextmark push --global # Save to library
contextmark pull --global # Restore from library
contextmark diff --global # Compare
# Per-project config
cd ~/projects/my-project
contextmark init # Register project
contextmark push # Save to library
contextmark pull # Restore from library
contextmark diff # Compare
contextmark status # Check sync status
# Sync with Git remote
contextmark sync setup <url> # Configure remote
contextmark sync push # Push to remote
contextmark sync pull # Pull from remote
contextmark sync status # Check remote statusAdvanced Mode (Optional)
For power users managing 50+ projects with shared conventions:
# Create reusable blocks
contextmark block create laravel/base
contextmark blocks
# Create profiles (combinations of blocks)
contextmark profile create my-stack
contextmark profiles
# Initialize project with profile (generates CLAUDE.md)
contextmark init --profile my-stack
contextmark status # Check for block updates
contextmark update # Update from blocks📁 Library Structure
~/.contextmark/
├── config.yml # Global configuration
├── global/ # Your ~/.claude/ backup
│ ├── CLAUDE.md
│ ├── rules/
│ │ ├── backmark.md
│ │ └── git-commits.md
│ └── skills/
│ └── backmark/
├── projects/ # Per-project configs
│ ├── my-app/
│ │ └── CLAUDE.md
│ └── another-project/
│ └── CLAUDE.md
├── blocks/ # [Advanced] Reusable blocks
├── profiles/ # [Advanced] Block combinations
├── agents/ # [Advanced] Reusable agents
└── commands/ # [Advanced] Custom commands🔧 Configuration
Global Config (~/.contextmark/config.yml)
default_profile: default
sync:
method: git
remote: [email protected]:user/claude-configs.git
auto_pull: true
auto_push: false
cli:
colors: true
confirm_destructive: true
global:
enabled: trueProject Config (.contextmark.yml)
project: my-project
profile: null # null = simple mode, or profile name
blocks: []
generated_at: 2025-01-15T10:30:00Z
last_push: 2025-01-15T10:35:00Z🌟 Part of the Mark Ecosystem
| Tool | Purpose | |------|---------| | Backmark | AI-powered task management | | Stackmark | Docker environment management | | Shipmark | Release and versioning automation | | EnvMark | Environment variable management | | ContextMark | Claude Code context management |
📄 License
MIT © Jean-Marc Strauven
Documentation • Report Bug • Request Feature
Made with 💜 for the Claude Code community
