pub enum Command {
Show 60 variants
Extract {
path: PathBuf,
format: Option<String>,
},
Build {
path: PathBuf,
output: Option<PathBuf>,
format: Option<Vec<String>>,
no_llm: bool,
llm: bool,
code_only: bool,
update: bool,
force: bool,
jobs: Option<usize>,
},
Cluster {
path: PathBuf,
},
Analyze {
path: PathBuf,
},
Export {
path: PathBuf,
json: bool,
html: bool,
graphml: bool,
obsidian: bool,
},
Query {
query: String,
graph: Option<PathBuf>,
model_path: Option<PathBuf>,
mode: String,
depth: usize,
},
Path {
source: String,
target: String,
path: Option<PathBuf>,
},
Stats {
path: PathBuf,
},
Validate {
path: PathBuf,
},
Merge {
a: PathBuf,
b: PathBuf,
},
MergeDriver {
base: PathBuf,
current: PathBuf,
other: PathBuf,
},
Mcp {
global_dir: Option<PathBuf>,
},
Serve {
graph: Option<PathBuf>,
path: Option<PathBuf>,
port: u16,
},
Diff {
path: PathBuf,
baseline: PathBuf,
},
Explain {
id: String,
path: Option<PathBuf>,
},
Affected {
id: String,
path: Option<PathBuf>,
graph: Option<PathBuf>,
depth: usize,
relations: Vec<String>,
},
Tree {
path: PathBuf,
root: Option<String>,
max_depth: usize,
},
Benchmark {
path: PathBuf,
runs: usize,
},
Risk {
path: PathBuf,
dry_run: bool,
},
Update {
path: PathBuf,
force: bool,
},
Watch {
path: Option<PathBuf>,
output: Option<PathBuf>,
},
Ingest {
url: String,
output: Option<PathBuf>,
},
Hook {
action: HookAction,
},
Init {
path: Option<PathBuf>,
force: bool,
},
Completions {
shell: String,
},
SaveResult {
output: Option<PathBuf>,
},
Install {
platform: String,
},
Claude {
action: PlatformAction,
},
Opencode {
action: PlatformAction,
},
Codex {
action: PlatformAction,
},
Codebuddy {
action: PlatformAction,
},
Claw {
action: PlatformAction,
},
Droid {
action: PlatformAction,
},
Cursor {
action: PlatformAction,
},
Vscode {
action: PlatformAction,
},
Aider {
action: PlatformAction,
},
Copilot {
action: PlatformAction,
},
Trae {
action: PlatformAction,
},
TraeCn {
action: PlatformAction,
},
Antigravity {
action: PlatformAction,
},
Hermes {
action: PlatformAction,
},
Kiro {
action: PlatformAction,
},
Pi {
action: PlatformAction,
},
Devin {
action: PlatformAction,
},
Global {
action: GlobalAction,
},
Diagnose {
graph: PathBuf,
json: bool,
max_examples: usize,
directed: bool,
undirected: bool,
},
CallflowHtml {
graph_path: Option<PathBuf>,
graph: Option<PathBuf>,
output: Option<PathBuf>,
project: Option<PathBuf>,
max_sections: usize,
diagram_scale: f64,
max_diagram_nodes: usize,
max_diagram_edges: usize,
},
TreeHtml {
graph: Option<PathBuf>,
output: Option<PathBuf>,
root: Option<String>,
max_children: usize,
label: Option<String>,
},
Clone {
url: String,
branch: Option<String>,
out: Option<PathBuf>,
},
Prs {
base: Option<String>,
repo: Option<String>,
limit: usize,
graph: Option<PathBuf>,
},
Version,
HookCheck,
CheckUpdate {
path: PathBuf,
},
CacheCheck {
files_from: PathBuf,
root: PathBuf,
},
MergeChunks {
files: Vec<PathBuf>,
out: PathBuf,
},
MergeSemantic {
cached: Option<PathBuf>,
new: Option<PathBuf>,
out: PathBuf,
},
Setup {
client: Option<String>,
workspace: Option<PathBuf>,
},
Resolve {
query: String,
limit: usize,
},
Module {
action: ModuleAction,
},
Telemetry {
action: TelemetryAction,
},
}Variants§
Extract
Extract code structure from source files
Build
Build graph from extraction fragments
Fields
Cluster
Run community detection
Analyze
Analyze the graph
Export
Export graph in various formats
Query
Query the graph (BM25 + optional dense search via RRF)
Fields
Path
Find shortest path between two nodes
Stats
Show graph statistics
Validate
Validate extraction JSON
Merge
Merge two graph JSON files
MergeDriver
Git merge driver for graph JSON files (union merge)
Fields
Mcp
Start MCP server (stdio transport for AI clients)
Serve
Start gRPC server
Fields
Diff
Diff two graphs for structural equivalence
Explain
Explain a node — show its details and relationships
Affected
Find nodes affected by changes to a given node
Fields
Tree
Print an ASCII tree of the graph structure
Benchmark
Benchmark the extraction pipeline
Risk
Perform temporal risk analysis on the graph
Update
Incrementally update the graph from changed sources
Watch
Watch a directory for changes and rebuild automatically
Ingest
Ingest content from a URL (web page, GitHub, paper, etc.)
Hook
Manage git hooks for automatic graph building
Fields
action: HookActionInit
Initialize a new codesynapse.toml config in the current directory
Completions
Generate shell completions
SaveResult
Save the last query or analysis result to a file
Install
Install codesynapse for a specific platform (cursor, claude, etc.)
Claude
Manage Claude Desktop integration
Fields
action: PlatformActionOpencode
Manage OpenCode integration
Fields
action: PlatformActionCodex
Manage Codex integration
Fields
action: PlatformActionCodebuddy
Manage CodeBuddy integration
Fields
action: PlatformActionClaw
Manage Claw integration
Fields
action: PlatformActionDroid
Manage Droid integration
Fields
action: PlatformActionCursor
Manage Cursor integration
Fields
action: PlatformActionVscode
Manage VS Code integration
Fields
action: PlatformActionAider
Manage Aider integration
Fields
action: PlatformActionCopilot
Manage GitHub Copilot integration
Fields
action: PlatformActionTrae
Manage Trae integration
Fields
action: PlatformActionTraeCn
Manage Trae CN integration
Fields
action: PlatformActionAntigravity
Manage Antigravity integration
Fields
action: PlatformActionHermes
Manage Hermes integration
Fields
action: PlatformActionKiro
Manage Kiro integration
Fields
action: PlatformActionPi
Manage Pi integration
Fields
action: PlatformActionDevin
Manage Devin integration
Fields
action: PlatformActionGlobal
Manage the cross-repo global graph (~/.codesynapse/)
Fields
action: GlobalActionDiagnose
Diagnose multigraph edge-collapse issues in a graph JSON file
Fields
CallflowHtml
Generate Mermaid call-flow architecture HTML from a graph.json
Fields
TreeHtml
Generate D3 collapsible-tree HTML from a graph.json (filesystem hierarchy view)
Fields
Clone
Clone a GitHub repo to a local cache dir (or pull if already cloned)
Fields
Prs
Show open PRs dashboard (requires gh CLI)
Fields
Version
Print the codesynapse version string
HookCheck
No-op hook-check (installed agents call this on every tool use; always exits 0)
CheckUpdate
Check if semantic re-extraction is pending for a path (cron-safe)
CacheCheck
Check semantic cache for a list of files; writes .codesynapse_cached.json + .codesynapse_uncached.txt
Fields
MergeChunks
Merge chunk JSON files produced by parallel semantic extraction
MergeSemantic
Merge cached semantic results with freshly-extracted chunks
Fields
Setup
Register codesynapse MCP server in installed AI clients
Fields
Resolve
Answer an architecture question using the graph (same as codesynapse_resolve MCP tool)
Fields
Module
Manage source modules: add, refresh, list, remove
Fields
action: ModuleActionTelemetry
Manage anonymous usage telemetry (opt-in)
Fields
action: TelemetryActionTrait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request