Skip to content

Commit 8462eee

Browse files
Yukaiiclaude
andcommitted
chore: release v2.6.0
Bump the package version, regenerate the README command reference, and document the api commands, config command, note/folder update flags, installation speedup, and export fix in the changelog. Agent: T3 Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d9aa67c commit 8462eee

3 files changed

Lines changed: 81 additions & 30 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22

33
All notable changes to HackMD-CLI will be documented in this file.
44

5+
## 2.6.0
6+
7+
### Added
8+
9+
- `api operations`, `api describe`, and `api call` commands for calling any HackMD v1 API operation, including JSON bodies, multipart image uploads, and `--include` for status and headers (#119)
10+
- `config` command that shows the config file path and current settings without printing the access token; `--path` prints only the path (#117)
11+
- `--description` flag for `notes create`, `notes update`, `team-notes create`, and `team-notes update` (#119)
12+
- `--root` flag to move notes and folders to the root folder, and `--clear` to clear a note description or a folder description, icon, or color (#119)
13+
- `--noteId` flag on `team-notes` to show a single team note, and `--limit` flag on `history` (#119)
14+
- `--title` flag for `notes update` and `team-notes update` (#115)
15+
- Piped stdin content for `notes update` and `team-notes update` (#112)
16+
17+
### Changed
18+
19+
- Faster global npm installation: build tools moved to development dependencies and oclif upgraded (#121)
20+
- Commands now fail with a clear error instead of prompting when no access token is configured and stdin is not a terminal (#121)
21+
- Update commands reject conflicting flags (such as `--root` with `--parentFolderId`, or stdin with `--content`) and empty updates before sending a request (#112, #119)
22+
- `@hackmd/api` upgraded to 2.8.0 (#119)
23+
24+
### Fixed
25+
26+
- `export` prints note content exactly, without adding a trailing newline (#113)
27+
528
## 2.5.1
629

730
### Added

‎README.md‎

Lines changed: 57 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $ npm install -g @hackmd/hackmd-cli
3232
$ hackmd-cli COMMAND
3333
running command...
3434
$ hackmd-cli (--version|-v)
35-
@hackmd/hackmd-cli/2.5.1 darwin-arm64 node-v24.21.0
35+
@hackmd/hackmd-cli/2.6.0 darwin-arm64 node-v24.21.0
3636
$ hackmd-cli --help [COMMAND]
3737
USAGE
3838
$ hackmd-cli COMMAND
@@ -130,6 +130,7 @@ All available configurations are listed in the table below.
130130
* [`hackmd-cli api describe OPERATIONID`](#hackmd-cli-api-describe-operationid)
131131
* [`hackmd-cli api operations`](#hackmd-cli-api-operations)
132132
* [`hackmd-cli autocomplete [SHELL]`](#hackmd-cli-autocomplete-shell)
133+
* [`hackmd-cli config`](#hackmd-cli-config)
133134
* [`hackmd-cli export`](#hackmd-cli-export)
134135
* [`hackmd-cli folders`](#hackmd-cli-folders)
135136
* [`hackmd-cli folders create`](#hackmd-cli-folders-create)
@@ -187,7 +188,7 @@ EXAMPLES
187188
$ hackmd-cli api call UploadNoteImage --path noteId=abc --file image=@photo.png
188189
```
189190

190-
_See code: [src/commands/api/call.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/api/call.ts)_
191+
_See code: [src/commands/api/call.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/api/call.ts)_
191192

192193
## `hackmd-cli api describe OPERATIONID`
193194

@@ -204,7 +205,7 @@ DESCRIPTION
204205
Show details for an API operation
205206
```
206207

207-
_See code: [src/commands/api/describe.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/api/describe.ts)_
208+
_See code: [src/commands/api/describe.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/api/describe.ts)_
208209

209210
## `hackmd-cli api operations`
210211

@@ -221,7 +222,7 @@ DESCRIPTION
221222
List available API operations
222223
```
223224

224-
_See code: [src/commands/api/operations.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/api/operations.ts)_
225+
_See code: [src/commands/api/operations.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/api/operations.ts)_
225226

226227
## `hackmd-cli autocomplete [SHELL]`
227228

@@ -252,7 +253,34 @@ EXAMPLES
252253
$ hackmd-cli autocomplete --refresh-cache
253254
```
254255

255-
_See code: [src/commands/autocomplete/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/autocomplete/index.ts)_
256+
_See code: [src/commands/autocomplete/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/autocomplete/index.ts)_
257+
258+
## `hackmd-cli config`
259+
260+
Show config file path and current configuration (credentials are never printed)
261+
262+
```
263+
USAGE
264+
$ hackmd-cli config [-h] [--path]
265+
266+
FLAGS
267+
-h, --help Show CLI help.
268+
--path print only the config file path
269+
270+
DESCRIPTION
271+
Show config file path and current configuration (credentials are never printed)
272+
273+
EXAMPLES
274+
$ hackmd-cli config
275+
Config file: /Users/you/.hackmd/config.json
276+
hackmdAPIEndpointURL: https://api.hackmd.io/v1
277+
accessToken: (set)
278+
279+
$ hackmd-cli config --path
280+
/Users/you/.hackmd/config.json
281+
```
282+
283+
_See code: [src/commands/config.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/config.ts)_
256284

257285
## `hackmd-cli export`
258286

@@ -274,7 +302,7 @@ EXAMPLES
274302
# A note to be exported
275303
```
276304

277-
_See code: [src/commands/export.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/export.ts)_
305+
_See code: [src/commands/export.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/export.ts)_
278306

279307
## `hackmd-cli folders`
280308

@@ -308,7 +336,7 @@ EXAMPLES
308336
91722050-bf47-4334-9e5d-87125a724c29 #4F46E5 Project documentation 1F600 engineering fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c
309337
```
310338

311-
_See code: [src/commands/folders/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/folders/index.ts)_
339+
_See code: [src/commands/folders/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/folders/index.ts)_
312340

313341
## `hackmd-cli folders create`
314342

@@ -347,7 +375,7 @@ EXAMPLES
347375
a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d docs fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c #4F46E5 Docs 1F600
348376
```
349377

350-
_See code: [src/commands/folders/create.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/folders/create.ts)_
378+
_See code: [src/commands/folders/create.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/folders/create.ts)_
351379

352380
## `hackmd-cli folders delete`
353381

@@ -368,7 +396,7 @@ EXAMPLES
368396
$ hackmd-cli folders delete --folderId=a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
369397
```
370398

371-
_See code: [src/commands/folders/delete.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/folders/delete.ts)_
399+
_See code: [src/commands/folders/delete.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/folders/delete.ts)_
372400

373401
## `hackmd-cli folders order`
374402

@@ -391,7 +419,7 @@ EXAMPLES
391419
$ hackmd-cli folders order --order='{"root":["91722050-bf47-4334-9e5d-87125a724c29","fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c"]}'
392420
```
393421

394-
_See code: [src/commands/folders/order.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/folders/order.ts)_
422+
_See code: [src/commands/folders/order.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/folders/order.ts)_
395423

396424
## `hackmd-cli folders update`
397425

@@ -423,7 +451,7 @@ EXAMPLES
423451
$ hackmd-cli folders update --folderId=a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d --root --clear=description
424452
```
425453

426-
_See code: [src/commands/folders/update.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/folders/update.ts)_
454+
_See code: [src/commands/folders/update.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/folders/update.ts)_
427455

428456
## `hackmd-cli help [COMMAND]`
429457

@@ -480,7 +508,7 @@ EXAMPLES
480508
$ hackmd-cli history --limit=10
481509
```
482510

483-
_See code: [src/commands/history.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/history.ts)_
511+
_See code: [src/commands/history.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/history.ts)_
484512

485513
## `hackmd-cli login`
486514

@@ -502,7 +530,7 @@ EXAMPLES
502530
Login successfully
503531
```
504532

505-
_See code: [src/commands/login.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/login.ts)_
533+
_See code: [src/commands/login.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/login.ts)_
506534

507535
## `hackmd-cli logout`
508536

@@ -523,7 +551,7 @@ EXAMPLES
523551
You've logged out successfully
524552
```
525553

526-
_See code: [src/commands/logout.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/logout.ts)_
554+
_See code: [src/commands/logout.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/logout.ts)_
527555

528556
## `hackmd-cli notes`
529557

@@ -557,7 +585,7 @@ EXAMPLES
557585
raUuSTetT5uQbqQfLnz9lA CLI test note gvfz2UB5THiKABQJQnLs6Q null
558586
```
559587

560-
_See code: [src/commands/notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/notes/index.ts)_
588+
_See code: [src/commands/notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/notes/index.ts)_
561589

562590
## `hackmd-cli notes create`
563591

@@ -612,7 +640,7 @@ EXAMPLES
612640
$ hackmd-cli notes create --title='My note' --description='Short summary'
613641
```
614642

615-
_See code: [src/commands/notes/create.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/notes/create.ts)_
643+
_See code: [src/commands/notes/create.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/notes/create.ts)_
616644

617645
## `hackmd-cli notes delete`
618646

@@ -633,7 +661,7 @@ EXAMPLES
633661
$ hackmd-cli notes delete --noteId=WNkLM6gkS0Cg2cQ8rv7bYA
634662
```
635663

636-
_See code: [src/commands/notes/delete.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/notes/delete.ts)_
664+
_See code: [src/commands/notes/delete.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/notes/delete.ts)_
637665

638666
## `hackmd-cli notes update`
639667

@@ -681,7 +709,7 @@ EXAMPLES
681709
$ hackmd-cli notes update --noteId=WNkLM6gkS0Cg2cQ8rv7bYA --clear=description
682710
```
683711

684-
_See code: [src/commands/notes/update.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/notes/update.ts)_
712+
_See code: [src/commands/notes/update.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/notes/update.ts)_
685713

686714
## `hackmd-cli team-folders`
687715

@@ -716,7 +744,7 @@ EXAMPLES
716744
91722050-bf47-4334-9e5d-87125a724c29 #4F46E5 Team handbook 1F600 team-docs fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c
717745
```
718746

719-
_See code: [src/commands/team-folders/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/team-folders/index.ts)_
747+
_See code: [src/commands/team-folders/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/team-folders/index.ts)_
720748

721749
## `hackmd-cli team-folders create`
722750

@@ -756,7 +784,7 @@ EXAMPLES
756784
a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d team-docs fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c #4F46E5 Docs 1F600
757785
```
758786

759-
_See code: [src/commands/team-folders/create.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/team-folders/create.ts)_
787+
_See code: [src/commands/team-folders/create.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/team-folders/create.ts)_
760788

761789
## `hackmd-cli team-folders delete`
762790

@@ -778,7 +806,7 @@ EXAMPLES
778806
$ hackmd-cli team-folders delete --teamPath=CLI-test --folderId=a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
779807
```
780808

781-
_See code: [src/commands/team-folders/delete.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/team-folders/delete.ts)_
809+
_See code: [src/commands/team-folders/delete.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/team-folders/delete.ts)_
782810

783811
## `hackmd-cli team-folders order`
784812

@@ -802,7 +830,7 @@ EXAMPLES
802830
$ hackmd-cli team-folders order --teamPath=CLI-test --order='{"root":["91722050-bf47-4334-9e5d-87125a724c29","fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c"]}'
803831
```
804832

805-
_See code: [src/commands/team-folders/order.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/team-folders/order.ts)_
833+
_See code: [src/commands/team-folders/order.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/team-folders/order.ts)_
806834

807835
## `hackmd-cli team-folders update`
808836

@@ -835,7 +863,7 @@ EXAMPLES
835863
$ hackmd-cli team-folders update --teamPath=CLI-test --folderId=a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d --root --clear=description
836864
```
837865

838-
_See code: [src/commands/team-folders/update.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/team-folders/update.ts)_
866+
_See code: [src/commands/team-folders/update.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/team-folders/update.ts)_
839867

840868
## `hackmd-cli team-notes`
841869

@@ -873,7 +901,7 @@ EXAMPLES
873901
$ hackmd-cli team-notes --teamPath=CLI-test --noteId=WNkLM6gkS0Cg2cQ8rv7bYA
874902
```
875903

876-
_See code: [src/commands/team-notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/team-notes/index.ts)_
904+
_See code: [src/commands/team-notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/team-notes/index.ts)_
877905

878906
## `hackmd-cli team-notes create`
879907

@@ -929,7 +957,7 @@ EXAMPLES
929957
$ hackmd-cli team-notes create --teamPath=CLI-test --title='My note' --description='Short summary'
930958
```
931959

932-
_See code: [src/commands/team-notes/create.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/team-notes/create.ts)_
960+
_See code: [src/commands/team-notes/create.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/team-notes/create.ts)_
933961

934962
## `hackmd-cli team-notes delete`
935963

@@ -951,7 +979,7 @@ EXAMPLES
951979
$ hackmd-cli team-notes delete --teamPath=CLI-test --noteId=WNkLM6gkS0Cg2cQ8rv7bYA
952980
```
953981

954-
_See code: [src/commands/team-notes/delete.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/team-notes/delete.ts)_
982+
_See code: [src/commands/team-notes/delete.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/team-notes/delete.ts)_
955983

956984
## `hackmd-cli team-notes update`
957985

@@ -1000,7 +1028,7 @@ EXAMPLES
10001028
$ hackmd-cli team-notes update --teamPath=CLI-test --noteId=WNkLM6gkS0Cg2cQ8rv7bYA --clear=description
10011029
```
10021030

1003-
_See code: [src/commands/team-notes/update.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/team-notes/update.ts)_
1031+
_See code: [src/commands/team-notes/update.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/team-notes/update.ts)_
10041032

10051033
## `hackmd-cli teams`
10061034

@@ -1033,7 +1061,7 @@ EXAMPLES
10331061
f76308a6-d77a-41f6-86d0-8ada426a6fb4 CLI test team CLI-test 82f7f3d9-4079-4c78-8a00-14094272ece9
10341062
```
10351063

1036-
_See code: [src/commands/teams.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/teams.ts)_
1064+
_See code: [src/commands/teams.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/teams.ts)_
10371065

10381066
## `hackmd-cli version`
10391067

@@ -1086,7 +1114,7 @@ EXAMPLES
10861114
82f7f3d9-4079-4c78-8a00-14094272ece9 Ming-Hsiu Tsai null gvfz2UB5THiKABQJQnLs6Q
10871115
```
10881116

1089-
_See code: [src/commands/whoami.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/whoami.ts)_
1117+
_See code: [src/commands/whoami.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.6.0/src/commands/whoami.ts)_
10901118
<!-- commandsstop -->
10911119

10921120
## License

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hackmd/hackmd-cli",
3-
"version": "2.5.1",
3+
"version": "2.6.0",
44
"author": "HackMD Team",
55
"bin": {
66
"hackmd-cli": "./bin/run"

0 commit comments

Comments
 (0)