Awesome
lsq
A command-line tool for rapid journal entry creation in Logseq, featuring both TUI and external editor support.
Features
- External editor integration ($EDITOR by default)
- Terminal User Interface (TUI) with real-time editing
- Automatic journal file creation
- Support for both Markdown and Org formats
- Configurable file naming format
- Customizable Logseq directory location
TUI Specific Features
- File search functionality with prefix matching
- TODO & priority cycling through keyboard shortcuts
- Line indentation & unindentation
- Auto-save when switching files through search
Installation
go install github.com/jrswab/lsq@latest
Usage
Basic usage:
lsq
This opens today's journal in your default editor ($EDITOR environment variable).
If no editor is defined in $EDITOR then Vim
is will be used.
Command Line Options
-a
: Append text directly to the current journal page-c
: Specify config filename. (default: "config.edn")-d
: Specify Logseq directory name. (default: "Logseq")-e
: Set editor to use while editing files. (If the flag is not provided$EDITOR
is used. If$EDITOR
is not set, Vim is used.)-f
: Search pages and aliases. Must be followed by a string.-l
: Specify Logseq config directory name. (default: "logseq")-o
: Automatically open the first result from the search.-p
: Open a specific page from the Logseq pages directory.-s
: Specify the journal date to open. (Must beyyy-MM-dd
formatted)-t
: Use the built-in TUI instead of external editor.
TUI Controls
Ctrl+S
: Save current fileCtrl+C
: QuitCtrl+T
: Cycle through TODO states on current lineCtrl+P
: Cycle through priority states on current lineCtrl+F
: Open search modaltab
: Indent the entire line from anywhere on the line.shift+tab
: Unindent the line from anywhere on te line.- Arrow keys: Navigate through text
Search Modal Controls
- Type to search through files
↑/↓
: Navigate through resultsEnter
: Open selected file (current files saves on open)Esc
: Close search modal
Configuration
LSQ reads your Logseq configuration from config.edn
. Supported settings:
meta/version
: Configuration versionpreferred-format
: File format ("Markdown" or "Org")journal/file-name-format
: Date format for journal files (e.g., "yyyy_MM_dd")
Dependencies
- Bubble Tea: Terminal UI framework
- Lipgloss: Terminal UI styling
- EDN: Configuration file parsing
Contributing
First off, thank you for considering contributing to lsq! 🎉
Ways to Contribute
- Report bugs
- Suggest new features
- Improve documentation
- Submit pull requests
- Share how you use lsq
- Star the project on GitHub
Development Setup
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/lsq.git
- Add the upstream remote:
git remote add upstream https://github.com/jrswab/lsq.git
- Create a branch for your work:
git checkout -b your-feature-branch
Pull Request Process
- Update the README.md with details of any interface changes if applicable
- Keep PRs focused - one feature or fix per PR
- Use clear, descriptive commit messages
- Make sure your branch is up to date with main before submitting
- Include a clear description of the changes in your PR
First Time Contributors
New to contributing? Look for issues tagged with good-first-issue
or documentation
. These are great starting points!
See CONTRIBUTORS.md for a list of project contributors.
License
GPL v3