Skip to content

CLI Command-Line Tool

Overview

open-note-cli provides a command-line interface for operating notes from the terminal.

Installation

  • Option 1: In the desktop app, go to SettingsCLI Tools and click Install CLI
  • Option 2:
bash
pip install open-note-cli

Verify Installation

bash
opennote --version

Usage

bash
opennote --help

Configuration

Using the default database path is recommended and requires no extra configuration.

Change Database Path

To specify a database path, configure it with:

bash
open-note config set-db /path/to/notes.db

Or set an environment variable:

bash
export OPEN_NOTE_DB_PATH=/path/to/notes.db

View Configuration

To view current configuration:

bash
opennote config get

Command Reference

note

Note management command group.

list

List notes.

bash
opennote note list

Options:

OptionShortDefaultDescription
--limit-l10Maximum number to display
--category-cNoneFilter by category
--favorites-fFalseShow favorites only

Examples:

bash
# Show the first 20 items
opennote note list -l 20

# Show only the "Work" category
opennote note list -c Work

# Show favorites only
opennote note list -f

show

View note details.

bash
opennote note show <note_id>

Example:

bash
opennote note show abc12345

create

Create a note.

bash
opennote note create --title <title> [--content <content>] [--category <category>] [--tags <tags>]

Options:

OptionShortDefaultDescription
--title-tRequiredNote title
--content-cNoneNote content (opens editor if omitted)
--categoryNoneCategory name
--tagsNoneTags (comma-separated)

Examples:

bash
# Quick create
opennote note create -t "Meeting Notes" -c "Discussion content..." --category Work --tags "important,todo"

# Open editor
opennote note create -t "Meeting Notes"

edit

Edit a note.

bash
opennote note edit <note_id> [--title <new_title>] [--content <new_content>]

Options:

OptionShortDescription
--title-tNew title
--content-cNew content (opens editor with existing content if omitted)

Examples:

bash
# Change title
opennote note edit abc12345 -t "New Title"

# Open editor to edit
opennote note edit abc12345

delete

Delete a note.

bash
opennote note delete <note_id>

Example:

bash
opennote note delete abc12345

Search notes.

bash
opennote note search <keyword> [--limit <number>] [--category <category>]

Options:

OptionShortDefaultDescription
--limit-l10Maximum number of results
--category-cNoneFilter by category

Examples:

bash
# Search
opennote note search "React"

# Search in the "Work" category
opennote note search "meeting" -c Work

mcp

MCP service management command group.

start

Start the MCP server.

bash
opennote mcp start

Notes:

  • Automatically checks whether open-note-mcp is installed
  • Asks whether to install automatically if missing
  • Keeps running after startup; press Ctrl+C to stop

inspect

View MCP configuration information (static output).

bash
opennote mcp inspect

Output:

  • Available MCP tool list
  • Database path

config

Configuration management command group.

get

View current configuration.

bash
opennote config get

Output:

  • Database path (db_path)

Automatic Update Check

Each time a command is executed, the CLI automatically checks whether a new version is available and shows a prompt in the terminal.

Troubleshooting

Q: Database not found

Make sure the default database path is used:

bash
opennote config get

Q: MCP failed to start

Make sure open-note-mcp is installed:

bash
pip install open-note-mcp

Q: Commands are slow

The first execution checks for updates; subsequent executions use cache.