{"id":22641964,"url":"https://github.com/jrswab/lsq","last_synced_at":"2025-04-09T14:06:23.974Z","repository":{"id":264996872,"uuid":"894702569","full_name":"jrswab/lsq","owner":"jrswab","description":"A command-line tool for Logseq to quickly create and edit journal entries.","archived":false,"fork":false,"pushed_at":"2025-02-16T18:36:15.000Z","size":128,"stargazers_count":82,"open_issues_count":1,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T12:39:16.302Z","etag":null,"topics":["logseq","notes","terminal"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jrswab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":["jrswab"],"liberapay":"jrswab"}},"created_at":"2024-11-26T20:41:58.000Z","updated_at":"2025-03-31T06:47:04.000Z","dependencies_parsed_at":"2024-12-29T03:23:10.317Z","dependency_job_id":"8fdda411-2fcf-412a-9498-e4953138ac0f","html_url":"https://github.com/jrswab/lsq","commit_stats":null,"previous_names":["jrswab/lsq"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrswab%2Flsq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrswab%2Flsq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrswab%2Flsq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrswab%2Flsq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrswab","download_url":"https://codeload.github.com/jrswab/lsq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054230,"owners_count":21039952,"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","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":["logseq","notes","terminal"],"created_at":"2024-12-09T05:01:24.941Z","updated_at":"2025-04-09T14:06:23.942Z","avatar_url":"https://github.com/jrswab.png","language":"Go","funding_links":["https://github.com/sponsors/jrswab","https://liberapay.com/jrswab"],"categories":["🔍 CLI Tools and Scripts"],"sub_categories":["Misc CLI"],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg width=\"25%\" src=\"https://lsq.sh/media/img/lsq_logo_cropped.png\" alt=\"lsq logo\"\u003e\n\u003c/p\u003e\n\n# lsq\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/jrswab/lsq)](https://goreportcard.com/report/github.com/jrswab/lsq)\n[![Release](https://img.shields.io/github/v/release/jrswab/lsq)](https://github.com/jrswab/lsq/releases)\n[![License](https://img.shields.io/github/license/jrswab/lsq)](https://github.com/jrswab/lsq/blob/master/LICENSE)\n\nThe ultra-fast CLI companion for [Logseq](https://github.com/logseq/logseq) designed to speed up your note capture directly from the terminal!\n\n## Why lsq?\n- ⚡️ Lightning-fast journal additions without leaving your terminal\n- ⌨️ Optimized for both quick captures and extended writing sessions\n- 🎯 Native support for Logseq's file naming and formatting conventions\n- 🔄 Seamless integration with your existing Logseq workflow\n- 💻 Built by Logseq users, for Logseq users\n\n## Features That Power Your Workflow\n- External editor integration ($EDITOR by default)\n- Automatic journal file creation\n- Support for both Markdown and Org formats\n- Configurable file naming format\n- Customizable directory location\n- User defined configuration file\n\n## Ready to Start?\n```bash\ngo install github.com/jrswab/lsq@latest\n```\n```bash\nlsq\n```\n\n## Usage\n### Command Line Options\n- `-a`: Append text directly to the current journal page\n- `-A`: Append the contents of STDIN to the current journal page\n- `-d`: Specify main directory path. (example: `/home/jrswab/Documents/Notes`)\n- `-e`: Set editor to use while editing files. (Defaults to $EDITOR, then Vim if $EDITOR is not set)\n- `-f`: Search pages and aliases. Must be followed by a string.\n- `-o`: Automatically open the first result from the search.\n- `-p`: Open a specific page from the pages directory.\n- `-s`: Specify the journal date to open. (Must be `yyyy-MM-dd` formatted)\n- `-v`: Display the version of lsq being executed.\n- `-y`: Open yesterday's journal file.\n\n### Configuration File\nThis file must be stored in your config directory as `lsq/config.edn`.\nOn Unix systems, it returns `$XDG_CONFIG_HOME` if non-empty, else `$HOME/.config` will be used.\nOn macOS, it returns `$HOME/Library/Application Support`.\nOn Windows, it returns `%AppData%`.\nOn Plan 9, it returns `$home/lib`.\n\n#### Configuration Behavior\nThe configuration file will override any lsq defaults which are defined. If a CLI flag is provided, the flag value will override the config file value.\n\n#### Configuration File Example:\n```EDN\n{\n  ;; Either \"Markdown\" or \"Org\".\n  :file/type \"Markdown\"\n  ;; This will be used for journal file names\n  ;; Using the format below and the file type above will produce 2025.01.01.md\n  :file/format \"yyyy_MM_dd\"\n  ;; The directory which holds all your notes\n  :directory \"/home/jaron/Logseq\"\n}\n```\n**Note:** The configured directory must contain both a `journals` and `pages` subdirectory for lsq to function properly. These are automatically created when using Logseq, but will need to be manually created if setting lsq to use a new directory or without Logseq.\n\n### Usage Examples:\n```bash\nlsq\n```\nThis opens today's journal in your default editor ($EDITOR environment variable).\nIf no editor is defined in $EDITOR, then `Vim` will be used.\n\n```bash\nlsq -p file_name.md -a \"text to append\"\n```\nThis combination will append the text to the page with file name `file_name.md`.\nIf `-p` is not provided the appended text will be placed in today's journal entry.\n\n```bash\nlsq -f word -o\n```\nThis will search your pages for files containing \"word\" and open the first result in $EDITOR.\nIf `-o` is not provided lsq will output all files which contain \"word\" to STDOUT.\n\n```bash\ncat ~/.zshrc | lsq -A\n```\nThis will take the contents of your `~/.zshrc` file and append it to your current\njournal. This reads STDIN through to end-of-file, so be sure to `Ctrl-d` if your\ncontents don't contain an end-of-file.\n\n```bash\nrun_long_batch_job |\u0026 lsq -A -p \"long-job.$(date +%s).log\"\n```\nThis will run your long-running batch job, and it'll append the contents of STDIN\nand STDERR (note the pipe!) to a new page called `long-job.UNIX_TIMESTAMP.log`.\n\n## Contributing\nFor information on contributing to lsq check out [CONTRIBUTING.md](https://github.com/jrswab/lsq/blob/master/CONTRIBUTING.md).\n\n## License\nGPL v3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrswab%2Flsq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrswab%2Flsq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrswab%2Flsq/lists"}