yasb-cli
v1.0.1
Published
Command-line client for yasb — read, write, and trash your notes from the terminal.
Maintainers
Readme
yasb-cli
Command-line client for yasb — read, write, and trash your notes from the terminal.
Install
npm i -g yasb-cliRequires Node.js 20+.
Get started
Open yasb in your browser, go to Settings → API keys → New key, copy the
yk_…value (shown once).In your terminal:
yasb login # paste the key when prompted yasb vaults # list your vaults yasb ls # list notes (newest first)
yasb login defaults to the production yasb backend. Pass --dev to point
at the development deployment.
Commands
| Command | What it does |
| ------------------------------------------- | ----------------------------------------- |
| yasb login [--dev] | Save site URL + API key locally. |
| yasb logout | Delete the saved credentials. |
| yasb whoami | Print the authed user and granted scopes. |
| yasb vaults | List your vaults. |
| yasb ls [--all] | List notes; --all includes trashed. |
| yasb cat <id> | Print a note's markdown. |
| yasb new --vault <id> --title <t> | Create a note. Reads markdown on stdin. |
| yasb edit <id> [--title <t>] | Update title and/or markdown (stdin). |
| yasb rm <id> | Soft-delete a note (restore from device). |
Examples
# Pipe a file into a new note
cat draft.md | yasb new --vault v_abc123 --title "Draft"
# Rename a note
yasb edit n_xyz789 --title "Better title"
# Replace a note's body from your editor
$EDITOR /tmp/scratch.md && yasb edit n_xyz789 < /tmp/scratch.md
# Find a note by title
yasb ls | grep -i project
# Print full markdown for backup
yasb cat n_xyz789 > backup.mdWhere credentials live
~/.config/yasb/config.json (override with $YASB_CONFIG_DIR). The file is
chmod-600 and holds the raw API key — losing it means minting a new one in
Settings, since the server only stores the hash.
What the CLI can do
The CLI talks to the same Convex backend as the Android, web, and desktop
apps over an HTTPS /api/v1 surface, authenticated with personal API keys
scoped to notes:read / notes:write (and strokes:* for future ink
support). Ink notes can be listed but not edited from the terminal — those
flow through the device apps' sync path.
License
MIT
