Skip to content

feat(cli): add leann rebuild for re-running a build with stored config (#123)#326

Open
raoabinav wants to merge 1 commit into
yichuan-w:mainfrom
raoabinav:feat/leann-rebuild-issue-123
Open

feat(cli): add leann rebuild for re-running a build with stored config (#123)#326
raoabinav wants to merge 1 commit into
yichuan-w:mainfrom
raoabinav:feat/leann-rebuild-issue-123

Conversation

@raoabinav
Copy link
Copy Markdown
Contributor

@raoabinav raoabinav commented May 20, 2026

Closes #123.

Adds leann rebuild <index> which re-runs the original build using the config recorded in the index's .meta.json + sync_roots.json. By default it's an incremental delta (because leann build is already idempotent), and --force does a full rebuild from scratch.

Errors clearly when sync config is missing, that case only comes up for indexes built via the Python API which don't record their docs roots, so there's nothing to replay.

The arg-reconstruction logic that would have been duplicated with _watch_trigger_build is now in a shared _reconstruct_build_args() helper with a verbose knob: rebuild prints why it can't proceed, watch stays silent (since it polls and shouldn't spam logs).

…fig (yichuan-w#123)

Closes yichuan-w#123.

Adds `leann rebuild <index>` which re-runs the original build using the
config recorded in the index's `.meta.json` + `sync_roots.json`. By default
it's an incremental delta (because `leann build` is already idempotent), and
`--force` does a full rebuild from scratch.

Errors clearly when sync config is missing — that case only comes up for
indexes built via the Python API which don't record their docs roots, so
there's nothing to replay.

The arg-reconstruction logic that was previously duplicated between this and
`_watch_trigger_build` is now in a shared `_reconstruct_build_args()` helper
with a `verbose` knob: rebuild prints why it can't proceed, watch stays
silent (since it polls and shouldn't spam logs).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@raoabinav raoabinav force-pushed the feat/leann-rebuild-issue-123 branch from 7728af1 to 2c457c9 Compare May 20, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

leann rebuild

1 participant