Skip to content

kerim/raycast-logseq-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Logseq Search - Raycast Extension

Search your Logseq DB graphs directly from Raycast.

Raycast TypeScript License

Features

  • πŸ” Real-time search - Search as you type with intelligent debouncing
  • πŸ“Š Graph selector - Automatic detection and dropdown selection of available graphs
  • πŸ’Ύ Remembers selection - Your last selected graph is saved between sessions
  • πŸš€ Fast - Direct HTTP API integration with Logseq
  • πŸ”— Deep linking - Open pages directly in Logseq
  • πŸ“‹ Quick actions - Copy page links and titles
  • ⚑ No Logseq Desktop required - Works with Logseq CLI and DB graphs

Screenshots

Search Interface Search interface with graph selector dropdown

Prerequisites

Required

  1. Raycast - Download and install Raycast

  2. Logseq HTTP Server - HTTP server for Logseq CLI

    Follow the installation guide in the logseq-http-server repository

  3. Logseq DB Graph - The extension works with Logseq DB (database) graphs only

    Verify your graphs:

    logseq list

Installation

Option 1: Install from Source

  1. Clone this repository:

    git clone https://github.com/kerim/raycast-logseq-search.git
    cd raycast-logseq-search
  2. Install dependencies:

    npm install
  3. Build the extension:

    npm run build
  4. Import in Raycast:

    • Open Raycast Settings (⌘,)
    • Go to Extensions tab
    • Click "+" β†’ "Add Local Extension"
    • Select the raycast-logseq-search folder
    • Click "Add"

Option 2: Development Mode

For development or testing:

git clone https://github.com/kerim/raycast-logseq-search.git
cd raycast-logseq-search
npm install
npm run dev

This opens Raycast with the extension loaded in development mode.

Usage

First Time Setup

  1. Start the Logseq HTTP Server:

    cd /path/to/logseq-http-server
    python3 logseq_server.py
  2. Open Raycast (⌘ Space)

  3. Search for "Search Logseq"

  4. Select your graph from the dropdown (top-right)

  5. Start searching! Your graph selection will be remembered

Daily Use

  1. Open Raycast (⌘ Space)
  2. Type "Search Logseq"
  3. Start typing your search query
  4. Press Enter to open in Logseq

Keyboard Shortcuts

  • Enter - Open page in Logseq
  • ⌘ C - Copy page link to clipboard
  • ⌘ ⇧ C - Copy page title to clipboard
  • ⌘ , - Open extension preferences

Configuration

The extension has minimal configuration needed. All settings are optional:

  • Default Graph Name - Optional default graph for first launch
  • Server URL - HTTP server URL (default: http://localhost:8765)
  • Max Results - Maximum search results to display (default: 20)

Access preferences: Raycast β†’ Extensions β†’ Logseq Search β†’ Configure

Dependencies

Extension Dependencies

  • @raycast/api (^1.98.2) - Raycast extension API
  • @raycast/utils (^1.17.0) - Raycast utilities

External Dependencies

  • Logseq HTTP Server - HTTP API server for Logseq CLI
  • Logseq CLI - Official Logseq command-line interface
  • jet - EDN to JSON converter (required by HTTP server)

How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Raycast   β”‚ ◄─────► β”‚   This Extension β”‚ ◄─────► β”‚  HTTP Server    β”‚
β”‚     UI      β”‚  User   β”‚   (TypeScript)   β”‚  REST   β”‚   (Python)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  Input  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  API    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                              β”‚
                                                              β–Ό
                                                      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                                      β”‚   Logseq CLI    β”‚
                                                      β”‚   DB Graphs     β”‚
                                                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Extension fetches available graphs from HTTP server
  2. User selects graph and types search query
  3. Extension sends search request to HTTP server
  4. HTTP server queries Logseq CLI
  5. Results are displayed in Raycast
  6. User opens page using logseq:// URL scheme

API Endpoints Used

The extension communicates with these HTTP server endpoints:

  • GET /list - Fetch available Logseq graphs
  • GET /search?q={query}&graph={graph} - Search pages in a graph

Troubleshooting

"Cannot connect to Logseq HTTP server"

Cause: HTTP server is not running

Solution:

cd /path/to/logseq-http-server
python3 logseq_server.py

Verify server is running:

curl http://localhost:8765/health

"No graphs available" in dropdown

Possible causes:

  • HTTP server is not running
  • No Logseq DB graphs exist
  • Incorrect server URL in preferences

Solutions:

  1. Check server is running: curl http://localhost:8765/list
  2. Verify graphs exist: logseq list
  3. Check server URL in extension preferences

Extension not appearing in Raycast

Solution:

  1. Rebuild the extension: npm run build
  2. Restart Raycast: ⌘ Q then reopen
  3. Check Extensions tab in Raycast settings

Development

Project Structure

raycast-logseq-search/
β”œβ”€β”€ src/
β”‚   └── search-logseq.tsx      # Main extension component
β”œβ”€β”€ assets/
β”‚   └── extension-icon.png     # Extension icon
β”œβ”€β”€ package.json               # Extension manifest
β”œβ”€β”€ tsconfig.json              # TypeScript configuration
β”œβ”€β”€ README.md                  # This file
└── .gitignore                 # Git ignore rules

Build Commands

# Development mode (hot reload)
npm run dev

# Production build
npm run build

# Lint code
npm run lint

# Fix lint issues
npm run fix-lint

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run npm run lint and fix any issues
  5. Submit a pull request

Related Projects

License

MIT License - see LICENSE file for details

Author

Created by Kerim Friedman

Acknowledgments

About

Search your Logseq DB graphs directly from Raycast

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •