An interactive terminal-based interface for viewing and editing Logseq pages, journals, and templates.
- Journal Navigation: Browse and edit daily journal entries with date navigation
- Page Management: View, edit, and create pages with full markdown support
- Template System: Create, edit, and manage templates with variable substitution
- Full-text Search: Search across all pages and blocks
- Keyboard Shortcuts: Efficient navigation with vim-style keybindings
- Live Updates: Changes are saved directly to your Logseq graph
The TUI requires the textual library:
pip install logseq-python[tui]Or install textual separately:
pip install textualLaunch the TUI using the CLI:
logseq tui /path/to/your/graphOr use the test script:
python test_tui.py /path/to/your/graphLaunch from Python code:
from logseq_py.tui import launch_tui
launch_tui("/path/to/your/graph")The TUI is organized into four main tabs:
Navigate and edit daily journal entries.
Features:
- Date navigation with Previous/Next buttons
- Quick jump to today
- Full markdown editor for journal content
- Automatic journal page creation for new dates
Navigation:
◀ Prev- Go to previous dayNext ▶- Go to next dayToday- Jump to today's journalCtrl+S- Save current journal entry
Browse and edit regular Logseq pages.
Features:
- Sidebar with page tree (organized by namespaces)
- Page list with search
- Full markdown editor
- Support for all Logseq page types
Navigation:
- Click pages in sidebar or list to open
j/k- Navigate page list (vim-style)Enter- Open selected pageCtrl+S- Save current pageCtrl+N- Create new page
Manage Logseq templates.
Features:
- List all templates in your graph
- Create new templates
- Edit existing templates
- Variable detection ({{variable}} syntax)
- Delete templates
Template Format:
- Template content here
- Use {{variable_name}} for placeholders
- Use {{date}} for current date
- Use {{time}} for current timeNavigation:
- Click template in list to edit
+ New Template- Create a new templateSave Template- Save changesDelete Template- Remove template
Search across all pages and blocks.
Features:
- Full-text search
- Results table with page name, block content, and tags
- Search result count
Usage:
- Type your search query
- Press
Enterto search - View results in the table
| Key | Action |
|---|---|
q |
Quit application |
Ctrl+S |
Save current page/journal |
Ctrl+J |
Switch to Journals view |
Ctrl+P |
Switch to Pages view |
Ctrl+T |
Switch to Templates view |
Ctrl+F |
Switch to Search view |
Ctrl+N |
Create new page |
| Key | Action |
|---|---|
j |
Move down in lists (vim-style) |
k |
Move up in lists (vim-style) |
Enter |
Select/open item |
Tab |
Move between UI elements |
Shift+Tab |
Move backward between elements |
Standard text editor shortcuts work in the markdown editor:
Ctrl+A- Select allCtrl+C- CopyCtrl+V- PasteCtrl+X- CutCtrl+Z- UndoCtrl+Y- Redo
- Switch to Templates tab (
Ctrl+T) - Click
+ New Template - Enter template name
- Add template content with variables
- Click
Save Template
Templates support variable substitution using {{variable}} syntax:
- Meeting notes for {{topic}}
- Date: {{date}}
- Time: {{time}}
- Attendees:
- {{attendee1}}
- {{attendee2}}
- Notes:
- {{notes}}When the template is detected, all {{variable}} placeholders are identified and shown in the UI.
Templates are stored as pages in your graph under the template/ namespace with the template:: true property.
Example: A template named "Meeting Notes" is stored as template/Meeting Notes.md.
The sidebar shows pages organized by:
- Journals - Most recent 10 journal entries
- Pages - Regular pages grouped by namespace
- Namespaced pages - Under folder icons (📁)
- Root pages - Without namespace
Example structure:
📚 Logseq
├─ 📅 Journals
│ ├─ 2025-10-28
│ ├─ 2025-10-27
│ └─ ...
└─ 📄 Pages
├─ 📁 project
│ ├─ project/backend
│ └─ project/frontend
├─ 📋 template/Meeting Notes
└─ 📄 Quick Notes
The search function finds matches across:
- Page names
- Block content
- Block properties
- Tags
Search is case-insensitive and searches all loaded pages.
- The TUI loads your entire graph on startup
- For large graphs (1000+ pages), initial load may take a few seconds
- Page tree is limited to first 50 pages for performance
- Journal list shows last 10 entries
- Changes are saved directly to markdown files
- No auto-save - use
Ctrl+Sto save explicitly - The editor supports full markdown syntax
- Properties are preserved when editing
- Store reusable content as templates
- Use descriptive variable names
- Organize templates with the
template/namespace - Templates can include block structure and properties
- Use keyboard shortcuts for speed
- Tree view for quick access to frequent pages
- List view for browsing all pages
- Search for finding specific content
Check that textual is installed:
pip install textualVerify the graph path is correct and contains markdown files:
ls /path/to/your/graph- Ensure you press
Ctrl+Sto save - Check file permissions on graph directory
- Verify Logseq is not running (file locks)
If the TUI displays incorrectly:
- Ensure terminal supports Unicode
- Try resizing terminal window
- Use a modern terminal emulator (iTerm2, Alacritty, etc.)
Set environment variable for default graph:
export LOGSEQ_GRAPH_PATH="/path/to/your/graph"
python test_tui.pyLaunch TUI with different graphs:
logseq tui ~/Documents/Logseq/Work
logseq tui ~/Documents/Logseq/PersonalUse the TUI programmatically:
from pathlib import Path
from logseq_py.tui import LogseqTUI
# Create TUI instance
app = LogseqTUI(Path("/path/to/graph"))
# Run the app
app.run()- Async Processor: Process content in bulk - see Async Processing
- Builder System: Construct complex content - see Builders
- CLI: Command-line tools - see CLI Reference
Planned features for future versions:
- Template application to pages/journals
- Block-level editing
- Task management view
- Graph visualization
- Custom themes
- Plugin system
- Multi-graph workspace
- Vim mode
- Preview mode for markdown
- Diff view for changes
Found a bug or have a feature request? Please open an issue on GitHub.