Adopting AgentsMesh in an Existing Project
If your project already has AI tool configs scattered across .claude/, .cursor/, .cline/, and so on, this guide walks you through consolidating them under AgentsMesh without losing any existing config.
Prerequisites
- Node.js 20+
- The project already has tool configs in one or more tool directories
Migration steps
-
Install AgentsMesh
Terminal window npm install -D agentsmesh -
Initialize the canonical directory
Terminal window npx agentsmesh initAgentsMesh scans the project and prompts you to import each detected config. Use
--yesto import everything without prompts:Terminal window npx agentsmesh init --yes -
Verify the canonical files
After import, review what was created:
Terminal window ls .agentsmesh/rules/ls .agentsmesh/commands/ls .agentsmesh/agents/ls .agentsmesh/skills/cat .agentsmesh/mcp.jsoncat .agentsmesh/permissions.yamlcat .agentsmesh/hooks.yamlCheck that all your rules, commands, agents, and other config came through correctly.
-
Configure agentsmesh.yaml
Set the targets your team actually uses:
version: 1targets:- claude-code- cursor# add others as neededfeatures:- rules- commands- agents- skills- mcp- hooks- ignore- permissions -
Regenerate for all targets
Terminal window npx agentsmesh generateThis writes fresh output to each tool directory based on the canonical sources.
-
Verify nothing unexpected changed
Terminal window npx agentsmesh diffThe diff should show no changes (since the generated output should match what was imported). If there are differences, review them — they represent normalization that AgentsMesh applied during the round-trip.
-
Commit everything
Terminal window git add .agentsmesh/ agentsmesh.yaml .claude/ .cursor/git commit -m "feat: adopt agentsmesh for AI tool config sync"
What to tell your team
- Edit
.agentsmesh/files (not tool directories directly) - Run
npx agentsmesh generateafter editing - Commit both
.agentsmesh/and the generated tool directories - CI will run
npx agentsmesh checkto catch drift
Adding more tools later
When a new developer joins who uses a different tool (e.g., Gemini CLI), add it to agentsmesh.yaml and generate:
targets: - claude-code - cursor - gemini-cli # new additionnpx agentsmesh generateTheir tool directory (.gemini/) is now in sync with the rest of the team.