{"id":51590665,"url":"https://github.com/mozumasu/nb.nvim","last_synced_at":"2026-07-11T14:30:35.046Z","repository":{"id":369391717,"uuid":"1289305083","full_name":"mozumasu/nb.nvim","owner":"mozumasu","description":"Neovim integration for nb — browse, create, link, and auto-sync plain-text notes without leaving Neovim","archived":false,"fork":false,"pushed_at":"2026-07-05T03:16:45.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-05T05:07:46.320Z","etag":null,"topics":["knowledge-base","lua","nb","neovim","neovim-plugin","note-taking","notes"],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/mozumasu.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-07-04T15:23:00.000Z","updated_at":"2026-07-05T03:16:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mozumasu/nb.nvim","commit_stats":null,"previous_names":["mozumasu/nb.nvim"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mozumasu/nb.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozumasu%2Fnb.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozumasu%2Fnb.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozumasu%2Fnb.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozumasu%2Fnb.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozumasu","download_url":"https://codeload.github.com/mozumasu/nb.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozumasu%2Fnb.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35365808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["knowledge-base","lua","nb","neovim","neovim-plugin","note-taking","notes"],"created_at":"2026-07-11T14:30:34.416Z","updated_at":"2026-07-11T14:30:35.040Z","avatar_url":"https://github.com/mozumasu.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nb.nvim\n\n[![CI](https://github.com/mozumasu/nb.nvim/actions/workflows/ci.yml/badge.svg)](https://github.com/mozumasu/nb.nvim/actions/workflows/ci.yml)\n\nNeovim integration for [`nb`](https://github.com/xwmx/nb) — the CLI plain-text\nnote-taking, bookmarking, and knowledge base tool.\n\nBrowse, create, link, and organize your nb notes without leaving Neovim, with\nautomatic git commit \u0026 remote sync when you close a note.\n\n## Features\n\n- **Pick \u0026 grep** — fuzzy-find notes by title across all notebooks (with\n  preview), or live-grep their contents\n- **Add** — create a timestamped note in the current (or any) notebook and\n  start writing immediately\n- **Auto commit \u0026 sync** — when you save a note and close its buffer (or quit\n  Neovim), the note is committed and synced with the remote\n  (`pull --rebase` + `push`) in a detached background process\n- **Link** — insert `[[wiki-style]]` links to any note, including\n  cross-notebook `[[notebook:note]]` links and image links served via\n  `nb browse`\n- **Import images** — import an image from the clipboard (via\n  [img-clip.nvim](https://github.com/HakonHarnes/img-clip.nvim)) or a file\n  path, and insert its markdown link\n- **Move / delete / adopt** — move notes between notebooks, delete them from\n  the picker, or adopt any external file into a notebook — every operation is\n  git-committed automatically\n\n## Requirements\n\n- Neovim \u003e= 0.10\n- [`nb`](https://github.com/xwmx/nb)\n- [snacks.nvim](https://github.com/folke/snacks.nvim) (picker UI)\n- [img-clip.nvim](https://github.com/HakonHarnes/img-clip.nvim) *(optional,\n  clipboard image import)*\n\n## Installation\n\nWith [lazy.nvim](https://github.com/folke/lazy.nvim):\n\n```lua\n{\n  \"mozumasu/nb.nvim\",\n  dependencies = { \"folke/snacks.nvim\" },\n  lazy = false, -- load at startup so autosync autocmds are registered\n  opts = {},\n  -- stylua: ignore\n  keys = {\n    { \"\u003cleader\u003ena\", function() require(\"nb\").add() end, desc = \"nb add\" },\n    { \"\u003cleader\u003enA\", function() require(\"nb\").add_select() end, desc = \"nb add (select notebook)\" },\n    { \"\u003cleader\u003eni\", function() require(\"nb\").import_image() end, desc = \"nb import image\" },\n    { \"\u003cleader\u003enl\", function() require(\"nb\").link() end, desc = \"nb link\" },\n    { \"\u003cleader\u003enm\", function() require(\"nb\").move() end, desc = \"nb move to notebook\" },\n    { \"\u003cleader\u003enM\", function() require(\"nb\").adopt_buffer() end, desc = \"nb adopt current buffer\" },\n    { \"\u003cleader\u003enp\", function() require(\"nb\").pick() end, desc = \"nb picker\" },\n    { \"\u003cleader\u003eng\", function() require(\"nb\").grep() end, desc = \"nb grep\" },\n  },\n}\n```\n\n## Configuration\n\nDefaults:\n\n```lua\nrequire(\"nb\").setup({\n  -- nb data directory (nil resolves $NB_DIR, then ~/.nb)\n  dir = nil,\n  -- `nb browse` port, used to build/resolve cross-notebook image links\n  browse_port = 6789,\n  -- commit \u0026 sync notes with the remote when a saved buffer is closed\n  autosync = true,\n  -- timestamp format for generated note filenames\n  timestamp_format = \"%Y%m%d%H%M%S\",\n  -- custom picker preview: function(ctx) (nil uses snacks' file preview)\n  preview = nil,\n})\n```\n\n## API\n\nUI (used by the keymaps above):\n\n| Function | Description |\n| --- | --- |\n| `require(\"nb\").pick()` | Fuzzy-find notes across all notebooks (`\u003cC-d\u003e` deletes) |\n| `require(\"nb\").grep()` | Live-grep note contents |\n| `require(\"nb\").add()` | Add a note to the current notebook |\n| `require(\"nb\").add_select()` | Pick a notebook, then add a note |\n| `require(\"nb\").import_image()` | Import clipboard image / file and insert a link |\n| `require(\"nb\").link()` | Insert a `[[link]]` to any note or image |\n| `require(\"nb\").move()` | Move the current note to another notebook |\n| `require(\"nb\").adopt_buffer()` | Move the current (external) file into a notebook |\n\nCore helpers for building your own integrations:\n\n| Function | Description |\n| --- | --- |\n| `get_title(path)` | Note title (H1 / frontmatter) for files under the nb dir — handy for bufferline labels |\n| `resolve_browse_url(src)` | Resolve an `nb browse --original` URL to a local file path |\n| `get_note_path(id)` | Resolve `notebook:note` to a file path via the nb CLI |\n| `commit_and_sync(path)` | Commit a note and sync its notebook with the remote |\n\n### Example: render nb images with snacks.nvim\n\nCross-notebook image links use `nb browse` URLs; teach `snacks.image` to\nresolve them to local files:\n\n```lua\n-- in your snacks.nvim opts\nimage = {\n  resolve = function(file, src)\n    return require(\"nb\").resolve_browse_url(src)\n  end,\n}\n```\n\n### Example: note titles in bufferline\n\n```lua\n-- in your bufferline.nvim opts\noptions = {\n  name_formatter = function(buf)\n    return require(\"nb\").get_title(buf.path) or buf.name\n  end,\n}\n```\n\n## Documentation \u0026 troubleshooting\n\n- `:h nb.nvim` — full vimdoc reference (options, UI functions, core API,\n  autosync semantics)\n- `:checkhealth nb` — diagnose setup problems: nb / git executables, data\n  directory resolution, and plugin dependencies\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozumasu%2Fnb.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozumasu%2Fnb.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozumasu%2Fnb.nvim/lists"}