{"id":13395556,"url":"https://github.com/drgrib/alfred-bear","last_synced_at":"2025-04-05T20:08:37.775Z","repository":{"id":31364161,"uuid":"130618635","full_name":"drgrib/alfred-bear","owner":"drgrib","description":"Streamlined note searching and creation for Bear using Alfred","archived":false,"fork":false,"pushed_at":"2024-04-17T20:10:58.000Z","size":28551,"stargazers_count":427,"open_issues_count":13,"forks_count":24,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-10-13T09:06:37.529Z","etag":null,"topics":["alfred","alfred-workflow","alfred-workflows","alfred3","alfred3-workflow","bear","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drgrib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"drgrib"}},"created_at":"2018-04-23T00:11:30.000Z","updated_at":"2024-10-08T09:18:43.000Z","dependencies_parsed_at":"2023-01-14T18:52:58.993Z","dependency_job_id":"7710ebb9-7d21-40a8-a296-2063fdf38630","html_url":"https://github.com/drgrib/alfred-bear","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drgrib%2Falfred-bear","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drgrib%2Falfred-bear/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drgrib%2Falfred-bear/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drgrib%2Falfred-bear/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drgrib","download_url":"https://codeload.github.com/drgrib/alfred-bear/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393570,"owners_count":20931813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alfred","alfred-workflow","alfred-workflows","alfred3","alfred3-workflow","bear","go","golang"],"created_at":"2024-07-30T18:00:23.945Z","updated_at":"2025-04-05T20:08:37.729Z","avatar_url":"https://github.com/drgrib.png","language":"Go","funding_links":["https://github.com/sponsors/drgrib","https://www.paypal.com/donate?business=N2GLXLS5KBFBY\u0026item_name=Chris+Redford\u0026currency_code=USD"],"categories":["Go","Writing","Authorization"],"sub_categories":["🍎 Apple Silicon Macs"],"readme":"[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate?business=N2GLXLS5KBFBY\u0026item_name=Chris+Redford\u0026currency_code=USD)\n\n# Bear Workflow\n\nStreamlined note searching and creation for [Bear](http://www.bear-writer.com/) using [Alfred](https://www.alfredapp.com/workflows/).\n\n## Install\n\n1. [Download](https://github.com/drgrib/alfred-bear/releases/download/v1.2.4/Bear.alfredworkflow) the latest release and double-click _Bear.alfredworkflow_. Alfred will open the workflow and install it.\n2. [Authorize all the executables used by the workflow](#authorize-all-executables).\n3. If you are on an Apple Silicon Mac (M1, M2, etc.), [install Rosetta](https://github.com/drgrib/alfred-bear#install-rosetta)\n\nIf you are using an old version of Bear before 2.0 use [this](https://github.com/drgrib/alfred-bear/releases/download/1.1.9/Bear.alfredworkflow) download link for the latest version supporting it.\n\n## Search\n\n`bs` or `bsearch`\n\n### Recent Notes\n\nLeave the search field empty to see recent notes with their tags as subtitles.\n\n\u003cimg src=\"doc/RecentNotes.png\" width=\"500\"\u003e\n\n### Basic Search\n\nStart typing to search through the titles and text of most recent notes, title matches first.\n\n\u003cimg src=\"doc/BasicSearch.png\" width=\"500\"\u003e\n\n### Tag Search\n\nType `#` at any time to autocomplete your tags.\n\n\u003cimg src=\"doc/TagAutocomplete.png\" width=\"500\"\u003e\n\nStart typing to search tags.\n\n\u003cimg src=\"doc/TagAutocompleteSearch.png\" width=\"500\"\u003e\n\nOnce completed, the notes will be filtered by that tag.\n\n\u003cimg src=\"doc/TagFilter.png\" width=\"500\"\u003e\n\nAdd more tags to filter by multiple tags.\n\n\u003cimg src=\"doc/TagAutocompleteMultiple.png\" width=\"500\"\u003e\n\nStart typing to search titles and text within a tag.\n\n\u003cimg src=\"doc/TagTextSearch.png\" width=\"500\"\u003e\n\nAll these terms can be typed in any order and they will work the same. For example, if you want to add a tag after typing a bare search term, the autocomplete will still help you. Or if you remember you want to filter by another tag after typing the first tag and a bare search term, you can autocomplete and add the second tag by typing `#` again.\n\n\u003cimg src=\"doc/TagAnyOrder.png\" width=\"500\"\u003e\n\n### Search in Bear App\n\nYou can search any _query_ you type in the Bear app's main window by holding down the option key. If you've entered a tag, it will open the Bear main window to that tag for further browsing.\n\n\u003cimg src=\"doc/SearchQueryInBearApp.png\" width=\"500\"\u003e\n\n### Open Note in Bear App\n\nSimilarly, you can open any _note_ you select in the Bear app's main window by holding down the command key.\n\n### Link Pasting\n\nWhile in your Bear notes, you can paste a link to another note by searching for it and holding down the shift key.\n\n\u003cimg src=\"doc/Link1.png\" width=\"500\"\u003e\n\u003cimg src=\"doc/Link2.png\" width=\"500\"\u003e\n\n### Table of Contents Pasting\n\nSimilarly, you can paste a table of contents for a note by searching for it and holding down the command and shift keys.\n\n## New Notes\n\n`bn` or `bnew` followed by title and optional tags.\n\n\u003cimg src=\"doc/NewNote.png\" width=\"500\"\u003e\n\nTag autocomplete works the same. Also, any text in your clipboard can be added to the new note by holding down the command key.\n\n## Create/Search\n\n`bcs` or `bcsearch`\n\nYou may find sometimes that you want to retrieve a note if it exists and create it if it does not. This command provides that functionality by combining the behavior of search and create. It will provide all the same search results as normal search and additionally add a create item third in the list using normal create options.\n\n\u003cimg src=\"doc/CreateSearch1.png\" width=\"500\"\u003e\n\nIf there are less than two search items, the create item will be the last or only item.\n\n\u003cimg src=\"doc/CreateSearch2.png\" width=\"500\"\u003e\n\nYou can additionally create links to notes by holding the shift key while selecting a search item. Selecting the create item while holding the shift key will do nothing.\n\n## Why I created this\n\nI am especially grateful to Chris Brown, who created a [Python based Bear workflow](https://github.com/chrisbro/alfred-bear). It was the basis for this project. However, I decided to create my own project for a few reasons:\n\n-   Compiled Go is faster than interpretted Python. Not that much faster but fast enough for me to notice when searching and creating notes throughout the day.\n-   I wanted the features involving tag searching and autocompletion, link pasting, and automatic clipboard note content.\n-   I wanted fewer, more optimized SQL queries into the Bear database to increase speed since this appears to be the main bottleneck on performance.\n\n## Authorization\n\nThe first time you use the workflow after installing or upgrading, you will see a security warning:\n\n\u003cimg src=\"doc/Authorize.png\" width=\"400\"\u003e\n\nThis is a quirk of macOS 10.15 and above. Apple currently forces developers to pay $99 a year to be able to officially sign their executables and avoid this warning, which I'm not going to pay since I'm providing this workflow for free as an open source project.\n\nAfter seeing this warning, you have to go to **System Preferences \u003e Security \u0026 Privacy \u003e General** and click the new button that has appeared to allow the executable to run. You then have to run it again and you will see this security warning _again_ but now it will have a new button that lets you allow the executable to run.\n\nThese warnings will appear once for each of the executables inside the workflow as you use new features. Once you have authorized all of them, you won't see these warnings anymore until you install a new version.\n\n### Authorize All Executables\n\nIf you want to authorize all Bear Workflow executables at once or if you do not see the above security warnings but the workflow isn't working, you can do the following:\n\n1. Go to the **Workflows** section in Alfred Preferences\n2. Right click on **Bear** _by drgrib_ and select **Open in Terminal**\n3. Copy this command and execute it:\n\n```\nxattr -rd com.apple.quarantine cmd\n```\n\nThis should authorize all the Alfred Bear the executables and fix the security errors.\n\nIf you are trying to use the Bear workflow loaded from prefrences via cloud (e.g. through Google Drive) on a new Mac, you may also need to run this command, which will make the executables executable:\n```\nfind . -mindepth 3 -maxdepth 3 -type f \\! -name \"*.go\" -exec chmod +x {} \\;\n```\n\n## Install Rosetta\n\nIf your mac is based on an Apple Silicon chip (M1, M2, etc.), you need to have Rosetta installed on your system, otherwise Alfred workflows will fail silently.\n\nCopy this command and execute in terminal to install Rosetta:\n\n```sh\nsoftwareupdate --install-rosetta\n```\n\nIf that fails, try this version, which requires your admin password:\n\n```\nsudo softwareupdate --install-rosetta --agree-to-license\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrgrib%2Falfred-bear","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrgrib%2Falfred-bear","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrgrib%2Falfred-bear/lists"}