Skip to content

feat(cli): add-all command and auto_delete_added_files config #231

Open

Description

@sebastianbraun25

Problem

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.

Activity

  1. sebastianbraun25 commented on Sep 4, 2026

    @sebastianbraun25
    Author

    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.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions