Skip to content

Latest commit

 

History

History
265 lines (234 loc) · 20.2 KB

File metadata and controls

265 lines (234 loc) · 20.2 KB
# Logseq TUI Visual Demo

What You'll See When Running the TUI

1. Journals View (Default - Ctrl+J)

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Logseq TUI                                    Terminal Knowledge Manager ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━┓┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃            ┃┃  Journals │ Pages │ Templates │ Search                   ┃
┃ 📚 Logseq  ┃┠──────────────────────────────────────────────────────────┨
┃            ┃┃                                                           ┃
┃ ├─ 📅      ┃┃   ◀ Prev    2025-10-28 (Monday)    Next ▶     Today     ┃
┃    Journals┃┃                                                           ┃
┃ │ 2025-10  ┃┃  📄 2025-10-28                                           ┃
┃ │ -28      ┃┃  ┌─────────────────────────────────────────────────────┐ ┃
┃ │ 2025-10  ┃┃  │ - Morning thoughts                                  │ ┃
┃ │ -27      ┃┃  │   - Need to test the new TUI feature               │ ┃
┃            ┃┃  │   - Planning to work on documentation              │ ┃
┃ ├─ 📄 Pages┃┃  │ - Tasks for today                                   │ ┃
┃ │ ├─ 📁    ┃┃  │   - TODO Review pull requests                       │ ┃
┃ │   project┃┃  │   - TODO Write blog post about #logseq-python      │ ┃
┃ │   └─     ┃┃  │   - DONE Morning standup meeting                    │ ┃
┃ │     back ┃┃  │ - Evening reflection                                │ ┃
┃ │     end  ┃┃  │   - Good progress on the TUI implementation        │ ┃
┃ │ ├─ 📋    ┃┃  │   - Need to add more keyboard shortcuts            │ ┃
┃ │   temp   ┃┃  │                                                     │ ┃
┃ │   late/  ┃┃  │                                                     │ ┃
┃ │   Meet   ┃┃  │                                                     │ ┃
┃ │   ing    ┃┃  │                                                     │ ┃
┃ │ └─ 📄    ┃┃  │                                                     │ ┃
┃ │   Quick  ┃┃  │                                                     │ ┃
┃ │   Notes  ┃┃  └─────────────────────────────────────────────────────┘ ┃
┃            ┃┃                                                           ┃
┃            ┃┃            [ Save ]          [ Cancel ]                   ┃
┃            ┃┃                                                           ┃
┗━━━━━━━━━━━━┛┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ q Quit │ ^S Save │ ^J Journals │ ^P Pages │ ^T Templates │ ^F Search  ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

What you can do:

  • Click "◀ Prev" to go to yesterday's journal
  • Click "Next ▶" to go to tomorrow's journal
  • Click "Today" to jump back to today
  • Edit the journal content in the text area
  • Press Ctrl+S to save changes
  • Navigate with keyboard shortcuts

2. Pages View (Ctrl+P)

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Logseq TUI                                    Terminal Knowledge Manager ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━┓┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃            ┃┃  Journals │ Pages │ Templates │ Search                   ┃
┃ 📚 Logseq  ┃┠──────────────────────────────────────────────────────────┨
┃            ┃┃                                                           ┃
┃ ├─ 📅      ┃┃  ┌─────────────────┐ ┌────────────────────────────────┐ ┃
┃    Journals┃┃  │ 📄 Quick_Notes  │ │ 📄 Quick Notes                 │ ┃
┃ │ 2025-10  ┃┃  │ 📁 project      │ │ ┌────────────────────────────┐ │ ┃
┃ │ -28      ┃┃  │   /backend      │ │ │ - Important links          │ │ ┃
┃ │ 2025-10  ┃┃  │ 📋 template     │ │ │   - https://github.com/... │ │ ┃
┃ │ -27      ┃┃  │   /Meeting_No.. │ │ │   - https://docs.logseq... │ │ ┃
┃            ┃┃  │                 │ │ │                            │ │ ┃
┃ ├─ 📄 Pages┃┃  │                 │ │ │ - Ideas for the TUI        │ │ ┃
┃ │ ├─ 📁    ┃┃  │                 │ │ │   - Add vim mode           │ │ ┃
┃ │   project┃┃  │                 │ │ │   - Implement graph vis... │ │ ┃
┃ │   └─     ┃┃  │                 │ │ │   - Support for plugins    │ │ ┃
┃ │     back ┃┃  │                 │ │ │                            │ │ ┃
┃ │     end  ┃┃  │                 │ │ │ - Code snippet example     │ │ ┃
┃ │ ├─ 📋    ┃┃  │                 │ │ │   ```python                │ │ ┃
┃ │   temp   ┃┃  │                 │ │ │   from logseq_py.tui ...  │ │ ┃
┃ │   late/  ┃┃  │                 │ │ │   launch_tui("/path...")   │ │ ┃
┃ │   Meet   ┃┃  │                 │ │ │   ```                      │ │ ┃
┃ │   ing    ┃┃  │                 │ │ │                            │ │ ┃
┃ │ └─ 📄    ┃┃  │                 │ │ └────────────────────────────┘ │ ┃
┃ │   Quick  ┃┃  │                 │ │                                │ ┃
┃ │   Notes  ┃┃  │                 │ │   [ Save ]      [ Cancel ]     │ ┃
┃            ┃┃  └─────────────────┘ └────────────────────────────────┘ ┃
┗━━━━━━━━━━━━┛┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ q Quit │ ^S Save │ ^J Journals │ ^P Pages │ ^T Templates │ ^F Search  ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

What you can do:

  • Browse pages in the left list
  • Use j/k to navigate up/down
  • Press Enter to open a page
  • Edit content in the right panel
  • Press Ctrl+S to save
  • Click tree items to quickly navigate

3. Templates View (Ctrl+T)

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Logseq TUI                                    Terminal Knowledge Manager ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━┓┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃            ┃┃  Journals │ Pages │ Templates │ Search                   ┃
┃ 📚 Logseq  ┃┠──────────────────────────────────────────────────────────┨
┃            ┃┃                                                           ┃
┃ ├─ 📅      ┃┃  ┌──────────────────┐ ┌──────────────────────────────┐  ┃
┃    Journals┃┃  │ 📋 Templates     │ │ Template Editor              │  ┃
┃ │ 2025-10  ┃┃  │                  │ │                              │  ┃
┃ │ -28      ┃┃  │ ├─ 📋 Meeting    │ │ Template name:               │  ┃
┃ │ 2025-10  ┃┃  │ │   Notes        │ │ ┌──────────────────────────┐ │  ┃
┃ │ -27      ┃┃  │ └─ 📋 Daily      │ │ │ Meeting Notes            │ │  ┃
┃            ┃┃  │    Review        │ │ └──────────────────────────┘ │  ┃
┃ ├─ 📄 Pages┃┃  │                  │ │                              │  ┃
┃ │ ├─ 📁    ┃┃  │                  │ │ ┌──────────────────────────┐ │  ┃
┃ │   project┃┃  │                  │ │ │ - Meeting: {{topic}}     │ │  ┃
┃ │   └─     ┃┃  │                  │ │ │   - Date: {{date}}       │ │  ┃
┃ │     back ┃┃  │                  │ │ │   - Attendees:           │ │  ┃
┃ │     end  ┃┃  │                  │ │ │     - {{attendee1}}      │ │  ┃
┃ │ ├─ 📋    ┃┃  │                  │ │ │     - {{attendee2}}      │ │  ┃
┃ │   temp   ┃┃  │                  │ │ │   - Agenda:              │ │  ┃
┃ │   late/  ┃┃  │                  │ │ │     - {{agenda_item1}}   │ │  ┃
┃ │   Meet   ┃┃  │                  │ │ │     - {{agenda_item2}}   │ │  ┃
┃ │   ing    ┃┃  │                  │ │ │   - Action items:        │ │  ┃
┃ │ └─ 📄    ┃┃  │                  │ │ │     - TODO {{action1}}   │ │  ┃
┃ │   Quick  ┃┃  │                  │ │ │     - TODO {{action2}}   │ │  ┃
┃ │   Notes  ┃┃  │                  │ │ │   - Notes: {{notes}}     │ │  ┃
┃            ┃┃  │                  │ │ └──────────────────────────┘ │  ┃
┃            ┃┃  │                  │ │                              │  ┃
┃            ┃┃  │ [+ New Template] │ │ [ Save Template ]            │  ┃
┃            ┃┃  │                  │ │ [ Delete Template ]          │  ┃
┃            ┃┃  │                  │ │                              │  ┃
┃            ┃┃  │                  │ │ Variables: topic, date,      │  ┃
┃            ┃┃  │                  │ │ attendee1, attendee2, etc.   │  ┃
┃            ┃┃  └──────────────────┘ └──────────────────────────────┘  ┃
┗━━━━━━━━━━━━┛┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ q Quit │ ^S Save │ ^J Journals │ ^P Pages │ ^T Templates │ ^F Search  ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

What you can do:

  • View all templates in the left list
  • Click "New Template" to create one
  • Edit template name and content
  • Variables are auto-detected ({{variable}})
  • Save or delete templates
  • Templates support {{placeholders}}

4. Search View (Ctrl+F)

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Logseq TUI                                    Terminal Knowledge Manager ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━┓┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃            ┃┃  Journals │ Pages │ Templates │ Search                   ┃
┃ 📚 Logseq  ┃┠──────────────────────────────────────────────────────────┨
┃            ┃┃                                                           ┃
┃ ├─ 📅      ┃┃  Search: ┌───────────────────────────────────────────┐   ┃
┃    Journals┃┃          │ TUI                                       │   ┃
┃ │ 2025-10  ┃┃          └───────────────────────────────────────────┘   ┃
┃ │ -28      ┃┃                                                           ┃
┃ │ 2025-10  ┃┃  ┌───────────────────────────────────────────────────┐   ┃
┃ │ -27      ┃┃  │ Page       │ Block Content         │ Tags        │   ┃
┃            ┃┃  ├───────────────────────────────────────────────────┤   ┃
┃ ├─ 📄 Pages┃┃  │ 2025-10-28 │ Need to test the new  │ #logseq-... │   ┃
┃ │ ├─ 📁    ┃┃  │            │ TUI feature           │             │   ┃
┃ │   project┃┃  ├───────────────────────────────────────────────────┤   ┃
┃ │   └─     ┃┃  │ 2025-10-28 │ Good progress on the  │             │   ┃
┃ │     back ┃┃  │            │ TUI implementation    │             │   ┃
┃ │     end  ┃┃  ├───────────────────────────────────────────────────┤   ┃
┃ │ ├─ 📋    ┃┃  │ Quick_     │ Ideas for the TUI:    │             │   ┃
┃ │   temp   ┃┃  │ Notes      │ Add vim mode, Impl... │             │   ┃
┃ │   late/  ┃┃  ├───────────────────────────────────────────────────┤   ┃
┃ │   Meet   ┃┃  │ Quick_     │ from logseq_py.tui... │             │   ┃
┃ │   ing    ┃┃  │ Notes      │ launch_tui("/path")   │             │   ┃
┃ │ └─ 📄    ┃┃  └───────────────────────────────────────────────────┘   ┃
┃ │   Quick  ┃┃                                                           ┃
┃ │   Notes  ┃┃  Found 4 results                                          ┃
┃            ┃┃                                                           ┃
┗━━━━━━━━━━━━┛┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ q Quit │ ^S Save │ ^J Journals │ ^P Pages │ ^T Templates │ ^F Search  ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

What you can do:

  • Type search query and press Enter
  • View results in table format
  • See page name, block content preview, and tags
  • Click results to navigate to that page
  • Search is case-insensitive

How to Try It Yourself

  1. Install dependencies:

    pip install textual
  2. Run the demo:

    python3 demo_tui.py
  3. Or use your own graph:

    python3 test_tui.py /path/to/your/logseq/graph

Demo Graph Contents

The demo graph includes:

  • Journal entry for today (2025-10-28) with tasks
  • Quick Notes page with links and code
  • project/backend page (namespace example)
  • template/Meeting Notes template with variables

Try These Actions

  1. Navigate journals:

    • Press Ctrl+J to go to Journals view
    • Click "◀ Prev" to see yesterday
    • Click "Today" to return
  2. Edit a page:

    • Press Ctrl+P for Pages view
    • Press 'j' to move down the list
    • Press Enter to open
    • Edit the content
    • Press Ctrl+S to save
  3. View templates:

    • Press Ctrl+T for Templates
    • Click on "Meeting Notes"
    • See the variables detected
  4. Search:

    • Press Ctrl+F for Search
    • Type "TUI"
    • Press Enter to search
    • See all matching blocks
  5. Quit:

    • Press 'q' to exit

Next Steps

After trying the demo, you can:

  • Point it to your real Logseq graph
  • Create your own templates
  • Use it for quick journal entries
  • Search your knowledge base from terminal
  • Integrate it into your workflow scripts