Skip to content

Sync AI Coding Config and Teach Your Agents

Write your AI coding rules, commands, skills, MCP servers, and permissions once — generate native config for every tool. Then let your agents learn from your repo with lessons.

Homebrew · standalone binary · npm — pick any  ·  MIT License  ·  CLI + TypeScript API


npm versionnpm downloadsCILicense: MIT

AI coding config should not drift between tools

Every AI coding assistant ships a different configuration surface. Claude Code reads CLAUDE.md and .claude/settings.json. Cursor uses .cursor/rules/*.mdc. GitHub Copilot reads .github/copilot-instructions.md and prompts. Every other supported tool adds its own files for rules, commands, agents, skills, MCP servers, hooks, ignore patterns, or permissions.

AgentsMesh turns that spread into one editable source of truth. Put the real project instructions in .agentsmesh/, then generate native files for every enabled tool. Import goes the other direction, so existing tool configs can be adopted without starting from scratch.

agentsmesh detects existing tool configs, imports them into one source, and generates native config for every tool

Your agents learn from your repo

Lessons give your AI coding agents a memory of past mistakes. When something goes wrong — a failing test, a code review comment, a wrong assumption — the agent captures a short rule. Before it touches the same files again, it recalls that rule automatically. Same mistake, never twice — in any tool, for every teammate, because the memory is one git-tracked file the whole team shares.

an AI agent captures a lesson after a failure, then recalls it before editing the same file — by file, command, or keyword
Terminal window
# One-time setup
agentsmesh init --lessons && agentsmesh generate
# After a failure, the agent captures the rule:
agentsmesh lessons add "Normalize CLI display paths to forward slashes" \
--topic windows-paths --new-topic --topic-summary "Cross-platform paths" \
--trigger-file "src/cli/**/*.ts"
# Before the next edit, it recalls the rule automatically:
agentsmesh lessons query --file src/cli/foo.ts
# -> Normalize CLI display paths to forward slashes

Start with the lessons guide or jump to the agentsmesh lessons CLI reference.

Most wanted workflows

One .agentsmesh source

Manage AI coding rules, prompts, commands, agents, skills, MCP servers, hooks, ignore files, and permissions from one canonical directory.

Agents that learn from mistakes

Capture a lesson after every failure, recall it before every edit. One shared memory works in every tool and helps every teammate. Teach your agents →

Bidirectional migration

Import existing Claude Code, Cursor, Copilot, Gemini CLI, Windsurf, Codex CLI, and other configs, then generate them back out with round-trip metadata.

Project and global mode

Commit project config in .agentsmesh/ for teams, or sync personal AI assistant setup from ~/.agentsmesh/ to user-level tool folders.

MCP, hooks, permissions

Standardize high-value assistant capabilities where tools support them natively, with explicit matrix visibility when support is partial or embedded.

CI drift detection

Use agentsmesh diff, lint, check, watch, and merge to keep generated tool files aligned with canonical sources during reviews.

Packs, plugins, typed API

Share reusable skills and rules with packs, add new AI tools through plugin descriptors, or automate generation from the ESM API.

One canonical directory

Terminal window
.agentsmesh/
rules/_root.md
rules/*.md
commands/*.md
agents/*.md
skills/*/SKILL.md
mcp.json
hooks.yaml
permissions.yaml
ignore
lessons/lessons.json
Terminal window
agentsmesh generate
# writes CLAUDE.md, AGENTS.md, .cursor/rules/, .github/copilot-instructions.md,
# .gemini/settings.json, .windsurf/rules/, .codex/config.toml, .kiro/steering/,
# .cline/, .junie/, .roo/, .agents/, and more from the same source.

Quick start

Pick any install method — Homebrew, standalone binary, or npm/pnpm/yarn:

Terminal window
brew install samplexbro/agentsmesh/agentsmesh # no Node.js required
# or
curl -fsSL https://github.com/sampleXbro/agentsmesh/releases/latest/download/install.sh | sh
# or
npm install -D agentsmesh # requires Node.js 20+

See the installation guide for full options. The examples below use the agentsmesh binary directly — prefix with npx if you installed via npm without -g.

New project

Terminal window
agentsmesh init
# edit .agentsmesh/rules/_root.md
agentsmesh generate

Existing project

Terminal window
agentsmesh import --from cursor
agentsmesh generate

Teach your agents (optional)

Terminal window
agentsmesh init --lessons
agentsmesh generate

Personal global config

Terminal window
agentsmesh init --global
agentsmesh import --global --from claude-code
agentsmesh generate --global

The CLI is available as both agentsmesh and the shorter alias amsh.

Community catalog

Install shared skills, agents, and commands from GitHub, GitLab, git URLs, or local paths with agentsmesh install <source>; list inventory with agentsmesh installs list; remove with agentsmesh uninstall <name>. Packs live in .agentsmesh/packs/, are tracked in .agentsmesh/installs.yaml, and merge with local canonical config during generation. The classifier auto-detects Anthropic-style skill packs and imports skills, agents, references, and per-target commands in one command — see the skill-pack guide.

Tool coverage and feature matrix

AgentsMesh ships descriptor-driven support for every major AI coding tool plus plugin targets, so coverage can grow without changing the homepage copy.

Use the supported tools matrix for the exact project/global paths and native, embedded, partial, or unsupported feature coverage.

Automation and extension paths

Typed programmatic API

Import generate, importFrom, lint, diff, check, loadCanonical, and target catalog helpers from agentsmesh, agentsmesh/engine, agentsmesh/canonical, or agentsmesh/targets. API reference →

Runtime plugins

Add support for new AI coding tools with npm plugin targets. Plugins participate in project mode, global mode, feature conversion, linting, and generation. Build a plugin →

Team-safe sharing

Combine extends, installable packs, local overrides, and lock-file checks to standardize AI assistant behavior across repositories. Multi-tool teams →