A Ruby CLI tool for centralized AI agent configuration management.
Gent solves the problem of managing duplicate configuration files across multiple AI tools. Instead of copy-pasting rules and settings between Claude, Codex, Windsurf, and other agents, gent creates a single source of truth that can be linked to all your AI tools.
- Centralized config management - One config file, linked to multiple agents
- MCP server synchronization - Manage MCP (Model Context Protocol) servers centrally
- Multi-format support - Handles JSON (Claude), TOML (Codex), and Markdown configs
- Global and project-level configs - Support for both system-wide and project-specific rules
- Smart linking - Safely backs up original configs before creating symlinks
- Multiple agent support - Currently supports Claude Code, Codex, and Windsurf
- Shared skills directory - Centralize Claude/Codex skills into a single source of truth
- Modular architecture - Clean, extensible Ruby modules for easy maintenance
# Clone the repository
git clone https://github.com/willhs/gent.git
cd gent
# Install dependencies
bundle install
# Make executable and add to PATH
chmod +x bin/gent
# Add bin/gent to your PATH or create a symlink:
# ln -s $(pwd)/bin/gent /usr/local/bin/gent
gent --help$ gent list --global
Supported agents:
claude code ~/.claude/CLAUDE.md (linked -> /Users/you/.config/gent/rules.md)
MCP: ~/.claude.json (synced -> /Users/you/.config/gent/mcp.yaml)
codex ~/.codex/AGENTS.md (linked -> /Users/you/.config/gent/rules.md)
MCP: ~/.codex/config.toml (synced -> /Users/you/.config/gent/mcp.yaml)
windsurf ~/.codeium/windsurf/memories/global_rules.md (linked -> /Users/you/.config/gent/rules.md)
Central MCP config:
/Users/you/.config/gent/mcp.yaml (2 MCP servers)# Link all agents to centralized config (rules + skills)
gent init
# Link specific agent (text configs + MCP servers)
gent link claude
gent link codex
gent link windsurf
# Unlink specific agent (restores originals)
gent unlink claude
# Use global configs (stored in ~/.config/gent/)
gent init --global
gent link claude --global
# View current linking status, MCP sync info, and skills status
gent list
gent list --globalAgent paths and MCP configs are defined in config/config.yml:
local_configs:
"claude code": "CLAUDE.md"
codex: "AGENTS.md"
windsurf: ".windsurfrules"
global_configs:
"claude code": "~/.claude/CLAUDE.md"
codex: "~/.codex/AGENTS.md"
windsurf: "~/.codeium/windsurf/memories/global_rules.md"
gent_dirs:
local: ".gent/rules.md"
global: "~/.config/gent/rules.md"
# MCP (Model Context Protocol) server configs
mcp_configs:
"claude code": "~/.claude.json"
codex: "~/.codex/config.toml"
gent_mcp_dirs:
local: ".gent/mcp.yaml"
global: "~/.config/gent/mcp.yaml"
# Skills directory sharing
skill_dirs:
local:
"claude code": ".claude/skills"
codex: ".codex/skills"
global:
"claude code": "~/.claude/skills"
codex: "~/.codex/skills"
gent_skill_dirs:
local: ".gent/skills"
global: "~/.config/gent/skills"- Backup: Original agent configs are safely backed up to
.gent/original_configs/ - Link: Agent config files are replaced with symlinks to your centralized gent config
- Sync: All linked agents automatically use the same rules and settings
- Extract: MCP servers from agent configs are copied to central
mcp.yaml(if central is empty) - Centralize: All agents' MCP configs point to the same centralized server definitions
- Format Preservation: JSON (Claude) and TOML (Codex) formats are maintained
- Restore: Original MCP configs are restored when unlinking
- Seed: If the central skills directory is empty, gent copies existing Claude skills into it
- Link: Agent skill directories are replaced with symlinks to the central skills directory
- Restore: Original skill directories are restored when unlinking
Claude (JSON): ~/.claude.json
{
"mcpServers": {
"puppeteer": {
"type": "stdio",
"command": "node",
"args": ["/path/to/server.js"]
}
}
}Codex (TOML): ~/.codex/config.toml
[mcp_servers.puppeteer]
command = "node"
args = ["/path/to/server.js"]
type = "stdio"Central (YAML): ~/.config/gent/mcp.yaml
puppeteer:
type: stdio
command: node
args: ["/path/to/server.js"]bin/gent # Executable CLI
lib/
├── gent.rb # Main CLI class
└── gent/
├── config_manager.rb # YAML/JSON/TOML config handling
├── file_manager.rb # File operations & symlinks
├── mcp_manager.rb # MCP server synchronization
└── agent_manager.rb # Agent linking/unlinking logic
config/config.yml # Agent and MCP configuration paths
gent.gemspec # Gem specification with dependencies