{"id":22302327,"url":"https://github.com/svenslaggare/gitnotes","last_synced_at":"2026-04-30T19:31:25.824Z","repository":{"id":186589873,"uuid":"672337722","full_name":"svenslaggare/gitnotes","owner":"svenslaggare","description":"CLI based notes \u0026 snippet application powered by Git.","archived":false,"fork":false,"pushed_at":"2025-02-03T18:34:21.000Z","size":2584,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T10:07:08.838Z","etag":null,"topics":["git","notes","rust","snippets"],"latest_commit_sha":null,"homepage":"","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/svenslaggare.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}},"created_at":"2023-07-29T18:20:33.000Z","updated_at":"2025-02-03T18:34:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"4a47b994-23d8-48af-b349-760927d945e0","html_url":"https://github.com/svenslaggare/gitnotes","commit_stats":null,"previous_names":["svenslaggare/gitnotes"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/svenslaggare/gitnotes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenslaggare%2Fgitnotes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenslaggare%2Fgitnotes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenslaggare%2Fgitnotes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenslaggare%2Fgitnotes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svenslaggare","download_url":"https://codeload.github.com/svenslaggare/gitnotes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenslaggare%2Fgitnotes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32475191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: 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":["git","notes","rust","snippets"],"created_at":"2024-12-03T18:36:28.028Z","updated_at":"2026-04-30T19:31:25.807Z","avatar_url":"https://github.com/svenslaggare.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitNotes\nCLI based notes \u0026 snippet application powered by Git.\n\n## Features\n\n* Notes stored in Markdown format in a Git repository.\n* Edit notes using your favorite editor.\n* Notes organized in a virtual file system.\n* Possible to run snippets and save output inside notes. Supported languages:\n    * Python\n    * Bash\n    * JavaScript (requires Node.JS)\n    * TypeScript (requires Node.JS \u0026 tsc)\n    * C++ (requires G++)\n    * Rust (required rustc)\n* Ability to search through notes using either content \"grep\" or note properties.\n* Includes an optional web based Markdown editor.\n\nNote: have only been tested on Linux.\n\n## Build\nInstructions below is how to build it on a Linux based system (currently Ubuntu based one).\n\n### Binary\nBuilding the `gitnotes` binary is done using:\n\n* Requires cargo (https://rustup.rs/).\n* Build with: `cargo build --release`\n* Build output in `target/release/gitnotes`\n\n### Web editor\nBuilding the web editor is done using:\n\n* Requires yarn (https://yarnpkg.com/).\n* Build with `cd webeditor \u0026\u0026 ./build_js.sh`\n\n### Debian package\nA debian package can be built using the `build_deb.sh` command. This will also include bash auto-completions.\n\n## How to guide\n\n### Creating a repository\nFirst, create a repository using `gitnotes init \u003cname\u003e`. This will create a new git repository in `$HOME/.gitnotes/\u003cname\u003e` and create a configuration file in `$HOME/.gitnotes/config.toml`.\n\nIt's also possible to use an existing git repository (at an arbitrary path) using the `gitnotes init \u003cpath\u003e --use-existing` command.\n\n### Paths\nYour current working directory will be used as the prefix for all the actions done. However, this is only applied if this path is relative your `base_dir` (defaults to $HOME).\n\nIf you specify a path that starts with `/` this means the path will be relative the root of the notes, not the computer.\n\n### Adding a new note\nTo add a new note, use `gitnotes add \u003cpath\u003e`. This will launch an editor where you can put the initial content of the note. After you are done, a commit will be created.\n\nYou can also add tags to a note with `--tags x y` argument.\n\nIt is also possible to use pipes as input, `echo Hello | gitnotes add \u003cpath\u003e`.\n\n### Editing an existing note\nTo edit a note, use `gitnotes edit \u003cpath\u003e`. This will launch an editor where you can change the content of the note. After saving the changes, a new commit will be created. If you save without making any changes, a commit won't be created.\n\nOther than changing the content, the edit command can be used for adding new tags using `--add-tags` argument or clearing all tags using `--clear-tags` argument.\n\n### Viewing the content of a note\nThe content of a note can be shown using an editor using the `gitnotes show \u003cpath\u003e` command (changes are not stored).\n\nThe raw content of the note can be printed using the `gitnotes cat \u003cpath\u003e` command. You can view past content using the `--history` argument. Additional filtering such as only showing the code can be done with the `--code` argument.\n\n### Running a snippet\nWith the `gitnotes run \u003cpath\u003e` command, you can run the code blocks that are embedded in the note. If you supply the `--save` arguments, the output is stored in the note.\n\n### Searching for notes\nThere are multiple ways that we can search for notes. The simplest way is to list the notes using the (virtual) file system with `gitnotes ls` or `gitnotes tree` commands. \n\nSearching for properties of notes (such as tags or creation date) can be done using the `gitnotes find` command.\n\nContent based searches \"grep\" can be done with the `gitnotes grep` command. It is also possible to search for past content using the `--history` argument where a git commit spec is used.\n\n### Converting note to PDF\nNotes can be converted to PDF's with `gitnotes convert \u003cnote\u003e \u003cdestination\u003e`.\n\nUnder the hood, `pandoc` is used. See https://www.baeldung.com/linux/pdf-markdown-conversion for how to install.\n\n### Interactive mode\nThe interactive mode (running `gitnotes`) have additional features not available when using the CLI directly such as:\n\nCombining different changes into one commit:\n```\n$ gitnotes\n\u003e begin\n\u003e edit \u003cpath 1\u003e\n\u003e edit \u003cpath 2\u003e\n\u003e commit\n```\nAuto-completion that is aware of the notes that are stored within the repository.\n\n### Editor\n\nAny editor can be used to edit notes. The editors that are most preferred are the ones that offer a split code/markdown views such as Visual Studio Code. To minimize the need to use external editors though, a simple web based editor is included with GitNotes. This is used by setting the `editor` config to `web-editor`. It is also possible to run in a standalone fashion using `gitnotes web-editor \u003cpath\u003e`.\n\n### Virtual file system\n\nThe path used is _virtual_ in the sense that it doesn't affect the actual folder structure (the file path is just a metadata property of the note). All notes also have a numeric ID that can be used to refer to the note instead of the (virtual) path.\n\n### Synchronization\nNotes can be synchronized a cross servers using the `gitnotes sync` command. This uses git remotes, which can be added using the `gitnotes remote` command.\n\n#### Adding remote\nAdd a remote (SSH only supported) using `gitnotes remote add origin \u003cURL\u003e`.\n\n### Resources\nNone note files (denoted 'resources') can be added to the repository with the `gitnotes resource add \u003clocal file\u003e \u003crepo destination\u003e` command. If the resource is an image, this can be shown in the web editor as well. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvenslaggare%2Fgitnotes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvenslaggare%2Fgitnotes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvenslaggare%2Fgitnotes/lists"}