Moss Tools
CLI: moss <command> [options] — all commands support --json
MCP Server: moss mcp-server
Core Primitives
Three tools for all codebase operations:
view
Show tree, file skeleton, or symbol source.
moss view [target] [options]view— project treeview src/— directory contentsview file.py— file skeleton (fuzzy paths OK)view file.py/Class— symbol source--depth N— expansion depth--deps— show dependencies--types-only— only type definitions
edit
Structural code modifications via subcommands.
moss edit <target> <subcommand>delete— remove symbolreplace "code"— swap contentinsert "code" --at before|after|prepend|append— insert relative to targetmove <dest>— move symbolswap <other>— swap two symbols--undo— undo last edit
analyze
Codebase analysis via subcommands.
moss analyze [subcommand] [options]health— file counts, line counts, avg complexitycomplexity— cyclomatic complexity per functionsecurity— vulnerability scanningcallers <symbol>— what calls this symbolcallees <symbol>— what this symbol callshotspots— frequently changed files
Search & Sessions
text-search
Regex search using ripgrep.
moss text-search <pattern> [options]-i— case-insensitive-l, --limit <N>— max results--only <glob>— filter by filename/path--exclude <glob>— exclude paths--json— structured output
sessions
Analyze agent session logs (Claude Code, Codex, Gemini, Moss).
moss sessions [session_id] [options]--format <fmt>—claude(default),codex,gemini,moss--grep <pattern>— filter sessions by content--analyze— full session analysis--jq <expr>— apply jq expression
DWIM Resolution
Tool names are resolved with fuzzy matching. Fuzzy path resolution also works: dwim.py → src/moss/dwim.py