Skip to content

Commit 7d22012

Browse files
committed
feat: update SKILL.md to support folder APIs with commands and examples
1 parent c74cb45 commit 7d22012

2 files changed

Lines changed: 114 additions & 6 deletions

File tree

hackmd-cli.skill

527 Bytes
Binary file not shown.

hackmd-cli/SKILL.md

Lines changed: 114 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
name: hackmd-cli
3-
description: HackMD command-line interface for managing notes and team notes. Use this skill when users want to create, read, update, delete, or export HackMD notes via CLI, manage team notes, list teams, view browsing history, or automate HackMD workflows. Triggers on mentions of hackmd-cli, HackMD CLI, or requests to interact with HackMD notes programmatically.
3+
description: HackMD command-line interface for managing personal/team notes and folders. Use this skill when users want to create, read, update, delete, reorder, or export HackMD notes and folders via CLI, manage team content, list teams, view browsing history, or automate HackMD workflows.
44
---
55

66
# HackMD CLI
77

8-
Command-line tool for managing HackMD notes and team notes via the HackMD API.
8+
Command-line tool for managing HackMD notes, team notes, personal folders, and team folders via the HackMD API.
99

1010
## Setup
1111

@@ -56,6 +56,9 @@ hackmd-cli notes --noteId=<id>
5656
hackmd-cli notes create --content='# Title' --title='My Note'
5757
hackmd-cli notes create --readPermission=owner --writePermission=owner
5858

59+
# Create note inside a folder
60+
hackmd-cli notes create --parentFolderId=<folder-id> --content='# Title'
61+
5962
# Create from file/stdin
6063
cat README.md | hackmd-cli notes create
6164

@@ -65,6 +68,9 @@ hackmd-cli notes create -e
6568
# Update note
6669
hackmd-cli notes update --noteId=<id> --content='# New Content'
6770

71+
# Move note into a folder
72+
hackmd-cli notes update --noteId=<id> --parentFolderId=<folder-id>
73+
6874
# Delete note
6975
hackmd-cli notes delete --noteId=<id>
7076
```
@@ -78,13 +84,77 @@ hackmd-cli team-notes --teamPath=<team-path>
7884
# Create team note
7985
hackmd-cli team-notes create --teamPath=<team-path> --content='# Team Doc'
8086

87+
# Create team note inside a folder
88+
hackmd-cli team-notes create --teamPath=<team-path> --parentFolderId=<folder-id> --content='# Team Doc'
89+
8190
# Update team note
8291
hackmd-cli team-notes update --teamPath=<team-path> --noteId=<id> --content='# Updated'
8392

93+
# Move team note into a folder
94+
hackmd-cli team-notes update --teamPath=<team-path> --noteId=<id> --parentFolderId=<folder-id>
95+
8496
# Delete team note
8597
hackmd-cli team-notes delete --teamPath=<team-path> --noteId=<id>
8698
```
8799

100+
### Personal Folders
101+
102+
```bash
103+
# List all folders
104+
hackmd-cli folders
105+
106+
# Get specific folder
107+
hackmd-cli folders --folderId=<id>
108+
109+
# Create folder
110+
hackmd-cli folders create --name='Docs'
111+
112+
# Create nested folder
113+
hackmd-cli folders create --name='Docs' --parentFolderId=<folder-id>
114+
115+
# Create folder with metadata
116+
hackmd-cli folders create --name='Docs' --description='Project docs' --icon=1F600 --color='#4F46E5'
117+
118+
# Update folder
119+
hackmd-cli folders update --folderId=<id> --name='Updated Docs'
120+
121+
# Delete folder
122+
hackmd-cli folders delete --folderId=<id>
123+
124+
# Get / update folder order
125+
hackmd-cli folders order
126+
hackmd-cli folders order --order='{"root":["folder-id-1","folder-id-2"]}'
127+
```
128+
129+
### Team Folders
130+
131+
```bash
132+
# List all team folders
133+
hackmd-cli team-folders --teamPath=<team-path>
134+
135+
# Get specific team folder
136+
hackmd-cli team-folders --teamPath=<team-path> --folderId=<id>
137+
138+
# Create team folder
139+
hackmd-cli team-folders create --teamPath=<team-path> --name='Team Docs'
140+
141+
# Create nested team folder
142+
hackmd-cli team-folders create --teamPath=<team-path> --name='Team Docs' --parentFolderId=<folder-id>
143+
144+
# Create team folder with metadata
145+
hackmd-cli team-folders create --teamPath=<team-path> --name='Team Docs' --description='Project docs' --icon=1F600 --color='#4F46E5'
146+
147+
# Update team folder
148+
hackmd-cli team-folders update --teamPath=<team-path> --folderId=<id> --name='Updated Team Docs'
149+
150+
# Delete team folder
151+
hackmd-cli team-folders delete --teamPath=<team-path> --folderId=<id>
152+
153+
# Get / update team folder order
154+
hackmd-cli team-folders order --teamPath=<team-path>
155+
hackmd-cli team-folders order --teamPath=<team-path> --order='{"root":["folder-id-1","folder-id-2"]}'
156+
```
157+
88158
### Teams & History
89159

90160
```bash
@@ -102,12 +172,21 @@ hackmd-cli export --noteId=<id> # Export note content to stdout
102172

103173
Available permission values:
104174

105-
| Permission Type | Values |
106-
|----------------|--------|
107-
| `--readPermission` | `owner`, `signed_in`, `guest` |
108-
| `--writePermission` | `owner`, `signed_in`, `guest` |
175+
| Permission Type | Values |
176+
| --------------------- | ---------------------------------------------------------------- |
177+
| `--readPermission` | `owner`, `signed_in`, `guest` |
178+
| `--writePermission` | `owner`, `signed_in`, `guest` |
109179
| `--commentPermission` | `disabled`, `forbidden`, `owners`, `signed_in_users`, `everyone` |
110180

181+
## Folder Flags
182+
183+
```bash
184+
--parentFolderId=<folder-id> # Put note/folder inside another folder
185+
--icon=1F600 # Emoji unified codepoint string
186+
--color='#4F46E5' # Hex color string
187+
--order='{"root":["id1","id2"]}' # Folder ordering JSON
188+
```
189+
111190
## Output Formats
112191

113192
All list commands support:
@@ -119,8 +198,10 @@ All list commands support:
119198
--no-header # Hide table headers
120199
--no-truncate # Don't truncate long values
121200
--columns=id,title # Show specific columns
201+
--columns=id,name,color
122202
--filter=name=foo # Filter by property
123203
--sort=title # Sort by property (prepend '-' for descending)
204+
--sort=name
124205
-x, --extended # Show additional columns
125206
```
126207

@@ -136,6 +217,33 @@ cat doc.md | hackmd-cli notes create --title="My Doc"
136217
cat doc.md | hackmd-cli notes update --noteId=<id>
137218
```
138219

220+
### Create a folder and put a note inside it
221+
222+
```bash
223+
hackmd-cli folders create --name='Docs'
224+
hackmd-cli notes create --parentFolderId=<folder-id> --title='My Note'
225+
```
226+
227+
### Create a nested folder
228+
229+
```bash
230+
hackmd-cli folders create --name='Parent'
231+
hackmd-cli folders create --name='Child' --parentFolderId=<folder-id>
232+
```
233+
234+
### Move an existing note into a folder
235+
236+
```bash
237+
hackmd-cli notes update --noteId=<note-id> --parentFolderId=<folder-id>
238+
```
239+
240+
### Organize team docs in team folders
241+
242+
```bash
243+
hackmd-cli team-folders create --teamPath=<team-path> --name='Team Docs'
244+
hackmd-cli team-notes create --teamPath=<team-path> --parentFolderId=<folder-id> --content='# Team Note'
245+
```
246+
139247
### Export note to local file
140248

141249
```bash

0 commit comments

Comments
 (0)