Skip to content

aarav0180/Trace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Trace icon

TRACE

The Intelligence Layer for Your OS

Built with Tauri Rust TypeScript Platform License Version


Instant file search. Natural language shell. AI-powered document chat. All from a single floating command bar โ€” summoned with one keypress.


Super + F โ†’ launch Trace from anywhere


What is Trace?

Trace is a lightweight, keyboard-driven desktop launcher that bridges your operating system to cloud AI. It hovers over your desktop as a frameless floating bar, appears in under 100ms, and disappears the moment you're done.

  • Find any file in milliseconds with fuzzy search
  • Launch any app by typing its name
  • Chat with documents โ€” select a file, press Tab, ask anything
  • Translate plain English to shell commands โ€” type > and describe what you want
  • Evaluate math inline โ€” no calculator app needed
  • Built entirely in Rust + TypeScript via Tauri v2

Features

โšก Instant File Search

Real-time fuzzy matching as you type โ€” results in < 50ms. Multi-threaded indexer scans your home directory at startup; a live file watcher (inotify / ReadDirectoryChanges) keeps the index in sync with no polling. Matched characters are highlighted inline. Up to 20 results, scrollable.

๐Ÿš€ App Launcher

Unified file + app search in a single bar.

  • Linux โ€” auto-discovers from .desktop files across /usr/share/applications, ~/.local/share/applications, Flatpak, and Snap
  • Windows โ€” scans Start Menu .lnk shortcuts

๐Ÿ’ฌ Document Chat (AI-powered)

Select any file in results and press Tab to enter Chat Mode. File contents are injected into the LLM's context window. Ask questions, get summaries, request rewrites โ€” all without opening another app. Supports source code, Markdown, config files, plain text, and PDF files.

๐Ÿ–ฅ๏ธ Natural Language โ†’ Shell

Type > and describe what you want in plain English. Trace translates it to a real shell command via your LLM. Dangerous commands (rm -rf, mkfs, format, etc.) are flagged with a warning. Commands are always shown for review โ€” never auto-executed.

๐Ÿงฎ Inline Math

Type any expression (2^10, sqrt(144), sin(pi/4)) and get an instant result without leaving the bar. Variables and equations open a graph panel automatically.

๐Ÿ”‘ Bring Your Own Key (BYOK)

Plug in your API key for any supported provider. Switch models per-task from the built-in settings panel.

Provider Fast / Cheap Smart
OpenAI gpt-4o-mini gpt-4o
Anthropic claude-haiku-4-20250414 claude-sonnet-4-20250514
Google gemini-2.0-flash gemini-1.5-pro
HuggingFace mistralai/Mistral-7B-Instruct Qwen/Qwen2.5-72B-Instruct
OpenRouter google/gemma-3-4b-it:free deepseek/deepseek-chat

๐ŸŽจ Noir UI

Pure black (#000000) frameless window. Playfair Display headings, Poppins interface type. Always-on-top, draggable, resizable. Smooth transitions, no jank, feels native.


Keyboard Shortcuts

Key Action
Super + F (or auto-assigned) Toggle Trace window system-wide
โ†‘ / โ†“ Navigate results
Enter Open file / launch app / send message / confirm command
Tab Enter Chat Mode on the selected file
Escape Exit chat / cancel command / hide window
> prefix Activate NLP โ†’ Shell mode

The system shortcut is registered automatically on first launch. If Super+F is taken, Trace picks the next free key from Super+J, Super+Y, Super+K โ€ฆ and shows a toast notification with the result.


Tech Stack

Layer Technology Purpose
Backend Rust Indexing, search, IPC, API dispatch, PDF extraction
Frontend TypeScript + HTML/CSS UI, keyboard nav, markdown rendering
Framework Tauri v2 Windowing, IPC, single-instance, native shell
Search fuzzy-matcher (Skim) Sub-50ms fuzzy match with scored results
Indexing walkdir + notify Multi-threaded scan + real-time watcher
PDF pdf-extract Native Rust PDF text extraction
AI OpenAI / Anthropic / Google / HF / OpenRouter Shell translation, document Q&A
HTTP reqwest Async HTTP client for all cloud APIs
Math meval Expression evaluation + graphing

Project Structure

Trace/
โ”œโ”€โ”€ index.html              # App shell
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ vite.config.ts
โ”‚
โ”œโ”€โ”€ src/                    # โ”€โ”€ Frontend โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
โ”‚   โ”œโ”€โ”€ main.ts             # App logic, keyboard nav, markdown renderer
โ”‚   โ””โ”€โ”€ styles.css          # Noir theme, animations, chat styles
โ”‚
โ””โ”€โ”€ src-tauri/              # โ”€โ”€ Backend โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    โ”œโ”€โ”€ Cargo.toml
    โ”œโ”€โ”€ tauri.conf.json
    โ””โ”€โ”€ src/
        โ”œโ”€โ”€ main.rs         # Entry point
        โ”œโ”€โ”€ lib.rs          # Bootstrap, plugins, single-instance toggle
        โ”œโ”€โ”€ commands.rs     # Tauri IPC command handlers
        โ”œโ”€โ”€ indexer.rs      # Multi-threaded filesystem scanner
        โ”œโ”€โ”€ watcher.rs      # Real-time file watcher
        โ”œโ”€โ”€ search.rs       # Fuzzy search engine
        โ”œโ”€โ”€ launcher.rs     # App discovery (.desktop / .lnk)
        โ”œโ”€โ”€ settings.rs     # BYOK settings (persisted to config dir)
        โ”œโ”€โ”€ llm.rs          # Unified LLM client (5 providers)
        โ”œโ”€โ”€ shell_cmd.rs    # NLP โ†’ Shell translation & safe execution
        โ””โ”€โ”€ doc_chat.rs     # Document chat โ€” context trimming, PDF support

Cross-Platform Support

Feature Linux Windows
File search โœ… โœ…
Real-time file watcher โœ… inotify โœ… ReadDirectoryChanges
App discovery โœ… .desktop โœ… Start Menu .lnk
System shortcut โœ… GNOME / KDE / i3 / Sway / Hyprland / XFCE โœ… Ctrl+Alt+F
Shell commands โœ… sh -c โœ… cmd /C
PDF chat โœ… โœ…
Settings path ~/.config/trace/ %APPDATA%\trace\

Getting Started

Prerequisites

  • Rust โ‰ฅ 1.70 โ†’ rustup.rs
  • Node.js โ‰ฅ 18 โ†’ nodejs.org
  • Linux system libraries:
    # Debian / Ubuntu
    sudo apt install libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
    
    # Arch Linux
    sudo pacman -S webkit2gtk-4.1 libappindicator-gtk3 librsvg

Run in Development

git clone https://github.com/aarav0180/Trace.git
cd Trace
npm install
npm run tauri dev

Build for Production

npm run tauri build
# โ†’ src-tauri/target/release/bundle/

Configuration

Settings are stored at ~/.config/trace/settings.json (Linux) or %APPDATA%\trace\settings.json (Windows). Everything is also configurable from the โš™ icon inside the app.

Setting Default Description
active_provider "openai" AI provider (openai, anthropic, google, huggingface, openrouter)
active_model "gpt-4o-mini" Model identifier
openai_key "" OpenAI API key
anthropic_key "" Anthropic API key
google_key "" Google AI (Gemini) API key
huggingface_key "" HuggingFace Inference API key
openrouter_key "" OpenRouter API key
max_results 20 Max search results shown

Usage

Chat with a File

  1. Search for any file (text, code, Markdown, PDFโ€ฆ)
  2. Select it with โ†‘ / โ†“
  3. Press Tab
  4. Type your question and press Enter
  5. Press Escape to return to search

Natural Language Shell

  1. Type > โ†’ describe what you want: > find all files larger than 100MB
  2. Review the generated command
  3. Press โ–ถ Run or โœ• Cancel

Inline Math

Just type an expression: sqrt(2) * pi โ€” the result appears instantly below the input.


Roadmap

  • Instant file search + fuzzy matching
  • Universal app launcher (Linux + Windows)
  • Noir UI โ€” frameless, always-on-top
  • System-wide hotkey registration (GNOME / KDE / i3 / Sway / Hyprland / XFCE / Windows)
  • NLP โ†’ Shell translation with safety guards
  • Document Chat (RAG-Lite) โ€” text, code, Markdown
  • Inline math evaluator + graphing
  • BYOK: OpenAI, Anthropic, Google, HuggingFace, OpenRouter
  • PDF support in Document Chat
  • Screenshot โ†’ AI context query
  • Smart clipboard history
  • trace:// deep-link protocol
  • Shift-preview (peek file contents without entering chat)

Development

Useful Commands

# Type-check frontend only
npx tsc --noEmit

# Build Rust backend only
cargo build --manifest-path src-tauri/Cargo.toml

# Full dev mode (hot-reload)
npm run tauri dev

# Production build
npm run tauri build

Recommended VS Code Extensions


License

MIT โ€” see LICENSE.



Trace โ€” Search instantly. Command naturally. Think faster.


GitHub

About

Trace is a frameless desktop launcher that lets you instantly search files, evaluate math, and turn natural language into shell commands.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors