Lionote CLI Guide
Lionote CLI is a command-line tool included with the Lionote desktop app. It lets people, scripts, and AI agents with local terminal access read, search, create, and update local notes.
Download the Lionote Skill
After downloading it, create a subdirectory named lionote and save the file as SKILL.md. Restart the agent or open a new agent session so it can load the Skill.
- Codex on Windows:
C:\Users\<username>\.codex\skills\lionote\SKILL.md - Codex on macOS/Linux:
~/.codex/skills/lionote/SKILL.md - Claude Code for the current project:
<project>/.claude/skills/lionote/SKILL.md - Claude Code for all projects:
~/.claude/skills/lionote/SKILL.md
Other agents that support Agent Skills follow the same layout: <that agent's skills directory>/lionote/SKILL.md. The Skill only tells an agent how to call the CLI safely. You still need to download and install Lionote and make sure lionote-cli is available through your system PATH.
Get started
After installing Lionote, open a new terminal window and run:
lionote-cli --helpOn Windows, you can also run:
lionote-cli.exe --helpCall the command through your system PATH; do not hard-code an app installation path in a script or agent prompt. Reopen PowerShell, Codex, or another agent session after installation so it receives the updated PATH.
Data directory and database
The CLI attempts to locate your Lionote data directory automatically. If it cannot, pass it explicitly with --data-dir. The directory contains db.json and the entity folder.
lionote-cli --data-dir "<Lionote data directory>" list --jsonAfter signing in, the database may be named <phone-number>-db.json. If you have multiple accounts, specify the database as well:
lionote-cli --data-dir "<Lionote data directory>" --db "<phone-number>-db.json" list --jsonCheck local status first
lionote-cli --version
lionote-cli capabilities --json
lionote-cli doctor --jsondoctor reports the selected data directory, database, desktopRunning, and writeSafe. Use writeSafe to decide whether a write is allowed: only write when it is true. desktopRunning only reports whether the desktop app is running; it does not by itself block writes.
Common commands
Replace <noteId>, <parentNoteId>, and <Lionote data directory> with your own values. Scripts and agents should use command-level --json for machine-readable output and errors.
List, read, and search
lionote-cli list --json
lionote-cli read <noteId> --json
lionote-cli search --query "meeting" --limit 20 --jsonsearch checks note titles, summaries, and tags. Use read <noteId> --plain when you only need the plain text body.
Create a note
lionote-cli create --title "AI-generated note" --content "Note body" --json
lionote-cli create --parent <parentNoteId> --title "Child note" --content "Body" --jsonFor longer content, read from a file or standard input:
lionote-cli create --title "Imported content" --file "./note.md" --jsonUpdate or append to a note
lionote-cli update <noteId> --title "New title" --json
lionote-cli update <noteId> --content "New body" --json
lionote-cli update <noteId> --append --content "Additional content" --jsonupdate replaces the supplied body by default. Use --append to preserve the existing body. You can also pass longer content with --file "./note.md" or --file -.
Additional operations
The CLI can also generate mind maps and flowcharts from high-level JSON, and manage tags, favorites, and bidirectional links:
lionote-cli mind set --id <noteId> --data "<mind map JSON>" --json
lionote-cli flow set --id <noteId> --data "<flowchart JSON>" --json
lionote-cli tag add --id <noteId> --name "project" --json
lionote-cli fav set --id <noteId> --json
lionote-cli link add --id <sourceNoteId> --target <targetNoteId> --jsonRun lionote-cli --help to see all commands and options.
Rules for AI agents
- Run
lionote-cli capabilities --jsonto discover capabilities, then runlionote-cli doctor --json. - Create, append, or update notes only when
writeSafe=true; treatdesktopRunningas status information. - Read an existing note with
read <noteId> --jsonbefore changing it, to confirm the target and current content. - Prefer
update <noteId> --appendwhen possible. State clearly when a full-body replacement will overwrite content. - Use the stable
lionote-clicommand name. Do not guess installation or data-directory paths; pass--data-dironly if automatic discovery fails.
The CLI performs the actual local operation. A Skill or agent prompt can help an AI discover and call it correctly, but cannot replace an installed and accessible CLI.
