You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(cli): add-all command and auto_delete_added_files config #231
The openkb add command supports adding directories recursively, but users who frequently download documents to /raw must manually invoke openkb add raw/ and then manually delete processed files. There is no batch processing command for the /raw staging directory, and no configuration option to auto-delete successfully ingested files and duplicates.
Solution
Add new config parameter auto_delete_added_files (default: false)
Implement add-all CLI command that processes all files in /raw directory
Apply auto-delete logic to both add and add-all commands (when config is enabled)
Delete files on both success ("added") and duplicates ("skipped") to keep raw/ clean
Preserve failed files to allow user retries
Update help texts and documentation
This issue was drafted with the assistance of an AI assistant.
Implementation note: the final solution in PR #232 consolidates this functionality directly into openkb add (with no PATH argument defaulting to raw/, plus a summary and empty-dir cleanup)
instead of adding a separate add-all command as originally sketched above. This avoided
duplicating the directory-processing code path between two near-identical commands. The auto_delete_added_files config option and its behavior (delete on "added"/"skipped", keep
"failed") are unchanged from the original plan.
Activity
sebastianbraun25 commentedon Sep 4, 2026
Implementation note: the final solution in PR #232 consolidates this functionality directly into
openkb add(with no PATH argument defaulting toraw/, plus a summary and empty-dir cleanup)instead of adding a separate
add-allcommand as originally sketched above. This avoidedduplicating the directory-processing code path between two near-identical commands. The
auto_delete_added_filesconfig option and its behavior (delete on "added"/"skipped", keep"failed") are unchanged from the original plan.