A command-line tool for rapid journal entry creation in Logseq, featuring both TUI and external editor support.
- External editor integration ($EDITOR by default)
- Automatic journal file creation
- Support for both Markdown and Org formats
- Configurable file naming format
- Customizable directory location
- User defined configuration file
go install github.com/jrswab/lsq@latest
Basic usage:
lsq
This opens today's journal in your default editor ($EDITOR environment variable).
If no editor is defined in $EDITOR, then Vim
will be used.
-a
: Append text directly to the current journal page-d
: Specify main directory path. (example:/home/jrswab/Documents/Notes
)-e
: Set editor to use while editing files. (Defaults to $EDITOR, then Vim if $EDITOR is not set)-f
: Search pages and aliases. Must be followed by a string.-o
: Automatically open the first result from the search.-p
: Open a specific page from the pages directory.-s
: Specify the journal date to open. (Must beyyyy-MM-dd
formatted)-v
: Display the version of lsq being executed. (Added in v0.11.0)-y
: Open yesterday's journal file. (Added in v0.11.0)
This file must be stored in your config directory as lsq/config.edn
.
On Unix systems, it returns $XDG_CONFIG_HOME
if non-empty, else $HOME/.config
will be used.
On macOS, it returns $HOME/Library/Application Support
.
On Windows, it returns %AppData%
.
On Plan 9, it returns $home/lib
.
The 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.
{
;; Either "Markdown" or "Org".
:file/type "Markdown"
;; This will be used for journal file names
;; Using the format below and the file type above will produce 2025.01.01.md
:file/format "yyyy_MM_dd"
;; The directory which holds all your notes
:directory "/home/jaron/Logseq"
}
As lsq moves toward v1.0.0, I've decided to focus on perfecting the core CLI experience. The TUI interface is now deprecated in favor of enhanced external editor integration and improved command-line workflows. This aligns with the project goal of providing the fastest, most reliable journaling experience possible. While the TUI was fast and operated well, it's outside of the current scope of this project. However, this does not mean that TUI is gone forever and if the community wants a TUI after v1.0.0 is released, I'd be happy to work on it again.
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 the line.- Arrow keys: Navigate through text
- Type to search through files
↑/↓
: Navigate through resultsEnter
: Open selected file (current file saves on open)Esc
: Close search modal
- Bubble Tea: Terminal UI framework
- Lipgloss: Terminal UI styling
- EDN: Configuration file parsing
For information on contributing to lsq check out CONTRIBUTING.md.
GPL v3