Skip to content

feat(cli): convert mm index to stream + click.progressbar #656

@memtomem

Description

@memtomem

Context

mm index <path> (packages/memtomem/src/memtomem/cli/indexing.py:107 and :194) calls comp.index_engine.index_path() — the non-stream path. So even after PR #653 added per-chunk SSE progress, direct CLI users see exactly the same thing they did before: nothing until the run finishes, then a single summary block.

The wizard already uses index_path_stream (init_cmd.py:_seed_with_progress) and gets per-file progress. Folding mm index into the same pattern would unify the CLI feedback story.

Proposal

Switch mm index to consume index_path_stream and render a click.progressbar matching the wizard's shape. Likely overlap with #655 (wizard chunk display) — both surfaces share the same click.progressbar constraints, so it's natural to either:

Acceptance criteria

  • mm index <large-dir> shows live per-file progress (and per-chunk if feat(cli): show chunk progress in mm init wizard's _seed_with_progress #655 lands first).
  • Ctrl-C mid-run still prints the same resume hint as today.
  • --force and --namespace flags preserved.
  • Exit code stays the same on success / partial failure / hard failure.
  • The non-stream index_path API doesn't need to be removed — internal callers (tests, MCP mem_index) may still want it.

Files likely touched

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions