Skip to content

refactor: split commands.rs (820 LOC) into per-command modules #180

Closed

Description

@ajianaz

Problem

crates/uteke-cli/src/commands.rs is 820 LOC containing all CLI command implementations in a single file. Hard to navigate, merge conflict prone.

Proposed Split

uteke-cli/src/
├── main.rs         — CLI entry, clap config, dispatch (trimmed)
├── commands/
│   ├── mod.rs      — re-exports
│   ├── remember.rs — remember command
│   ├── recall.rs   — recall + search commands
│   ├── list.rs     — list command
│   ├── forget.rs   — forget + delete commands
│   ├── tags.rs     — tags-related commands
│   ├── stats.rs    — stats + count commands
│   ├── export.rs   — import/export commands
│   ├── server.rs   — server mode command
│   └── admin.rs    — doctor, cleanup, consolidate commands
├── config.rs       — (existing, stays)
├── output.rs       — (existing, stays)
└── bench.rs        — (existing, stays)

Rules

  • Zero behavioral changes
  • Public API unchanged (just internal file organization)
  • Each module file < 200 LOC target

Target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope:cli

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions