Module command

Module command 

Source
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§

AutoOptions
Options for the auto command (default behavior).
CommandsOptions
Options for the commands command (Tauri command bridges).
CoverageOptions
Options for the coverage command (test coverage analysis).
CrowdOptions
Options for the crowd command. Detects functional crowds - multiple files clustering around same functionality.
CyclesOptions
Options for the cycles command.
DeadOptions
Options for the dead command.
DiffOptions
Options for the diff command.
DistOptions
Options for the dist command. Analyzes bundle distribution using source maps.
EventsOptions
Options for the events command.
FindOptions
Options for the find command.
FocusOptions
Options for the focus command. Focus on a directory - like slice but for directories.
GlobalOptions
Global options that apply to all commands.
HelpOptions
Options for the help command.
HotspotsOptions
Options for the hotspots command. Shows import frequency heatmap - which files are core vs peripheral.
ImpactCommandOptions
Options for the impact command.
InfoOptions
Options for the info command.
JqQueryOptions
Options for jq-style query mode (loct ‘.filter’)
LayoutmapOptions
Options for the layoutmap command. Analyze CSS layout properties (z-index, position, display).
LintOptions
Options for the lint command.
MemexOptions
Options for the memex command. Indexes loctree analysis into AI memory (vector database).
ParsedCommand
Result of parsing command-line arguments.
QueryOptions
Options for the query command.
ReportOptions
Options for the report command.
RoutesOptions
Options for the routes command.
ScanOptions
Options for the scan command.
SliceOptions
Options for the slice command.
SniffOptions
Options for the sniff command. Aggregates code smell findings (twins, dead parrots, crowds).
SuppressOptions
Options for the suppress command. Manage false positive suppressions.
TagmapOptions
Options for the tagmap command. Unified search aggregating files, crowds, and dead code around a keyword.
TreeOptions
Options for the tree command.
TwinsOptions
Options for the twins command. Shows symbol registry and dead parrots (0 import count).
ZombieOptions
Options for the zombie command. Find all zombie code (dead exports + orphan files + shadows).

Enums§

Command
The canonical command enum for the loct <command> interface.
QueryKind
Query kind for the query command.