{"id":37743947,"url":"https://github.com/krakozaure/brain_dump","last_synced_at":"2026-01-16T14:13:30.463Z","repository":{"id":65195597,"uuid":"447410025","full_name":"krakozaure/brain_dump","owner":"krakozaure","description":"A tool to quickly write notes, todos, snippets, etc. in text files","archived":false,"fork":false,"pushed_at":"2023-12-19T00:08:03.000Z","size":49,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-06-21T14:04:11.161Z","etag":null,"topics":["bookmarks","cli","dump","golang","ideas","notes","snippets","sprig","template","text","tool"],"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/krakozaure.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}},"created_at":"2022-01-13T00:15:53.000Z","updated_at":"2022-02-21T22:20:01.000Z","dependencies_parsed_at":"2024-06-21T12:51:17.601Z","dependency_job_id":"d6eb7180-8d13-4c55-81df-5741e89d5248","html_url":"https://github.com/krakozaure/brain_dump","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"2d179f1ec1919da0ca775e69461bd884fcf022a8"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/krakozaure/brain_dump","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakozaure%2Fbrain_dump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakozaure%2Fbrain_dump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakozaure%2Fbrain_dump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakozaure%2Fbrain_dump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krakozaure","download_url":"https://codeload.github.com/krakozaure/brain_dump/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakozaure%2Fbrain_dump/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"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":["bookmarks","cli","dump","golang","ideas","notes","snippets","sprig","template","text","tool"],"created_at":"2026-01-16T14:13:29.896Z","updated_at":"2026-01-16T14:13:30.450Z","avatar_url":"https://github.com/krakozaure.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# brain\\_dump\n\n`brain_dump` allows to quickly write notes, todos, snippets, etc. in text files.\n\nTempate files ([Golang text/template](https://pkg.go.dev/text/template) + [sprig](https://masterminds.github.io/sprig/))\ncan be used to control and format what will be written in the files.\n\n## Project status\n\nThis project is in a very early stage.\n\nI use this tool since the beginning and got only one issue, which is fixed by now.\n\nNo new features are planned right now unless some users have suggestions.\n\n## Documentation\n\n```bash\n$ brain_dump --help\nUSAGE: brain_dump [-c] [-e] [-p PROFILE] INPUT\n\nINPUT must be a list of arguments or - to get the input from the STDIN.\nThe input can also contains arguments using key=value format to pass variables for the template.\nIf no input is given, the output file will be opened in a text editor.\n\nOPTIONS:\n  -c    print the default configuration to STDOUT\n  -e    open the editor after writing the file\n  -p string\n        name of the profile to use (default \"default\")\n```\n\n**Dumping a note without any configuration or any template.**\n\nNotice: if no configuration is found, the tool will print a log message\nexplaining that the default configuration will be used.\n\n```bash\n$ brain_dump the quick brown fox jumps over the lazy dog.\n```\n\n**Dumping a note without any configuration or any template and then edit the file.**\n\n```bash\n$ brain_dump -e the quick brown fox jumps over the lazy dog.\n```\n\n**Passing variables to the template file.**\n\nTo fill the templates, the user can either add variables in a per profile\nconfiguration or pass them at the command line.\n\n`$HOME/.config/brain_dump/templates/snips.tmpl`\n````tmpl\n{{ if .desc }}\n{{ .desc }}\n{{ end }}\n```{{ if .lang }}{{ .lang }}{{ end }}\n{{ trim .input }}\n```\n````\n\n`$HOME/.config/brain_dump/brain_dump.json`\n```jsonc\n{\n  // ...\n  \"snip\": {\n    // ...\n    \"template_vars\": {\n      \"lang\": \"raw\"\n    }\n  },\n  // ...\n}\n```\n\n```bash\n$ brain_dump -p snip lang=bash desc=\"Hello World in bash\" echo Hello, World\n```\n\n**Predefined functions and variables.**\n\nbrain_dump use Golang text/template and sprig but it also provide predefined\nvariables `cwd`, `short_cwd`, `home`, `user` and predefined functions\n`shortenPath`, `expandTilde`, `expandEnv`.\n\n**Write mode, keys case and date/time variables.**\n\n1. When writing to a file, the default method is to append rather than\noverwriting. This can be modified by setting `write_mode` to `write` in the\nprofile configuration.\n\n2. By default the case for variables keys in the templates is `snake_case` but\nyou can also use the `CamelCase` by setting `keys_case` to `CamelCase` in the\nprofile configuration. (see `./samples/templates/test.tmpl`)\n\n3. To use date/time variables the user has to provide a map to the `formats`\nkey in the profile configuration. Each keys of the map is the name for the\nvariable and each value is the format.\n\nHere is an example of configuration for the points mentioned above.\n\n`$HOME/.config/brain_dump/brain_dump.json`\n```jsonc\n{\n  // ...\n  \"test\": {\n    \"file\": \"${HOME}/Documents/brain_dump/test.md\",\n    \"template_file\": \"${HOME}/.config/brain_dump/templates/test.tmpl\",\n    \"write_mode\": \"write\"               // \u003c-- 1.\n    \"keys_case\": \"CamelCase\",           // \u003c-- 2.\n    \"formats\": {                        // \u003c-- 3.\n      \"date\": \"2006-01-02\",\n      \"datetime\": \"2006-01-02 15:04\",\n      \"time\": \"15:04\",\n      \"datetime_file\": \"20060102_1504\"\n    },\n  }\n}\n```\n\n## Configuration\n\nConfiguration and template samples can be found in `./samples/`.\n\nHere is the default configuration ( `brain_dump -c` ) :\n\n```json\n{\n  \"default\": {\n    \"file\": \"~/Documents/brain_dump.md\",\n    \"write_mode\": \"append\",\n    \"template_file\": \"\",\n    \"template_vars\": null,\n    \"formats\": {\n      \"date\": \"2006-01-02\",\n      \"datetime\": \"2006-01-02 15:04:05\",\n      \"time\": \"15:04:05\"\n    },\n    \"keys_case\": \"snake_case\",\n    \"editor\": \"$EDITOR\",\n    \"editor_args\": null\n  }\n}\n```\n\nHere is an example of bash configuration :\n\n```bash\nif command -v brain_dump \u0026\u003e /dev/null; then\n  alias bd=brain_dump\n  alias link='brain_dump -p link'\n  alias note='brain_dump -p note'\n  alias snip='brain_dump -p snip'\n  alias todo='brain_dump -p todo'\n  export BRAINDUMP_CONFIG_FILE=\"$HOME/.config/brain_dump/brain_dump.json\"\n  export BRAINDUMP_DEBUG=1\nfi\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrakozaure%2Fbrain_dump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrakozaure%2Fbrain_dump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrakozaure%2Fbrain_dump/lists"}