Skip to content

CLI Reference

AgentsMesh ships a CLI available as agentsmesh and the short alias amsh.

Terminal window
agentsmesh --help
amsh --help

Global flags

FlagDescription
--helpShow help output and exit.
--versionPrint CLI version and exit.
--verboseShow full error stack traces on failure.

Commands

init

Scaffold the canonical .agentsmesh/ directory and agentsmesh.yaml. Detects and optionally imports existing tool configs. → init docs

generate

Generate target-specific config files from the canonical directory. The primary command you run after editing canonical files. → generate docs

import

Import an existing tool’s config into canonical format. Supports all 9 tools. → import docs

install

Install rules, commands, agents, or skills from GitHub, GitLab, git URLs, or local paths. → install docs

diff

Show a unified diff of what the next generate would change, without writing anything. → diff docs

lint

Validate canonical files against target-specific constraints. → lint docs

watch

Watch .agentsmesh/ for changes and auto-regenerate on save. → watch docs

check

Verify sync status for CI pipelines. Exits 1 if drift is detected. → check docs

merge

Resolve .agentsmesh/.lock merge conflicts after git merge. → merge docs

matrix

Display the feature-target compatibility matrix for your config. → matrix docs

Common workflows

Terminal window
# Initial setup
agentsmesh init
agentsmesh generate
# Day-to-day editing
# 1. Edit .agentsmesh/ files
agentsmesh diff # preview changes
agentsmesh generate # apply changes
# Or use watch mode during active editing
agentsmesh watch
# CI pipeline
agentsmesh check # exits 1 if out of sync
# After git merge with conflicts
agentsmesh merge # rebuild lock from current state
agentsmesh generate