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.
--help Show this message and exit.
accounts
Print information about Notes accounts.
Usage:
notes accounts [OPTIONS]
Options:
-j, --json Print output in JSON format.
--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:
--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.
--help Show this message and exit.
help
Print help; for help on commands: help
Usage:
notes help [OPTIONS] [TOPIC] [SUBTOPIC]
Options:
--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.
--help Show this message and exit.