Skip to content

Command Line Reference

notes

notes: work with Apple Notes on the command line.

Usage:

notes [OPTIONS] COMMAND [ARGS]...

Options:

  -v, --version  Show the version and exit.
  -h, --help     Show this message and exit.

accounts

Print information about Notes accounts.

Usage:

notes accounts [OPTIONS]

Options:

  -j, --json  Print output in JSON format.
  -h, --help  Show this message and exit.

add

Add new note.

There are multiple ways to add a new note:

Add a new note from standard input (STDIN):

notes add

cat file.txt | notes add

notes add < file.txt

Add a new note by passing string on command line:

notes add NOTE

Add a new note by opening default editor (defined in $EDITOR or via notes config):

notes add --edit

notes add -e

Add a new note from URL (downloads URL, creates a cleaned readable version to store in new Note):

notes add --url URL

notes add -u URL

If NOTE is a single line, adds new note with name NOTE and no body. If NOTE is more than one line, adds new note where name is first line of NOTE and body is remainder.

Body of note must be plain text unless --html/-h or --markdown/-m flag is set in which case body should be HTML or Markdown, respectively. If --edit/-e flag is set, note will be opened in default editor before being added. If --show/-s flag is set, note will be shown in Notes.app after being added.

Account and top level folder may be specified with --account/-a and --folder/-f, respectively. If not provided, default account and folder are used.

Usage:

notes add [OPTIONS] NOTE

Options:

  -s, --show             Show note in Notes after adding.
  -F, --file FILENAME
  -u, --url URL
  -h, --html             Use HTML for body of note.
  -m, --markdown         Use Markdown for body of note.
  -p, --plaintext        Use plaintext for body of note (default unless
                         changed in `notes config`).
  -e, --edit             Edit note text before adding in default editor.
  -a, --account ACCOUNT  Add note to account ACCOUNT.
  -f, --folder FOLDER    Add note to folder FOLDER.
  --help                 Show this message and exit.

cat

Print one or more notes to STDOUT

Usage:

notes cat [OPTIONS] NOTE_NAME

Options:

  -p, --plaintext  Output note as plain text.
  -m, --markdown   Output note as Markdown.
  -h, --html       Output note as HTML.
  -j, --json       Output note as JSON. The default format for the note body
                   in JSON is HTML (this is how the note is stored in Notes).
                   If --plaintext or --markdown is also specified, the note
                   body in the resulting JSON will be in the specified format.
  --help           Show this message and exit.

config

Configure default settings for account, editor, etc.

Usage:

notes config [OPTIONS]

Options:

  -h, --help  Show this message and exit.

delete

Delete a note.

Example: notes delete "Old Note"

Usage:

notes delete [OPTIONS] NOTE_NAME

Options:

  -y, --yes              Skip confirmation prompt.
  -a, --account ACCOUNT  Account to search in.
  -h, --help             Show this message and exit.

dump

Dump all notes or selection of notes for debugging

Usage:

notes dump [OPTIONS]

Options:

  -s, --selected  Dump only selected notes.
  -B, --no-body   Do not dump note body.
  -h, --help      Show this message and exit.

edit

Edit an existing note's body.

Example: notes edit "My Note" --body "New content"

Usage:

notes edit [OPTIONS] NOTE_NAME

Options:

  -b, --body TEXT        Set body directly without opening editor.
  -h, --html             Treat body as HTML.
  -m, --markdown         Treat body as Markdown.
  -a, --account ACCOUNT  Account to search in.
  --help                 Show this message and exit.

help

Print help; for help on commands: help .

Usage:

notes help [OPTIONS] [TOPIC] [SUBTOPIC]

Options:

  -h, --help  Show this message and exit.

list

List notes, optionally filtering by account or text.

Usage:

notes list [OPTIONS] TEXT

Options:

  -a, --account ACCOUNT  Limit results to account ACCOUNT; may be repeated to
                         include multiple accounts.
  -h, --help             Show this message and exit.

mkdir

Create a new folder.

Example: notes mkdir "Archive"

Usage:

notes mkdir [OPTIONS] FOLDER_NAME

Options:

  -a, --account ACCOUNT  Account to create folder in.
  -h, --help             Show this message and exit.

move

Move a note to a different folder.

Example: notes move "My Note" --folder "Archive"

Usage:

notes move [OPTIONS] NOTE_NAME

Options:

  -f, --folder TEXT      Destination folder.  [required]
  -a, --account ACCOUNT  Account to search in.
  -h, --help             Show this message and exit.

rename

Rename a note.

Example: notes rename "Old Title" "New Title"

Usage:

notes rename [OPTIONS] OLD_NAME NEW_NAME

Options:

  -a, --account ACCOUNT  Account to search in.
  -h, --help             Show this message and exit.

rmdir

Delete a folder.

Example: notes rmdir "Old Folder"

Usage:

notes rmdir [OPTIONS] FOLDER_NAME

Options:

  -y, --yes              Skip confirmation prompt.
  -a, --account ACCOUNT  Account to delete folder from.
  -h, --help             Show this message and exit.