Skip to content

Lionote CLI Guide

Lionote

About 758 wordsAbout 3 min

CLIAI AgentAutomation

2026-08-27

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

Download Lionote SKILL.md

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 --help

On Windows, you can also run:

lionote-cli.exe --help

Call 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 --json

After 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 --json

Check local status first

lionote-cli --version
lionote-cli capabilities --json
lionote-cli doctor --json

doctor 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.

lionote-cli list --json
lionote-cli read <noteId> --json
lionote-cli search --query "meeting" --limit 20 --json

search 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" --json

For longer content, read from a file or standard input:

lionote-cli create --title "Imported content" --file "./note.md" --json

Update 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" --json

update 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> --json

Run lionote-cli --help to see all commands and options.

Rules for AI agents

  1. Run lionote-cli capabilities --json to discover capabilities, then run lionote-cli doctor --json.
  2. Create, append, or update notes only when writeSafe=true; treat desktopRunning as status information.
  3. Read an existing note with read <noteId> --json before changing it, to confirm the target and current content.
  4. Prefer update <noteId> --append when possible. State clearly when a full-body replacement will overwrite content.
  5. Use the stable lionote-cli command name. Do not guess installation or data-directory paths; pass --data-dir only 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.

Contributors: Ray