Skip to content

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

Merged
Yukaii merged 6 commits into
developfrom
copilot/update-tags-description-support
May 27, 2026
Merged

Add tags support to notes and team-notes commands#97
Yukaii merged 6 commits into
developfrom
copilot/update-tags-description-support

Conversation

Copy link
Copy Markdown
Contributor

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
@Yukaii
Copy link
Copy Markdown
Member

Yukaii commented May 26, 2026

@copilot resolve the merge conflicts in this pull request

…-description-support

# Conflicts:
#	README.md
#	src/commands/notes/create.ts
#	src/commands/notes/update.ts
#	src/commands/team-notes/create.ts
#	src/commands/team-notes/update.ts
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 26, 2026

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in commit d1ec87c. The conflicting files (src/commands/notes/create.ts, src/commands/notes/update.ts, src/commands/team-notes/create.ts, src/commands/team-notes/update.ts, README.md) now include both the parentFolderId support from master and the tags/permissions flags from this PR.

Copilot finished work on behalf of Yukaii May 26, 2026 20:01
@Yukaii Yukaii marked this pull request as ready for review May 27, 2026 19:19
Co-authored-by: Cursor <cursoragent@cursor.com>
@Yukaii Yukaii merged commit 841daa6 into develop May 27, 2026
5 checks passed
@Yukaii Yukaii deleted the copilot/update-tags-description-support branch May 27, 2026 19:24
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