Manage developer-specific and tool-specific configuration without contaminating your project's Git repository.
Jin is a meta-versioning system layered on top of Git that manages developer-specific and tool-specific configuration (like .claude/, .cursor/, .vscode/ settings) across multiple projects without polluting your primary Git repository. Think of it as "Git for your ignored files" with a powerful 9-layer precedence system.
Key Benefits:
- Non-disruptive: Works alongside Git, only touches ignored/untracked files
- Deterministic: Structured files (JSON/YAML/TOML) merge predictably across layers
- Team-friendly: Share base configurations while preserving local customizations
- Remote sync: Collaborate on tool configurations via shared repository
Install via Cargo:
cargo install jinOr build from source:
git clone https://github.com/jin/jin
cd jin && cargo build --release
cp target/release/jin /usr/local/bin/Initialize Jin in your project (project identity is inferred from your Git remote):
$ jin init
Jin initialized in current project
Project: ui-dashboard (source: git-remote-origin)Create and activate a development mode:
$ jin mode create dev
Mode 'dev' created
$ jin mode use dev
Mode 'dev' activatedAdd configuration to mode layer:
$ echo '{"debug": true}' > .dev/config.json
$ jin add .dev/config.json --to mode
Staged .dev/config.json to mode layer
$ jin commit -m "Add dev configuration"
Committed to mode/dev layer
Applied 1 file to workspace:
.dev/config.jsonjin commit applies the merged result to your workspace by default. Pass --no-apply to commit without applying.
Check the state of your workspace at any time (includes project identity and per-file layer provenance):
$ jin status
Active mode: dev
Project: ui-dashboard (source: git-remote-origin)
Workspace: clean
Files tracked: 1
.dev/config.json → mode/devThat's it! Your configuration is now managed by Jin.
- Explore commands: Run
jin helporjin <command> --helpfor detailed usage - Create modes: Use
jin mode create <name>to set up environment-specific configurations - Create scopes: Use
jin scope create <name>for nested configuration contexts - View layers: Run
jin layersto see the 9-layer merge hierarchy
If you have Rust installed:
cargo install jinbrew install jin # (if packaged)Prerequisites: Rust 1.70.0+ (install from rustup.rs)
git clone https://github.com/jin/jin
cd jin
cargo build --release
cargo test # Verify buildBinary will be at target/release/jin. Add to your PATH.
Jin provides 32 commands organized by function:
Core Commands: init, add, commit, status, context
Mode Management: mode create|use|list|delete|show|unset, modes (list modes)
Scope Management: scope create|use|list|delete|show|unset, scopes (list scopes)
Workspace Operations: apply, reset
jin commit applies the merged result to your workspace by default; pass --no-apply to skip the apply step.
Remote Sync: link, fetch, pull, push, sync
Inspection: diff, log (optionally by layer, e.g. jin log mode), layers, list, repair
Utility: completion
For complete reference, run jin help or use --help with any command.
Jin includes built-in help for all commands:
jin help- Show all available commandsjin <command> --help- Show detailed help for a specific commandjin help modes- Show mode management helpjin help scopes- Show scope management help
Traditional approaches to developer configuration management have problems:
Problem 1: Git Pollution
Committing .vscode/, .claude/, .cursor/ settings to Git pollutes the repository with tool-specific configuration that doesn't belong there.
Problem 2: Ignored Files Lost
Adding them to .gitignore means they're not versioned and can't be shared across machines or with teammates.
Problem 3: Manual Synchronization
Developers resort to copy-pasting config files between machines, leading to drift and inconsistency.
Jin's Solution:
Jin creates a separate "phantom" Git layer that versions ignored files independently from your main repository, with a 9-layer precedence system for sharing base configurations while allowing local overrides.
Jin introduces a phantom Git layer that:
- Only touches files that are ignored or untracked by your main Git repository
- Stores configurations in a separate Git repository at
~/.jin/ - Merges configurations from multiple layers based on active mode and scope
- Applies the merged result to your workspace deterministically
Jin uses a 9-layer hierarchy where higher layers override lower layers:
Layer 9: Workspace Active (merged result, highest precedence)
Layer 8: User Local (machine-specific)
Layer 7: Project Base (project-specific)
Layer 6: Scope Base (scope defaults)
Layer 5: Mode → Project
Layer 4: Mode → Scope → Project
Layer 3: Mode → Scope
Layer 2: Mode Base (mode defaults)
Layer 1: Global Base (shared defaults, lowest precedence)
Run jin layers to see the live layer composition and merge order in your workspace. Its file total counts unique workspace paths, consistent with jin status and jin apply.
Jin stores its internal Git repository and configuration data in a directory controlled by the JIN_DIR environment variable.
By default, Jin uses:
- Linux/macOS:
~/.jin/ - Windows:
%USERPROFILE%\.jin\
This directory contains:
config.toml- Global Jin configuration (remote URL, user settings)- Internal Git repository - Stores layers, refs, and objects
- Cached data and metadata
You can override the default location by setting the JIN_DIR environment variable before running Jin commands:
# Set custom Jin directory
export JIN_DIR="/custom/path/to/jin"
# All subsequent Jin commands use this location
jin init
jin mode create devImportant: JIN_DIR must be set before running any Jin commands, as it is read at process startup.
Different Drive or Partition: Store Jin data on a different drive to save space on your system drive:
# Linux/macOS
export JIN_DIR="/mnt/storage/jin"
# Windows (PowerShell)
$env:JIN_DIR = "D:\jin"Network Storage: Share Jin configuration across multiple machines via network mount:
export JIN_DIR="/mnt/network-shared/jin"Isolated Testing: Create separate Jin environments for testing without affecting your main setup:
# Create test environment
export JIN_DIR="/tmp/jin-test"
git init test-project && cd test-project
jin init
# ... run tests ...
# Return to production (uses default ~/.jin/)
unset JIN_DIRCI/CD Environments: Configure Jin for CI pipelines with non-standard home directories:
# GitLab CI, GitHub Actions, etc.
export JIN_DIR="$CI_PROJECT_DIR/.jin"
jin syncTo make JIN_DIR persist across shell sessions, add it to your shell configuration:
Bash (~/.bashrc or ~/.bash_profile):
export JIN_DIR="$HOME/.local/share/jin"Zsh (~/.zshrc):
export JIN_DIR="$HOME/.local/share/jin"Fish (~/.config/fish/config.fish):
set -x JIN_DIR "$HOME/.local/share/jin"PowerShell ($PROFILE):
$env:JIN_DIR = "$env:USERPROFILE\.local\share\jin"After adding to your shell config, reload your shell or run source ~/.bashrc (or equivalent).
Inside JIN_DIR, you'll find:
$JIN_DIR/
├── config.toml # Global configuration (remote URL, user info)
├── refs/ # Git references
│ └── jin/ # Jin-specific refs (layers, modes, scopes)
├── objects/ # Git objects (blobs, trees, commits)
└── jin/ # Jin metadata (if present)
This is a standard bare Git repository structure, which you can inspect with Git commands:
# List all Jin layers
git --git-dir=$JIN_DIR show-ref | grep refs/jin/layers
# View Jin configuration
cat $JIN_DIR/config.tomlShare VS Code, Cursor, or Claude settings across projects while preserving personal preferences:
# Share base settings with team (routed to the active mode)
jin add .vscode/settings.json --to mode
# Personal machine-specific overlays (--local is shorthand for --to local;
# never pushed, applies on this machine everywhere)
jin add .vscode/personal.json --local
# Scope-targeted config (--scope implies the scope layer; no --to needed)
jin add .cursor/config.json --scope editor:cursor--mode <name> and --scope <name> are value selectors: with --to omitted, --mode alone implies the mode layer, --scope alone implies the scope layer, and both together imply the mode-scope layer. An explicit --to always wins.
Different configs for development vs. production:
# Development mode
jin mode create dev
jin mode use dev
jin add .env --to mode # → mode/dev/
# Production mode
jin mode create prod
jin mode use prod
jin add .env --to mode # → mode/prod/Separate configurations for different AI tools:
# Claude mode
jin mode create claude
jin mode use claude
jin add .claude/ --to mode # → mode/claude/
# Cursor mode
jin mode create cursor
jin mode use cursor
jin add .cursor/ --to mode # → mode/cursor/Share configurations across machines through a shared Git remote. Project identity — including org/repo slugs like myorg/ui-dashboard — is inferred from your Git remote at jin init:
# Machine 1
$ jin init
Project: myorg/ui-dashboard (source: git-remote-origin)
$ jin add .vscode/settings.json --to mode
$ jin commit -m "Base editor settings"
$ jin link [email protected]:team/jin-configs.git
$ jin push
# Machine 2
$ jin init
$ jin link [email protected]:team/jin-configs.git
$ jin pull
# Modes and scopes arrive with the pull — activate them directly
$ jin mode use claude
$ jin scope use language:javascriptjin push and jin pull transfer both layer content and the mode/scope registry, so a receiving machine can list and activate modes and scopes immediately after pulling — no recreating. Promotion on pull is first-writer-wins: a mode you created locally before pulling is never overwritten by the remote's registry entry.
jin fetch groups its report by relevance: updates touching your active mode, scope, or project appear under "Updates for your active context (mode: …, scope: …)", with all other updates listed separately.
jin rm and jin mv work on staged and committed files alike, using the same routing flags as jin add:
# Remove a committed file from the mode layer (stages a deletion; commit required)
$ jin rm .dev/config.json --to mode
$ jin commit -m "Remove dev configuration"
# If a lower layer still provides the file, it reappears on the next apply
# Rename within a layer (content is carried over, even if the workspace copy is gone)
$ jin mv .dev/config.json .dev/settings.json --to mode --force
# Move a file between layers in one step (rm + add; the source layer is detected automatically)
$ jin mv .dev/config.json .dev/config.json --to projectjin rm on a still-staged file unstages it and stages the deletion instead. jin mode delete <name> removes a mode completely — its registry entry and every layer ref it owns — so a re-created mode starts fresh.
- 9-Layer Precedence System: Global → Mode → Scope → Project → Local with deterministic merging
- Deep Merge for Structured Files: JSON, YAML, TOML files merge intelligently by key. Files that fail to parse (including JSONC with comments, e.g.
.vscode/settings.json) fall back to byte-exact handling, sojin applyandjin diffare never blocked by malformed content - Safe Add Paths:
./prefixes are normalized (sojin add .stages the real workspace files);../and absolute paths are rejected with a clear error; Jin's own internal state (.jin/,.jinmap,.paused_apply.yaml,*.jinmerge) is never staged - 3-Way Merge for Text Files: Conflict resolution like Git for text files (binary files are never merged — the higher layer wins)
- Project Identity at Init: Your project is inferred automatically from the Git remote at
jin init - Per-Project Workspace Isolation: Two projects sharing one
JIN_DIRnever see each other's state - Semantic Comparison & Canonical Apply: Formatting-only differences in structured files are not dirty; the canonical form is written on apply
- Binary File Support: Binary files are stored, applied, and diffed as opaque blobs ("binary files differ"); never merged — the higher layer wins. Large binaries are out of scope.
- Commit Applies by Default:
jin commitwrites the merged result to your workspace; opt out with--no-apply - Per-File Layer Provenance:
jin statusandjin applyshow which layer each tracked file comes from - Mode & Scope Management: Organize configurations by development environment and context
- Remote Synchronization: Share configurations via Git-based remote repository
- Atomic Operations: All commits are atomic and reversible
- Automatic
.gitignoreSafety: Jin-managed files are auto-ignored in main Git repo - Shell Completion: Bash, Zsh, Fish, PowerShell support
Contributions welcome! See CONTRIBUTING.md for guidelines.
MIT License - See LICENSE for details
Questions? Open an issue.