logo
0
0
WeChat Login

Zed History - uTools Plugin

uTools plugin for quickly searching and opening your recent Zed editor projects.

Usage

  1. Open uTools and type zed, zed history, or zed文件.
  2. A list of your recent Zed projects will be displayed, sorted by last opened time.
  3. Filter the list by typing a keyword to match the project name or path.
  4. Press Enter on a selected project to open it in Zed.

Features

  • Fuzzy search for projects by name or path
  • Lists the most recently opened projects first
  • Cross-platform support (Windows, macOS)
  • Real-time search with up to 50 recent projects

Requirements

  • Zed Editor: You must have Zed installed
  • Command Line Tools: Install Zed's CLI tool via Zed > Install Command Line Tools (optional, for direct opening)
  • Supported Platforms: Windows and macOS

Installation

  1. Clone or download this plugin to your uTools plugins directory
  2. Ensure sql.js library files are present in the sql/ directory
  3. Reload uTools or restart it to activate the plugin

File Structure

zedhistory/ ├── src/history.js # Core database query logic ├── sql/ # sql.js library (sql-wasm.js + .wasm files) ├── icon/zed.png # Plugin icon ├── preload.js # uTools preload script ├── plugin.json # Plugin configuration └── README.md # This file

How It Works

  1. Reads Zed's SQLite database from the platform-specific config directory
  2. Queries the workspaces table for recent projects
  3. Parses project paths and displays them in uTools
  4. Supports keyword filtering with fuzzy matching

For Developers

  • Main Logic: src/history.js - Zed database discovery and querying
  • Configuration: plugin.json - Plugin metadata and feature definitions
  • Preload: preload.js - uTools integration and event handlers
  • Database: Uses sql.js to read Zed's SQLite database safely (via temporary copy)

Database Locations

  • Windows: %LOCALAPPDATA%\Zed\db\0-stable\db.sqlite
  • macOS: ~/Library/Application Support/Zed/db/0-stable/db.sqlite
  • Linux: ~/.local/share/zed/db/0-stable/db.sqlite (not currently configured in plugin.json)