一键导入
hackmd-cli
Use HackMD CLI to create, read, update, delete, export, and automate personal notes and team notes from Cursor.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use HackMD CLI to create, read, update, delete, export, and automate personal notes and team notes from Cursor.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | hackmd-cli |
| description | Use HackMD CLI to create, read, update, delete, export, and automate personal notes and team notes from Cursor. |
Use this skill when a user wants to manage HackMD content programmatically from Cursor.
npm install -g @hackmd/hackmd-cli
Create an API token at hackmd.io/settings#api, then configure either:
# Interactive login (stores credentials locally)
hackmd-cli login
or:
export HMD_API_ACCESS_TOKEN=YOUR_TOKEN
For HackMD EE instances:
export HMD_API_ENDPOINT_URL=https://your.hackmd-ee.endpoint
hackmd-cli login
hackmd-cli logout
hackmd-cli whoami
Use hackmd-cli whoami to confirm the CLI can reach HackMD with current credentials (interactive login or HMD_API_ACCESS_TOKEN). For scripts or agents, prefer hackmd-cli whoami --output=json. Other useful flags: -x (--extended), --columns=..., --filter=..., --sort=..., --no-header, --no-truncate (see hackmd-cli whoami --help).
# List notes
hackmd-cli notes
# Get one note
hackmd-cli notes --noteId=<id>
# Create a note
hackmd-cli notes create --content='# Title' --title='My Note'
# Create from stdin
cat README.md | hackmd-cli notes create
# Open editor flow
hackmd-cli notes create -e
# Update a note
hackmd-cli notes update --noteId=<id> --content='# Updated'
# Delete a note
hackmd-cli notes delete --noteId=<id>
# List team notes
hackmd-cli team-notes --teamPath=<team-path>
# Create a team note
hackmd-cli team-notes create --teamPath=<team-path> --content='# Team Doc'
# Update a team note
hackmd-cli team-notes update --teamPath=<team-path> --noteId=<id> --content='# Updated'
# Delete a team note
hackmd-cli team-notes delete --teamPath=<team-path> --noteId=<id>
hackmd-cli teams
hackmd-cli history
hackmd-cli export --noteId=<id>
Use these flags on list-style commands when scripting:
--output=json
--output=yaml
--output=csv
--no-header
--no-truncate
--columns=id,title
--filter=title=README
--sort=title
-x
# Create a new note from a file
cat doc.md | hackmd-cli notes create --title="My Doc"
# Update an existing note from a file
cat doc.md | hackmd-cli notes update --noteId=<id>
hackmd-cli export --noteId=<id> > note.md
hackmd-cli notes --output=json | jq '.[] | .id'
notes for personal notes.team-notes only when a teamPath is known.Adapted from the upstream HackMD CLI skill: github.com/hackmdio/hackmd-cli
基于 SOC 职业分类