npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sloansparger/bear

v0.1.3

Published

Unofficial CLI for the Bear notes app (MacOS only)

Downloads

22

Readme

oclif Version Downloads/week License

Usage

$ 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

Commands

bear add-file [FILE]

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

bear add-text [TEXT]

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

bear archive [ID]

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

bear auth API-TOKEN

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

bear autocomplete [SHELL]

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

bear change-font [FONT]

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

bear change-theme [THEME]

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

bear commands

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

bear create [TEXT]

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

bear delete-tag [NAME]

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

bear grab-url [URL]

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

bear help [COMMAND]

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

bear locked [SEARCH]

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

bear open-note [ID]

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

bear open-tag [NAME]

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

bear rename-tag NAME [NEW-NAME]

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

bear search [TERM]

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

bear tags

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

bear today [SEARCH]

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

bear todo [SEARCH]

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

bear trash [ID]

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

bear untagged [SEARCH]

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

bear update [CHANNEL]

update the bear CLI

USAGE
  $ bear update [CHANNEL]

See code: @oclif/plugin-update