Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

permissions:
id-token: write # Required for OIDC
contents: write # Required for GitHub pre-releases
contents: write # Required for GitHub releases

jobs:
publish-release:
Expand Down Expand Up @@ -45,6 +45,27 @@ jobs:
- name: Publish to npm
run: npm publish --access public

- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG="${GITHUB_REF_NAME}"
VERSION="${TAG#v}"
if gh release view "$TAG" >/dev/null 2>&1; then
echo "GitHub release ${TAG} already exists, skipping"
exit 0
fi
NOTES="$(awk -v ver="$VERSION" '
$0 == "## " ver {p=1; next}
p && /^## / {exit}
p
' CHANGELOG.md)"
gh release create "$TAG" \
--title "$TAG" \
--notes "$NOTES" \
--generate-notes \
--latest

publish-prerelease:
name: Pre-release (develop)
if: github.ref == 'refs/heads/develop'
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

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

## 2.5.1

### Added

- `--tags` flag for `notes create`, `notes update`, `team-notes create`, and `team-notes update`
- Tags column on `notes` and `team-notes` list output
- `--readPermission`, `--writePermission`, and `--permalink` flags for `notes update` and `team-notes update`
- Automated npm prereleases and GitHub pre-releases from the `develop` branch

### Changed

- Agent skill now includes workflow verification steps and an error-handling table
- CodiMD compatibility notice now points to the standalone [codimd-cli](https://github.com/hackmdio/codimd-cli)

### Fixed

- `readPermission` and `writePermission` flags no longer overwrite each other when both are set

## 2.5.0

### Added
Expand Down
64 changes: 32 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $ npm install -g @hackmd/hackmd-cli
$ hackmd-cli COMMAND
running command...
$ hackmd-cli (--version|-v)
@hackmd/hackmd-cli/2.5.0 darwin-arm64 node-v26.0.0
@hackmd/hackmd-cli/2.5.1 darwin-arm64 node-v26.0.0
$ hackmd-cli --help [COMMAND]
USAGE
$ hackmd-cli COMMAND
Expand Down Expand Up @@ -179,7 +179,7 @@ EXAMPLES
# A note to be exported
```

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

## `hackmd-cli folders`

Expand Down Expand Up @@ -213,7 +213,7 @@ EXAMPLES
91722050-bf47-4334-9e5d-87125a724c29 #4F46E5 Project documentation 1F600 engineering fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c
```

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

## `hackmd-cli folders create`

Expand Down Expand Up @@ -369,7 +369,7 @@ EXAMPLES
BnC6gN0_TfStV2KKmPPXeg Welcome to your team's workspace null CLI-test
```

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

## `hackmd-cli login`

Expand All @@ -391,7 +391,7 @@ EXAMPLES
Login successfully
```

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

## `hackmd-cli logout`

Expand All @@ -412,7 +412,7 @@ EXAMPLES
You've logged out successfully
```

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

## `hackmd-cli notes`

Expand Down Expand Up @@ -446,7 +446,7 @@ EXAMPLES
raUuSTetT5uQbqQfLnz9lA CLI test note gvfz2UB5THiKABQJQnLs6Q null
```

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

## `hackmd-cli notes create`

Expand Down Expand Up @@ -522,18 +522,18 @@ Update note

```
USAGE
$ hackmd-cli notes update [--content <value>] [-h] [--noteId <value>] [--parentFolderId <value>] [--permalink <value>]
[--readPermission <value>] [--tags <value>] [--writePermission <value>]
$ hackmd-cli notes update [--content <value>] [-h] [--noteId <value>] [--parentFolderId <value>] [--permalink
<value>] [--readPermission <value>] [--tags <value>] [--writePermission <value>]

FLAGS
-h, --help Show CLI help.
--content=<value> new note content
--noteId=<value> HackMD note id
--parentFolderId=<value> parent folder id
--permalink=<value> note permalink
--readPermission=<value> set note permission: owner, signed_in, guest
--tags=<value> set note tags, comma-separated (e.g. tag1,tag2)
--writePermission=<value> set note permission: owner, signed_in, guest
-h, --help Show CLI help.
--content=<value> new note content
--noteId=<value> HackMD note id
--parentFolderId=<value> parent folder id
--permalink=<value> note permalink
--readPermission=<value> set note permission: owner, signed_in, guest
--tags=<value> set note tags, comma-separated (e.g. tag1,tag2)
--writePermission=<value> set note permission: owner, signed_in, guest

DESCRIPTION
Update note
Expand Down Expand Up @@ -581,7 +581,7 @@ EXAMPLES
91722050-bf47-4334-9e5d-87125a724c29 #4F46E5 Team handbook 1F600 team-docs fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c
```

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

## `hackmd-cli team-folders create`

Expand Down Expand Up @@ -722,7 +722,7 @@ EXAMPLES
BnC6gN0_TfStV2KKmPPXeg Welcome to your team's workspace null CLI-test
```

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

## `hackmd-cli team-notes create`

Expand Down Expand Up @@ -801,19 +801,19 @@ Update team note

```
USAGE
$ hackmd-cli team-notes update [--content <value>] [-h] [--noteId <value>] [--parentFolderId <value>]
[--permalink <value>] [--readPermission <value>] [--tags <value>] [--teamPath <value>] [--writePermission <value>]
$ hackmd-cli team-notes update [--content <value>] [-h] [--noteId <value>] [--parentFolderId <value>] [--permalink
<value>] [--readPermission <value>] [--tags <value>] [--teamPath <value>] [--writePermission <value>]

FLAGS
-h, --help Show CLI help.
--content=<value> new note content
--noteId=<value> HackMD note id
--parentFolderId=<value> parent folder id
--permalink=<value> note permalink
--readPermission=<value> set note permission: owner, signed_in, guest
--tags=<value> set note tags, comma-separated (e.g. tag1,tag2)
--teamPath=<value> HackMD team path
--writePermission=<value> set note permission: owner, signed_in, guest
-h, --help Show CLI help.
--content=<value> new note content
--noteId=<value> HackMD note id
--parentFolderId=<value> parent folder id
--permalink=<value> note permalink
--readPermission=<value> set note permission: owner, signed_in, guest
--tags=<value> set note tags, comma-separated (e.g. tag1,tag2)
--teamPath=<value> HackMD team path
--writePermission=<value> set note permission: owner, signed_in, guest

DESCRIPTION
Update team note
Expand Down Expand Up @@ -859,7 +859,7 @@ EXAMPLES
f76308a6-d77a-41f6-86d0-8ada426a6fb4 CLI test team CLI-test 82f7f3d9-4079-4c78-8a00-14094272ece9
```

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

## `hackmd-cli version`

Expand Down Expand Up @@ -912,7 +912,7 @@ EXAMPLES
82f7f3d9-4079-4c78-8a00-14094272ece9 Ming-Hsiu Tsai null gvfz2UB5THiKABQJQnLs6Q
```

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

## License
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hackmd/hackmd-cli",
"version": "2.5.0",
"version": "2.5.1",
"author": "HackMD Team",
"bin": {
"hackmd-cli": "./bin/run"
Expand Down
Loading