Skip to content

feat: add tags (hashtag) support#35

Closed
PeterRosdahl wants to merge 1 commit into
openclaw:mainfrom
PeterRosdahl:feature/tags-support
Closed

feat: add tags (hashtag) support#35
PeterRosdahl wants to merge 1 commit into
openclaw:mainfrom
PeterRosdahl:feature/tags-support

Conversation

@PeterRosdahl
Copy link
Copy Markdown

Summary

Adds first-class CLI support for Apple Reminders tags (hashtags). Addresses #18.

Apple Reminders stores tags as #hashtags embedded in the reminder title text. The EventKit API doesn't expose tags as a separate property, so this implementation parses trailing hashtags from the title and provides convenient CLI flags for managing them.

New features

tags subcommand

  • remindctl tags — list all unique tags with counts
  • remindctl tags shopping — list reminders matching a specific tag

--tag flag on add

  • remindctl add "Buy milk" --tag shopping — creates with tag
  • remindctl add "Urgent" --tag "shopping,groceries" — comma-separated
  • remindctl add "Task" --tag a --tag b — repeatable

--tag, --remove-tag, --clear-tags on edit

  • remindctl edit 1 --tag urgent — add tag(s)
  • remindctl edit 1 --remove-tag old — remove specific tag(s)
  • remindctl edit 1 --clear-tags — remove all tags

--tag filter on show

  • remindctl show all --tag shopping — filter by tag

JSON output

Tags are now included in JSON output as a tags array and titleWithoutTags field:

{
  "title": "Buy milk #shopping #groceries",
  "titleWithoutTags": "Buy milk",
  "tags": ["shopping", "groceries"]
}

Implementation details

  • Tag parsing (Models.swift): Computed tags and titleWithoutTags properties on ReminderItem that extract trailing #hashtags from the title
  • Tag helpers (CommandHelpers.swift): Shared utilities for parsing CLI tag input, case-insensitive merge/remove, and title composition
  • Tag validation: Tags must be alphanumeric (plus hyphens/underscores), rejecting invalid characters
  • Tag matching is case-insensitive but preserves original casing in the stored title

Testing

  • All existing tests pass
  • swift build and swift test pass cleanly
  • Manually tested: add, edit (add/remove/clear tags), show filter, tags list, JSON output, priority + tags combo

Changes

8 files changed, 298 insertions(+), 9 deletions(-)

Add support for reading, writing, and filtering Apple Reminders tags.

Tags in Apple Reminders are stored as #hashtags in the reminder title
text. This PR adds first-class CLI support for working with them.

New features:
- `remindctl tags` - list all unique tags with counts
- `remindctl tags <name>` - list reminders matching a tag
- `remindctl add --tag <name>` - create reminders with tags
- `remindctl edit --tag <name>` - add tags to existing reminders
- `remindctl edit --remove-tag <name>` - remove specific tags
- `remindctl edit --clear-tags` - remove all tags
- `remindctl show --tag <name>` - filter reminders by tag
- Tags are included in JSON output (tags array + titleWithoutTags)

Tags can be specified as repeatable flags (--tag a --tag b) or
comma-separated (--tag a,b). Tag matching is case-insensitive.

Closes openclaw#18
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6923857247

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

let hasTagChange = !addTags.isEmpty || !removeTags.isEmpty || clearTags

if hasTagChange {
let sourceTitle = title ?? reminder.title
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Merge tag edits from existing reminder tags

When tag flags are used together with --title, this path parses tags from the new title (title ?? reminder.title) instead of the current reminder, so existing tags are silently dropped before --tag/--remove-tag is applied. For example, editing a reminder that already has #work with edit 1 --title "New" --tag urgent ends up with only #urgent, which causes unintended tag loss whenever users combine title updates with tag updates.

Useful? React with 👍 / 👎.

bobsahur-robot pushed a commit to raymondlee-personal-org/remindctl that referenced this pull request Mar 29, 2026
…nds, and output

- AddCommand: --repeat, --alarm, --url, --parent, --tags flags
- EditCommand: same + --clear-alarm, --clear-repeat, --clear-url
- EventKitStore: full read/write for all new fields via EKReminder
- OutputFormatting: display recurrence, alarm, url, tags in text + JSON
- Cherry-picked model extensions from upstream PRs openclaw#40, openclaw#39, openclaw#17, openclaw#35, openclaw#13
jakubswierczek added a commit to jakubswierczek/remindctl that referenced this pull request Mar 30, 2026
- tags command: list all tags or filter reminders by tag
- add/edit: --tag, --remove-tag, --clear-tags flags
- show: --tag filter
- JSON output includes tags and titleWithoutTags via ReminderOutput
- tags stored as trailing #hashtags in title (EventKit convention)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hezhongtang added a commit to hezhongtang/remindctl that referenced this pull request Apr 17, 2026
Merged 9 PRs from steipete/remindctl:
- openclaw#29 lint fix, openclaw#26 open filter, openclaw#35 tags support
- openclaw#30 all-day/date-only reminders, openclaw#40 recurrence rules
- openclaw#39 alarm support, openclaw#27 reminder sections
- openclaw#44 isFlagged support, openclaw#13 creationDate in output
@steipete
Copy link
Copy Markdown
Collaborator

steipete commented May 4, 2026

Thanks for the work here, but I am going to close this rather than merge.

I rechecked the current macOS SDK headers and EventKit still exposes no public Reminders tag or smart-list API. This PR implements tags by appending/parsing #hashtags in the reminder title, which would create remindctl-specific title text rather than native Reminders tags. That is too easy to confuse with real Apple Reminders tag support and would not drive native Smart Lists reliably.

If we want a helper around the notes-prefix convention some tools expose (#Tag | notes), that should be a separate, clearly named parsing/filtering feature, not first-class native tag support. Appreciate the effort.

@steipete steipete closed this May 4, 2026
@klukacin klukacin mentioned this pull request May 5, 2026
2 tasks
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.

2 participants