Skip to content

Add tags support to notes and team-notes commands#97

Draft
Copilot wants to merge 4 commits intodevelopfrom
copilot/update-tags-description-support
Draft

Add tags support to notes and team-notes commands#97
Copilot wants to merge 4 commits intodevelopfrom
copilot/update-tags-description-support

Conversation

Copy link

Copilot AI commented Mar 24, 2026

The CLI had no way to set or view note tags, despite the HackMD API returning tags: string[] on every Note object.

Changes

  • New flag--tags <value> added to flags.ts as a comma-separated string (e.g. tag1,tag2)
  • notes create / team-notes create – accept --tags, pass parsed array to API payload, surface a Tags column in the output table
  • notes update / team-notes update – accept --tags, include parsed array in the PATCH payload
  • notes / team-notes index listings – render a Tags column
  • README – updated USAGE, FLAGS, and EXAMPLES for all six affected commands

Example

# Create a note with tags
hackmd-cli notes create --content='# Hello' --tags=cli,docs

# Update tags on an existing note
hackmd-cli notes update --noteId=WNkLM6gkS0Cg2cQ8rv7bYA --tags=tag1,tag2

# List notes now shows Tags column
hackmd-cli notes
# ID                     Title       Tags        User Path    Team Path
# ────────────────────── ─────────── ─────────── ──────────── ─────────
# raUuSTetT5uQbqQfLnz9lA Hello       cli, docs   userABC      null

Since tags is not part of the upstream CreateNoteOptions type or the updateNote payload's Pick, the extended payload is cast through an intersection type (& {tags?: string[]}) before being forwarded to the API client.


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI and others added 3 commits March 24, 2026 04:44
Copilot AI changed the title Remove package-lock.json Add tags support to notes and team-notes commands Mar 24, 2026
Copilot AI requested a review from Yukaii March 24, 2026 05:05
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