Skip to content

KennyCandra/CodexBar-linux

Repository files navigation

CodexBar

CodexBar is a lightning-fast, sleek desktop widget built with Tauri, Rust, and React. It gives you instant access to your AI provider usage and rate limits (Cursor, Claude, and Codex/OpenAI) directly from your desktop.

Summon it instantly via a global keyboard shortcut, check your usage, and it vanishes as soon as you focus somewhere else.

CodexBar

🚀 Features

  • Instant Access via Global Hotkey: Summon CodexBar instantly with Ctrl + Shift + Space from anywhere on your system (works exactly like Spotlight or Raycast).
  • Auto-Hide: The widget automatically hides itself whenever it loses focus, keeping your workspace clean.
  • Provider Usage Tracking: Supports fetching live usage limits and data for:
    • Cursor
    • Claude
    • Codex (OpenAI)
  • Modern UI: Crafted with React, Tailwind CSS, and Framer Motion for a premium, glassmorphic dark/light mode experience.
  • Micro-Footprint: Powered by a highly-optimized Rust backend (via Tauri 2.0).

⚠️ Important Note Regarding Authentication

To fetch your account usage limits without requiring you to manually paste API keys or tokens, CodexBar securely reads your authenticated browser cookies locally.

Currently, the Cursor provider exclusively relies on Firefox. The application parses your Firefox profiles.ini to locate your default profile and reads the cookies.sqlite database to authenticate requests to the Cursor backend. Support for other browsers (Chrome, Edge, Brave) is planned for future updates.

🛠️ Tech Stack

  • Backend: Rust, Tauri v2.0
  • Frontend: React, Vite, TypeScript
  • Styling: Tailwind CSS
  • System Integration: tauri-plugin-global-shortcut for instant cross-desktop invocation

⚙️ Development Setup

Prerequisites

You need the standard Tauri prerequisites installed on your machine. On Debian/Ubuntu-based systems (like Pop!_OS):

sudo apt update
sudo apt install libwebkit2gtk-4.1-dev \
    build-essential \
    curl \
    wget \
    file \
    libxdo-dev \
    libssl-dev \
    libayatana-appindicator3-dev \
    librsvg2-dev

You also need Node.js (pnpm recommended) and the Rust toolchain.

Running Locally

  1. Clone the repository and navigate into the project root:
    cd CodexBarLinux
  2. Install frontend dependencies:
    pnpm install
  3. Run the development server (this will start both Vite and the Rust backend):
    cargo tauri dev

Building for Production

To create an optimized, standalone release binary (as well as .deb and .rpm packages):

cargo tauri build

The resulting executable will be placed in src-tauri/target/release/codexbarlinux.

🖥️ Desktop / Window Manager Notes

Originally, CodexBar was designed as a System Tray native application. However, due to Wayland compatibility issues with standard libappindicator implementations on bleeding-edge environments (such as the Pop!_OS COSMIC Desktop), the architecture was pivoted to a "Floating Widget" triggered by a global shortcut. This provides a much faster and more reliable UX across all Linux desktop environments.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors