Skip to content

Implement devlog entry delete <id> #2

Description

@gustmrg

Add support for deleting an existing entry via devlog entry delete <id>.

Context:

  • README.md documents devlog entry delete <id>
  • The entry command currently does not expose a delete subcommand
  • Entries are stored in date-based JSON files under ~/.devlog/entries/

Expected behavior:

  • Find an entry by its ID
  • Show the entry being targeted for deletion
  • Ask for confirmation before deleting
  • Remove the entry from the correct daily log file
  • Save the updated daily log back to disk

Implementation notes:

  • Entry lookup will likely require scanning daily log files to find the matching id
  • If the entry is the last item in a daily log, decide whether to keep an empty file or remove it
  • Return a clear error when the ID is not found
  • Avoid destructive behavior without explicit confirmation

Acceptance criteria:

  • devlog entry delete <id> exists and appears in help output
  • The command prompts for confirmation before deletion
  • Confirmed deletions remove the correct entry from storage
  • Missing IDs produce a clear, user-friendly error
  • The resulting daily log file remains valid after deletion

Activity

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions