Bridging CLI and Note-Taking

Bridging CLI and Note-Taking


As developers, we spend countless hours in the terminal. It’s our primary interface for everything from git operations to server management. But what happens when you need to quickly jot down a thought or make a note while deep in a coding session?

For me, this meant an annoying context switch. I use Logseq as my primary note-taking and knowledge management system, but every time I needed to make a quick note, I had to:

  1. Take my hands off the keyboard
  2. Reach for the mouse
  3. Switch windows to Logseq
  4. Navigate to today’s journal
  5. Make my note
  6. Switch back to the terminal

These micro-interruptions add up. They break flow, waste time, and worst of all, sometimes discourage me from taking notes at all. As a developer who values both efficient workflows and comprehensive note-taking, this friction point needed a solution.



Enter lsq

I created lsq, a minimal command-line tool that lets you create Logseq journal entries directly from your terminal. At its most basic, it’s just:

lsq
Enter fullscreen mode

Exit fullscreen mode

This single command opens today’s journal in your preferred editor ($EDITOR). No window switching, no mouse required. Just quick, efficient note-taking without leaving your terminal workflow.



How It Works

When you run lsq, it:

  1. Checks your Logseq configuration
  2. Creates today’s journal file if it doesn’t exist
  3. Opens it in your preferred editor

By default, it uses the standard Logseq directory structure (~/Logseq) and reads your config.edn file for format preferences (Markdown or Org mode).



Beyond Basic Editor Integration

While solving the basic problem, I realized there were Logseq-specific features that would be useful to have in the terminal. This led to adding a Terminal User Interface (TUI) mode:

lsq -t
Enter fullscreen mode

Exit fullscreen mode

The TUI provides:

  • Direct journal page editing
  • TODO state cycling with keyboard shortcuts
  • Priority state management
  • Immediate save capabilities



Real World Impact

This simple tool has significantly improved my daily workflow:

  • No more context switching for quick notes
  • Faster capture of ideas while coding
  • Easier tracking of terminal commands I want to remember
  • Seamless integration with my existing terminal workflow



What’s Next?

The project is still evolving. As my first TUI application, it’s quite basic but functional. I’m actively working on improvements and would love community input on which features to prioritize.

Some ideas under consideration:

  • Block reference support
  • Tag autocompletion
  • Page linking capabilities
  • Block property handling



Try It Yourself

If you’re interested in streamlining your terminal-to-notes workflow, you can install lsq with:

go install github.com/jrswab/lsq@latest
Enter fullscreen mode

Exit fullscreen mode

The project is open source and available at github.com/jrswab/lsq.



Share Your Thoughts

What terminal-to-note-taking friction points do you face? How do you handle quick note-taking while working in the terminal? I’d love to hear your thoughts and ideas for improving lsq.



Source link
lol

By stp2y

Leave a Reply

Your email address will not be published. Required fields are marked *

No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.