Unofficial CLI for the Bear notes app (MacOS only)
npm install @sloansparger/bear




``sh-session`
$ npm install -g @sloansparger/bear
$ bear auth API_TOKEN # Enter your Bear API token
$ bear autocomplete # Install CLI autocompletion
$ bear COMMAND
running command...
$ bear --help [COMMAND]
...
$ bear update
* [bear add-file [FILE]](#bear-add-file-file)bear add-text [TEXT]
* [](#bear-add-text-text)bear archive [ID]
* [](#bear-archive-id)bear auth API-TOKEN
* bear autocomplete [SHELL]
* [](#bear-autocomplete-shell)bear change-font [FONT]
* [](#bear-change-font-font)bear change-theme [THEME]
* [](#bear-change-theme-theme)bear commands
* bear create [TEXT]
* [](#bear-create-text)bear delete-tag [NAME]
* [](#bear-delete-tag-name)bear grab-url [URL]
* [](#bear-grab-url-url)bear help [COMMAND]
* [](#bear-help-command)bear locked [SEARCH]
* [](#bear-locked-search)bear open-note [ID]
* [](#bear-open-note-id)bear open-tag [NAME]
* [](#bear-open-tag-name)bear rename-tag NAME [NEW-NAME]
* [](#bear-rename-tag-name-new-name)bear search [TERM]
* [](#bear-search-term)bear tags
* bear today [SEARCH]
* [](#bear-today-search)bear todo [SEARCH]
* [](#bear-todo-search)bear trash [ID]
* [](#bear-trash-id)bear untagged [SEARCH]
* [](#bear-untagged-search)bear update [CHANNEL]
* [](#bear-update-channel)
Append or prepend a file to a note identified by its title or id.
`
USAGE
$ bear add-file [FILE]
ARGUMENTS
FILE path to file you want to add
OPTIONS
-c, --edit place the cursor inside the note editor
-e, --new-window open the note in an external window
-h, --help show CLI help
-i, --id=id note unique identifier
-j, --filename=filename override file name including extension
-m, --mode=prepend|append|replace|replace_all [default: append] the allowed values are prepend, append, replace_all
and replace (keep the note's title untouched)
-n, --title=title note title
-o, --open-note display the new note in Bear's main or external window
-u, --header=header note title
-w, --show-window force the opening of bear main window
DESCRIPTION
This call can't be performed if the app is a locked state.
Encrypted notes can't be accessed with this call.
Returns note's contents.
`
_See code: src/commands/add-file.ts_
Append or prepend text to a note identified by its title or id.
`
USAGE
$ bear add-text [TEXT]
ARGUMENTS
TEXT note body
OPTIONS
-c, --edit place the cursor inside the note editor
-d, --timestamp prepend the current date and time to the text
-e, --new-window open the note in an external window
-h, --help show CLI help
-i, --id=id note unique identifier
-l, --new-line if true and mode is append force the text to appear on a new line
inside the note
-m, --mode=prepend|append|replace|replace_all [default: append] the allowed values are prepend, append, replace_all
and replace (keep the note's title untouched)
-n, --title=title note title
-o, --open-note display the new note in Bear's main or external window
-t, --tag=tag tag for note
-u, --header=header note title
-w, --show-window force the opening of bear main window
-x, --exclude-trashed exclude trashed notes
DESCRIPTION
Beta encrypted notes can't be accessed with this call.
Returns note's contents.
`
_See code: src/commands/add-text.ts_
Move a note to bear archive and select the Archive sidebar item.
`
USAGE
$ bear archive [ID]
ARGUMENTS
ID note unique identifier
OPTIONS
-h, --help show CLI help
-s, --search=search string to search. search term is ignored if an id is provided.
-w, --show-window force the opening of bear main window
DESCRIPTION
This call can't be performed if the app is a locked state.
Encrypted notes can't be accessed with this call.
`
_See code: src/commands/archive.ts_
Authenticates Bear CLI commands that require an app generated token to work.
`
USAGE
$ bear auth API-TOKEN
ARGUMENTS
API-TOKEN application token
OPTIONS
-h, --help show CLI help
DESCRIPTION
Go to Bear → Help → API Token → Copy Token and paste into this command.
`
_See code: src/commands/auth.ts_
display autocomplete installation instructions
`
USAGE
$ bear autocomplete [SHELL]
ARGUMENTS
SHELL shell type
OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
EXAMPLES
$ bear autocomplete
$ bear autocomplete bash
$ bear autocomplete zsh
$ bear autocomplete --refresh-cache
`
_See code: @oclif/plugin-autocomplete_
Change the selected Bear Font.
`
USAGE
$ bear change-font [FONT]
ARGUMENTS
FONT font name
OPTIONS
-h, --help show CLI help
-w, --show-window force the opening of bear main window
`
_See code: src/commands/change-font.ts_
Change the selected Bear theme.
`
USAGE
$ bear change-theme [THEME]
ARGUMENTS
THEME theme name
OPTIONS
-h, --help show CLI help
-w, --show-window force the opening of bear main window
DESCRIPTION
Some themes may require a Bear Pro subscription.
`
_See code: src/commands/change-theme.ts_
list all the commands
`
USAGE
$ bear commands
OPTIONS
-h, --help show CLI help
-j, --json output in json format
--hidden also show hidden commands
`
_See code: @oclif/plugin-commands_
Create a new note. Empty notes are not allowed.
`
USAGE
$ bear create [TEXT]
ARGUMENTS
TEXT note body
OPTIONS
-a, --file=file path to a file attachment
-c, --edit place the cursor inside the note editor
-d, --timestamp prepend the current date and time to the text
-e, --new-window open the note in an external window
-h, --help show CLI help
-j, --filename=filename override file name including extension
-n, --title=title note title
-o, --open-note display the new note in Bear's main or external window
-p, --pin pin the note to the top of the list
-t, --tag=tag tag for note
-w, --show-window force the opening of bear main window
DESCRIPTION
Returns unique note identifier of new note.
`
_See code: src/commands/create.ts_
Delete an existing tag.
`
USAGE
$ bear delete-tag [NAME]
ARGUMENTS
NAME tag name
OPTIONS
-h, --help show CLI help
-w, --show-window force the opening of bear main window
DESCRIPTION
This call can't be performed if the app is a locked state.
If the tag contains any locked note this call will not be performed.
`
_See code: src/commands/delete-tag.ts_
Create a new note with the content of a web page.
`
USAGE
$ bear grab-url [URL]
ARGUMENTS
URL url to grab
OPTIONS
-h, --help show CLI help
-p, --pin pin the note to the top of the list
-t, --tag=tag tag for note, if tags are specified in the Bear's web content prefences this parameter is ignored
-z, --wait if false, command returns immediately without waiting for note return value
DESCRIPTION
Returns unique note identifier of new note.
`
_See code: src/commands/grab-url.ts_
display help for bear
`
USAGE
$ bear help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
`
_See code: @oclif/plugin-help_
Select the Locked sidebar item.
`
USAGE
$ bear locked [SEARCH]
ARGUMENTS
SEARCH string to search
OPTIONS
-h, --help show CLI help
-w, --show-window force the opening of bear main window
`
_See code: src/commands/locked.ts_
Fetch a note identified by its title or id.
`
USAGE
$ bear open-note [ID]
ARGUMENTS
ID note unique identifier
OPTIONS
-c, --edit place the cursor inside the note editor
-e, --new-window open the note in an external window
-f, --float makes the external window float on top
-h, --help show CLI help
-k, --selected return the note currently selected in Bear
-n, --title=title note title
-o, --open-note display the new note in Bear's main or external window
-p, --pin pin the note to the top of the list
-u, --header=header note title
-w, --show-window force the opening of bear main window
-x, --exclude-trashed exclude trashed notes
-y, --token=token [default: 493C02-3A08BB-D7BA51] bear api token. defaults to api key provided to auth command.
DESCRIPTION
Returns the matched note's contents.
`
_See code: src/commands/open-note.ts_
Fetch all the notes which have a selected tag in bear.
`
USAGE
$ bear open-tag [NAME]
ARGUMENTS
NAME tag name
OPTIONS
-h, --help show CLI help
-y, --token=token [default: 493C02-3A08BB-D7BA51] bear api token. defaults to api key provided to auth command.
DESCRIPTION
Returns list of unique note identifiers and note titles.
`
_See code: src/commands/open-tag.ts_
Rename an existing tag.
`
USAGE
$ bear rename-tag NAME [NEW-NAME]
ARGUMENTS
NAME tag name
NEW-NAME new tag name
OPTIONS
-h, --help show CLI help
-w, --show-window force the opening of bear main window
DESCRIPTION
This call can't be performed if the app is a locked state.
If the tag contains any locked note this call will not be performed.
`
_See code: src/commands/rename-tag.ts_
Fetch search results from Bear for all notes or for a specific tag.
`
USAGE
$ bear search [TERM]
ARGUMENTS
TERM string to search
OPTIONS
-h, --help show CLI help
-t, --tag=tag tag to search into
-w, --show-window force the opening of bear main window
-y, --token=token [default: 493C02-3A08BB-D7BA51] bear api token. defaults to api key provided to auth command.
DESCRIPTION
Returns list of unique note identifiers and note titles.
`
_See code: src/commands/search.ts_
Fetch all the tags currently displayed in Bear's sidebar.
`
USAGE
$ bear tags
OPTIONS
-h, --help show CLI help
-y, --token=token (required) [default: 493C02-3A08BB-D7BA51] bear api token. defaults to api key provided to auth
command.
DESCRIPTION
Returns list of tag names.
`
_See code: src/commands/tags.ts_
Fetch all notes in the Today sidebar item.
`
USAGE
$ bear today [SEARCH]
ARGUMENTS
SEARCH string to search
OPTIONS
-h, --help show CLI help
-w, --show-window force the opening of bear main window
-y, --token=token [default: 493C02-3A08BB-D7BA51] bear api token. defaults to api key provided to auth command.
DESCRIPTION
Returns list of unique note identifiers and note titles.
NOTE: this feature doesn't currently work as expected.
BUG: There's an issue with bear that causes notes that match search not in Today to be returned.
BUG: There's an issue where fetching Today's notes causes bear to hold process open.
`
_See code: src/commands/today.ts_
Fetch all notes in the Todo sidebar item.
`
USAGE
$ bear todo [SEARCH]
ARGUMENTS
SEARCH string to search
OPTIONS
-h, --help show CLI help
-w, --show-window force the opening of bear main window
-y, --tokne=tokne [default: 493C02-3A08BB-D7BA51] bear api token. defaults to api key provided to auth command.
DESCRIPTION
Returns list of unique note identifiers and note titles.
BUG: There's an issue with bear that causes notes that match search with no Todo's to be returned.
`
_See code: src/commands/todo.ts_
Move a note to bear trash and select the Trash sidebar item.
`
USAGE
$ bear trash [ID]
ARGUMENTS
ID note unique identifier
OPTIONS
-h, --help show CLI help
-s, --search=search string to search. search term is ignored if an id is provided.
-w, --show-window force the opening of bear main window
DESCRIPTION
This call can't be performed if the app is a locked state.
Encrypted notes can't be used with this call.
`
_See code: src/commands/trash.ts_
Fetch all notes in the Untagged sidebar item.
`
USAGE
$ bear untagged [SEARCH]
ARGUMENTS
SEARCH string to search
OPTIONS
-h, --help show CLI help
-w, --show-window force the opening of bear main window
-y, --token=token [default: 493C02-3A08BB-D7BA51] bear api token. defaults to api key provided to auth command.
DESCRIPTION
Returns list of unique note identifiers and note titles.
`
_See code: src/commands/untagged.ts_
update the bear CLI
```
USAGE
$ bear update [CHANNEL]
_See code: @oclif/plugin-update_