Expand description
Command enum and related types for the new CLI interface.
This module defines the canonical loct <command> [options] interface.
The Command enum is the source of truth for all CLI commands and backs
both the parser and help output.
§Design Philosophy
- Agent-first: The tool is primarily for AI agents, with humans having a minimal CLI interface (5 core commands).
- Minimal commands, exclusive flags: Flags modify/exclude default behavior, they don’t add functionality.
- Regex on metadata: Agents can filter using regex on symbol names, paths, namespaces - but never on raw source code.
Structs§
- Auto
Options - Options for the
autocommand (default behavior). - Commands
Options - Options for the
commandscommand (Tauri command bridges). - Coverage
Options - Options for the
coveragecommand (test coverage analysis). - Crowd
Options - Options for the
crowdcommand. Detects functional crowds - multiple files clustering around same functionality. - Cycles
Options - Options for the
cyclescommand. - Dead
Options - Options for the
deadcommand. - Diff
Options - Options for the
diffcommand. - Dist
Options - Options for the
distcommand. Analyzes bundle distribution using source maps. - Events
Options - Options for the
eventscommand. - Find
Options - Options for the
findcommand. - Focus
Options - Options for the
focuscommand. Focus on a directory - like slice but for directories. - Global
Options - Global options that apply to all commands.
- Help
Options - Options for the
helpcommand. - Hotspots
Options - Options for the
hotspotscommand. Shows import frequency heatmap - which files are core vs peripheral. - Impact
Command Options - Options for the
impactcommand. - Info
Options - Options for the
infocommand. - JqQuery
Options - Options for jq-style query mode (loct ‘.filter’)
- Layoutmap
Options - Options for the
layoutmapcommand. Analyze CSS layout properties (z-index, position, display). - Lint
Options - Options for the
lintcommand. - Memex
Options - Options for the
memexcommand. Indexes loctree analysis into AI memory (vector database). - Parsed
Command - Result of parsing command-line arguments.
- Query
Options - Options for the
querycommand. - Report
Options - Options for the
reportcommand. - Routes
Options - Options for the
routescommand. - Scan
Options - Options for the
scancommand. - Slice
Options - Options for the
slicecommand. - Sniff
Options - Options for the
sniffcommand. Aggregates code smell findings (twins, dead parrots, crowds). - Suppress
Options - Options for the
suppresscommand. Manage false positive suppressions. - Tagmap
Options - Options for the
tagmapcommand. Unified search aggregating files, crowds, and dead code around a keyword. - Tree
Options - Options for the
treecommand. - Twins
Options - Options for the
twinscommand. Shows symbol registry and dead parrots (0 import count). - Zombie
Options - Options for the
zombiecommand. Find all zombie code (dead exports + orphan files + shadows).