Skip to main content

Centralized hub for LLM coding config: MCP, skills, rules, and agents.

Project description

code-agnostic

One config, every AI editor. Keep MCP servers, rules, skills, and agents in a single hub and sync them into editor-specific layouts.

Why

AI coding tools each want config in a different place and format. When you use more than one, you end up copy-pasting MCP servers, duplicating rules, and manually keeping things in sync. code-agnostic removes that overhead: define once, sync everywhere.

How it works

~/.config/code-agnostic/          Your single source of truth
├── config/
│   └── mcp.base.json             MCP servers (editor-agnostic)
├── rules/
│   └── python-style.md           Rules with YAML frontmatter
├── skills/
│   └── code-reviewer/SKILL.md    Skills with YAML frontmatter
└── agents/
    └── architect.md              Agents with YAML frontmatter

        ↓ plan / apply ↓

~/.config/opencode/               Compiled & synced for OpenCode
~/.cursor/                        Compiled & synced for Cursor
~/.codex/                         Compiled & synced for Codex

Each resource is cross-compiled to the target editor's native format. Rules become .mdc files for Cursor, AGENTS.md sections for OpenCode/Codex, etc.

Install

uv tool install code-agnostic

Or run without installing:

uvx code-agnostic

Or run the published Docker image to isolate filesystem access to mounted paths only:

docker run --rm -it \
  -v "$(pwd):/workspace" \
  -w /workspace \
  ghcr.io/dhvcc/code-agnostic:latest plan

By default, config stays inside the container at /root/.config unless you mount a host path.

Quick start

# Import existing config from an editor you already use
code-agnostic import plan -a codex
code-agnostic import apply -a codex

# Enable target editors
code-agnostic apps enable -a cursor
code-agnostic apps enable -a opencode

# Preview and apply
code-agnostic plan
code-agnostic apply

Editor compatibility

Feature OpenCode Cursor Codex
MCP sync yes yes yes
Rules sync (cross-compiled) yes yes yes
Skills sync yes yes yes
Agents sync yes yes --
Workspace propagation yes yes yes
Import from yes yes yes
Interactive import (TUI) yes yes yes

Codex does not support agents natively.

Features

Sync engine

Plan-then-apply workflow. Preview every change before it touches disk.

code-agnostic plan -a cursor        # dry-run for one editor
code-agnostic plan                   # dry-run for all
code-agnostic apply                  # apply changes
code-agnostic status                 # check drift

MCP management

Add, remove, and list MCP servers without editing JSON by hand.

code-agnostic mcp add github --command npx --args @modelcontextprotocol/server-github --env GITHUB_TOKEN
code-agnostic mcp list
code-agnostic mcp remove github

Env vars without a value (--env GITHUB_TOKEN) are stored as ${GITHUB_TOKEN} references.

Rules with metadata

Rules live in rules/ as markdown files with optional YAML frontmatter:

---
description: "Python coding standards"
globs: ["*.py"]
always_apply: false
---

Always use type hints. Prefer dataclasses over dicts.

Cross-compiled per editor: Cursor gets .mdc files with native frontmatter, OpenCode/Codex get AGENTS.md sections.

code-agnostic rules list
code-agnostic rules remove --name python-style

Skills and agents

Canonical YAML frontmatter format, cross-compiled per editor.

code-agnostic skills list
code-agnostic agents list

Workspaces

Register workspace directories. Repos inside them get rules, skills, and agents propagated as symlinks.

code-agnostic workspaces add --name myproject --path ~/code/myproject
code-agnostic workspaces list

Git exclude

Prevent synced paths from showing up in git status. Managed per-workspace with customizable patterns.

code-agnostic workspaces git-exclude                            # all workspaces
code-agnostic workspaces git-exclude -w myproject               # one workspace
code-agnostic workspaces exclude-add --pattern "*.generated" -w myproject
code-agnostic workspaces exclude-list -w myproject

Import

Migrate existing config from any supported editor into the hub.

code-agnostic import plan -a codex
code-agnostic import apply -a codex
code-agnostic import apply -a cursor --include mcp --on-conflict overwrite
code-agnostic import plan -a codex -i    # interactive TUI picker

CLI conventions

All commands use named flags (-a, -w, -v). Singular aliases work too: app = apps, workspace = workspaces.

Roadmap

  • Plan/apply/status sync engine
  • MCP server sync across editors
  • Skills and agents sync (symlink-based)
  • Workspace propagation into git repos
  • Import from existing editor configs
  • Consistent CLI with named flags and aliases
  • MCP add/remove/list commands
  • Rules system with YAML frontmatter and per-editor compilation
  • Cross-compilation for skills and agents
  • Per-workspace git-exclude customization
  • Interactive TUI for import selection
  • Claude Code support
  • rules add / skills add / agents add commands (open $EDITOR with template)
  • Planner integration for cross-compiled skills and agents
  • Shell auto-complete
  • Full TUI mode (command palette + menus)

Testing

uv sync --dev
uv run test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

code_agnostic-0.2.0.tar.gz (92.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

code_agnostic-0.2.0-py3-none-any.whl (92.8 kB view details)

Uploaded Python 3

File details

Details for the file code_agnostic-0.2.0.tar.gz.

File metadata

  • Download URL: code_agnostic-0.2.0.tar.gz
  • Upload date:
  • Size: 92.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for code_agnostic-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0e963f14fa9ddb7681dc5c585208113562d0d3fd04f7cd9cc564d59036b3ca4c
MD5 6e44d2f033737c4c9944ff294701d303
BLAKE2b-256 1b2d7dc4916b22eb3c291bb5c7d96a70d121bc873644824b506978fff7924e99

See more details on using hashes here.

File details

Details for the file code_agnostic-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: code_agnostic-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 92.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for code_agnostic-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c87a7795df35526f9b2a3f6522f81811ca2daa1c2b9e3bffa3b3d2e336b24a4
MD5 685fb4cd961fca72f3cb1b06e7749aaa
BLAKE2b-256 5bf9c0016eb97144535ef2c39c7a88abc8d7b3cb614846d9bc52134e167f6197

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page