{"id":13649579,"url":"https://github.com/yuis-ice/note-cli","last_synced_at":"2025-09-17T11:06:16.877Z","repository":{"id":207846152,"uuid":"326657395","full_name":"yuis-ice/note-cli","owner":"yuis-ice","description":"Markdown Indexing and Pcre Regular Expression Compatible Full Text Searching for Advanced Note Takers.","archived":false,"fork":false,"pushed_at":"2021-07-16T10:52:15.000Z","size":37,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T13:34:17.820Z","etag":null,"topics":["cmdline","command-line","learning-notes","note-taking-app","notetaking","notetaking-applications","search-in-text"],"latest_commit_sha":null,"homepage":"https://yuis-programming.com/notecli-app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuis-ice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-01-04T11:09:41.000Z","updated_at":"2024-10-14T14:17:19.000Z","dependencies_parsed_at":"2023-11-18T00:51:50.483Z","dependency_job_id":"3a0adcf4-2fb2-4efa-b833-120e5813a43b","html_url":"https://github.com/yuis-ice/note-cli","commit_stats":null,"previous_names":["yuis-ice/note-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yuis-ice/note-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fnote-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fnote-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fnote-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fnote-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuis-ice","download_url":"https://codeload.github.com/yuis-ice/note-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fnote-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275583378,"owners_count":25490651,"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","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"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":["cmdline","command-line","learning-notes","note-taking-app","notetaking","notetaking-applications","search-in-text"],"created_at":"2024-08-02T02:00:20.215Z","updated_at":"2025-09-17T11:06:16.856Z","avatar_url":"https://github.com/yuis-ice.png","language":"JavaScript","funding_links":[],"categories":["[↑](#-contents) Free or Open Source","Open Source"],"sub_categories":["CLI"],"readme":"\n# Note-CLI\n\nMarkdown Indexing and Pcre Regular Expression Compatible Full Text Searching for Advanced Note Takers.\n\n## Quick Start\n\n```sh\n\n# indexing file\n./note-cli.js --index --database notes.db.example --file notes.md.example\n\n# searching for keywords by regular expression\n./note-cli.js --search --database notes.db.example --header \"python\" --content \"hello.?world\" --hide-sql\n\n# and you will get:\n[\n    {\n        \"id\": 2,\n        \"header\": \"how to hello world in python\",\n        \"content\": \"```py \\n# how to hello world in python\\n\\nprint(\\\"hello world\\\")\\n```\\n\\n\",\n        \"entire_note\": \"# how to hello world in python\\n\\n```py \\n# how to hello world in python\\n\\nprint(\\\"hello world\\\")\\n```\\n\\n\"\n    }\n]\n\n```\n\n## Basic concept\n\nThere are great note taking tools over there, such as Evernote. But the reason I quit using Evernote was its poor searching capability (i.e. cannot search some special characters; cannot search with regular expression, of course) and also, lack of extensibility. That's where Note-CLI comes in.\n\nI'm kind of person who likes to take a note on my favorite text editor (Atom editor, for my case). For note taking, I have a single Markdown format text file. In it, I do take notes about everything. Note-CLI does work for indexing chunks of Markdown content to a database file and enables you to search your Markdown notes with SQL query (and also regex).\n\n## Installation\n\n```sh\n\ngit clone https://github.com/yuis-ice/note-cli.git\ncd note-cli\nchmod 755 ./note-cli.js # if needed\nnpm i\n\n```\n\n## Requirement\n\n- node.js v13.10.1 (probably higher or other versions work)\n- sqlite3-pcre\n\n```sh\n\n# node.js [nvm-sh/nvm](https://github.com/nvm-sh/nvm)\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash\nbash\nnvm install v13.10.1\nnode -v\n\n# sqlite3-pcre\nsudo apt update\nsudo apt install sqlite3 sqlite3-pcre\n\n```\n\n## Examples\n\n![https://yuis.xsrv.jp/images/ss/ShareX_ScreenShot_da0baae1-0746-49b4-ab0d-790b1adddb7c.png](https://yuis.xsrv.jp/images/ss/ShareX_ScreenShot_da0baae1-0746-49b4-ab0d-790b1adddb7c.png)\n\n```sh\n\n./note-cli.js --search --database notes.db.example --header \"python\" --content \"hello.?world\" --limit 1 --hide-sql --format md | bat -l md --paging=never # using [sharkdp/bat](https://github.com/sharkdp/bat) *image\n./note-cli.js --search --database notes.db.example --header \"python\" --content \"hello.?world\" --limit 1 --hide-sql --format json | jq \".[].header\" -r # using [jq](https://github.com/stedolan/jq/)\n./note-cli.js --search --database notes.db.example --header \"python\" --content \"hello.?world\" --limit 1 --hide-sql --format html | jq \".[].entire_note\" -r\n./note-cli.js --search --database notes.db.example --header \"python\" --content \"hello.?world\" --limit 1 --raw-sql \"$( cat raw-sql.sql.example )\"\n\n```\n\n## Command line options\n\n```txt\n\n$ ./note-cli.js --help\nUsage: note-cli [options]\n\nOptions:\n  -i, --index            set command type: index\n  -f, --file \u003cfile\u003e      (index) specify file to index (default: null)\n  -s, --search           set command type: search\n  -r, --regex            (search) enable regex extension for search (default: true)\n  --header \u003ckeyword\u003e     (search) search by header (default: \".\")\n  --content \u003ckeyword\u003e    (search) search by content (default: \".\")\n  --note \u003ckeyword\u003e       (search) search by note (default: \".\")\n  --limit \u003cnumber\u003e       (search) set limit for search (default: -1)\n  -S, --raw-sql \u003csql\u003e    (search) use raw SQL query for search (default: null)\n  -H, --hide-sql         (search) disable showing sql query executed\n  -F, --format \u003cformat\u003e  (search) output format (default: \"json\")\n  --pcre-path \u003cfile\u003e     set sqlite3 pcre file path for search (default: \"/usr/lib/sqlite3/pcre.so\")\n  -d, --database \u003cfile\u003e  specify database file for index/search (default: \"./note-cli.db\")\n  --delete-database      delete database\n  -y, --yes              no confirmation prompt\n  -h, --help             display help for command\n\n```\n\n## LICENSE\n\nNote-CLI is released under the BSD-3-Clause license.\n\nCopyright (c) 2021, Fumiya Arisaka \u003cyuis.twitter@gmail.com\u003e\nAll rights reserved.\n\nThis source code is licensed under the BSD-style license found in the\nLICENSE file in the root directory of this source tree.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuis-ice%2Fnote-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuis-ice%2Fnote-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuis-ice%2Fnote-cli/lists"}