{"id":48936692,"url":"https://github.com/birsax2/bear-cli","last_synced_at":"2026-04-23T18:01:02.321Z","repository":{"id":351989352,"uuid":"1213350740","full_name":"BIRSAx2/bear-cli","owner":"BIRSAx2","description":"CLI for Bear.app on MacOS","archived":false,"fork":false,"pushed_at":"2026-04-21T08:29:06.000Z","size":167,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-21T16:30:01.348Z","etag":null,"topics":["bear","cli","macos","markdown","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/bear-cli","language":"Rust","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/BIRSAx2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-17T09:36:50.000Z","updated_at":"2026-04-21T12:10:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/BIRSAx2/bear-cli","commit_stats":null,"previous_names":["birsax2/bear-cli"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/BIRSAx2/bear-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BIRSAx2%2Fbear-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BIRSAx2%2Fbear-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BIRSAx2%2Fbear-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BIRSAx2%2Fbear-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BIRSAx2","download_url":"https://codeload.github.com/BIRSAx2/bear-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BIRSAx2%2Fbear-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32145873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T15:33:03.595Z","status":"ssl_error","status_checked_at":"2026-04-22T15:30:42.712Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bear","cli","macos","markdown","rust"],"created_at":"2026-04-17T12:01:45.185Z","updated_at":"2026-04-23T18:01:02.308Z","avatar_url":"https://github.com/BIRSAx2.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bear-cli\n\n`bear-cli` is a native Rust CLI for [Bear](https://bear.app) that talks directly to Bear's CloudKit container.\n\n## Features\n\n- authenticate with Bear's CloudKit web flow\n- list, open, search, and export notes\n- inspect tags and tag membership\n- create notes, edit note text, attach files, trash, and archive\n- rename and delete tags\n- compute duplicates, stats, health checks, and other library summaries from CloudKit data\n\n## Requirements\n\n- macOS\n- a Bear account with iCloud sync enabled\n- network access to Apple's CloudKit endpoints\n\n## Installation\n\n### From crates.io\n\n```sh\ncargo install bear-cli\n```\n\n### From source\n\n```sh\ngit clone https://github.com/BIRSAx2/bear-cli\ncd bear-cli\ncargo install --path .\n```\n\nThe installed binary name is `bear`.\n\n## Authentication\n\nAuthenticate once before using CloudKit-backed commands:\n\n```sh\nbear auth\n```\n\nThe auth flow opens a localhost page and prefers Safari for CloudKit sign-in on macOS.\n\nIf you already have a valid `ckWebAuthToken`, you can save it directly:\n\n```sh\nbear auth --token '\u003cCK_WEB_AUTH_TOKEN\u003e'\n```\n\nOn success the token is saved locally and reused by subsequent commands.\n\n## Usage\n\n```sh\nbear --help\nbear notes\nbear open-note --title \"My Note\"\nbear search crypto --json\nbear create \"# Scratch\"\nbear add-text --title \"Scratch\" \"more text\"\n```\n\n## Commands\n\n### Reading notes and tags\n\n- `notes`\n- `open-note`\n- `tags`\n- `open-tag`\n- `search`\n- `export`\n- `duplicates`\n- `stats`\n- `health`\n- `untagged`\n- `todo`\n- `today`\n- `locked`\n\nExamples:\n\n```sh\nbear notes\nbear notes --limit 50\nbear notes --json\nbear open-note --id 721FF116-185F-4474-8730-60D29995A4A4\nbear open-note --title \"Systems Security\"\nbear search Systems\nbear search Systems --since 2026-04-01 --before 2026-04-17 --json\nbear open-tag work\nbear tags\nbear export ./notes --frontmatter --by-tag\nbear duplicates --json\nbear stats --json\nbear health --json\nbear todo\nbear today\n```\n\n### Writing notes and tags\n\n- `create`\n- `add-text`\n- `add-file`\n- `trash`\n- `archive`\n- `rename-tag`\n- `delete-tag`\n\nExamples:\n\n```sh\nbear create \"# Scratch\"\nbear create \"# Project note\" -t work -t rust\nbear add-text --title \"Scratch\" \"append me\"\nbear add-text --title \"Scratch\" --mode prepend \"top section\"\nbear add-text --title \"Scratch\" --mode replace-all \"# Rewritten\"\nbear add-file ./note.txt --title \"Scratch\"\nbear archive --search \"old note\"\nbear trash --search \"temporary\"\nbear rename-tag inbox archive/inbox\nbear delete-tag old-tag\n```\n\n## Notes\n\n- All operational commands are CloudKit-based.\n- Authentication is required for both reads and writes.\n- The CloudKit API token used by this project was reverse-engineered from Bear Web's public frontend bundle.\n- The auth flow is browser-sensitive. Safari is the preferred path on macOS.\n- Some large-note edge cases may still require additional CloudKit asset-handling work if Bear stores note bodies outside `textADP`.\n\n## Development\n\n```sh\ncargo build\ncargo test\ncargo clippy --all-targets --all-features -- -D warnings\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirsax2%2Fbear-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbirsax2%2Fbear-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirsax2%2Fbear-cli/lists"}