claudeers.

🔓 unclaimed — this page was auto-generated from GitHub. Are you the creator?

Claim this page →
// Developer Tools

Lea

Autonomous Claude Code task runner — a menu-bar app that tracks your usage and runs a to-do queue headlessly the moment your limit resets. macOS / Windows /…

// Developer Tools[ cli ][ api ][ desktop ][ claude ]#claude#ai-agent#anthropic#ccusage#claude-code#developer-tools#electron#devtoolsMIT$open-sourceupdated 12 days ago
Actively maintained
98/100
last commit 12 days ago
last release none
releases 0
open issues 0
// install
git clone https://github.com/bobby33400/Lea

Lea

Your autonomous Claude assistant that works while you sleep.

Lea is a cross-platform menu-bar / system-tray app that tracks your Claude usage and runs a to-do queue automatically — the moment your limit resets, it picks up the next task and runs Claude headlessly. Queue work before bed, wake up to it done.

        ┌──────────────┐   reads    ┌───────────────────────────┐
        │  ccusage     │◀───────────│ ~/.claude/projects/*.jsonl │
        └──────┬───────┘            └───────────────────────────┘
               │ active block: tokens, cost, reset time
        ┌──────▼───────┐   "limit hit → wait for reset, then retry"
        │   Lea Runner │────────────────────────────────────────┐
        └──────┬───────┘                                         │
               │ claude -p   (isolated by the sandbox backend)   │
        ┌──────▼───────┐                                  ┌──────▼──────┐
        │  Your task   │  edits confined to project dir   │  tray icon  │
        │ (a project)  │                                  │  ◷ 2:14 · 3 │
        └──────────────┘                                  └─────────────┘

What it does

  • Tracks tokens & the reset clock from Claude Code's local transcripts (via ccusage) — live token count, cost, burn rate, and a countdown to your next usage-window reset.
  • Queues to-dos for Claude — each is an instruction + a project folder.
  • Runs them autonomously with headless claude -p. If a run hits the usage limit, the task is requeued and retried automatically once the window resets — looping through your list overnight.
  • Isolates every run so an unattended mistake can't wreck your machine.
  • Keeps your computer awake (only while tasks are pending) so overnight runs actually happen.

Requirements

  • macOS, Windows, or Linux, Node 18+.
  • The claude CLI installed and logged in to your Claude subscription. Verify with claude --version and claude -p "hi".
  • (Windows/Linux only, optional) Docker if you want sandboxed runs.

Install & run (from source)

git clone https://github.com/bobby33400/Lea.git
cd Lea
npm install
npm start

A small ring icon appears in your menu bar / tray. On macOS it shows a live countdown like ◷ 2:14 · 3 (2h14m to reset, 3 queued); on Windows/Linux the countdown is in the tooltip. Click it to add and manage tasks.

Prebuilt installers: push a v* tag (or run the build workflow) and GitHub Actions produces a .dmg/.zip (macOS), .exe (Windows), and .AppImage (Linux). Or build locally with npm run dist.

How the autonomous loop works

  1. Queue tasks during the day; leave Lea running.
  2. The runner takes the first queued task and runs it. If you still have capacity, it just runs.
  3. If Claude reports the usage limit is hit, the task goes back to the front of the queue and the runner sleeps until the active block's reset time (plus a small buffer), then retries.
  4. Successful tasks become done; repeated failures become failed (and can be requeued). Every run's full output is saved to a log.

🔒 Safety model (please read)

Autonomous, unattended Claude is powerful and risky — it edits files and runs commands with nobody watching. Lea defaults to the safest option per platform.

PlatformDefault isolationHow it works
macOSSeatbelt sandbox (built-in)Each run is wrapped in sandbox-exec. File writes are confined to the task's project folder; ~/.ssh, ~/.aws, Keychains, etc. are hard-blocked. Reads, network, and commands stay allowed so Claude's tools work. Zero setup.
Windows / LinuxNone by default (Docker opt-in)No lightweight built-in sandbox exists. Lea runs Claude directly and shows a warning, unless you enable the Docker backend.

Whichever platform you're on:

  • --permission-mode bypassPermissions is used so headless runs never block on a prompt — which is exactly why isolation matters.
  • Start with low-stakes tasks and review logs before trusting Lea with anything important. Use per-project git commits so changes are reversible.

This gives real isolation by running Claude in a container with only the project folder mounted writable.

  1. Install Docker Desktop (or Docker Engine) and make sure it's running.
  2. Build the bundled image:
    docker build -t lea-claude:latest docker/
    
  3. Get a subscription token for headless container auth:
    claude setup-token
    
  4. In Lea → ⚙ Settings → Sandbox backend → Docker, paste the token and confirm the image name (lea-claude:latest).

Note: on a Windows host, make sure the drive containing your project is shared with Docker Desktop (Settings → Resources → File sharing).

Configuration (⚙ Settings)

SettingDefaultMeaning
Auto-runonMaster switch for autonomous execution
Sandbox backendautoauto (Seatbelt on macOS, none elsewhere), docker, or none
Keep computer awakeonPrevent sleep while tasks are pending
Quiet hoursoffPause auto-run during a time window
Default modelopusModel when a task doesn't specify one
Task timeout30 minKill a task that runs too long
Max retries2Retries for non-limit errors
Token budget / blockoffPause after N tokens per usage window

Settings, tasks, and logs live in the app's data folder (Settings → Open data folder): ~/Library/Application Support/Lea (macOS), %APPDATA%\Lea (Windows), ~/.config/Lea (Linux).

Project layout

src/
  main.js        Electron entry: tray, window, IPC, keep-awake, live title
  preload.js     contextBridge API for the renderer
  config.js      settings + cross-platform claude/ccusage/PATH resolution
  usage.js       polls ccusage → active usage-block snapshot
  store.js       the to-do queue (tasks.json)
  runner.js      autonomous orchestrator (run → classify → wait/retry)
  sandbox.js     isolation backends + headless claude argv   (pure, tested)
  classify.js    ccusage parsing + run-result classification (pure, tested)
  icon.js        zero-dependency tray + app icon generator
  spawnutil.js   cross-platform buffered spawn (cross-spawn)
  renderer/      the tray UI (index.html, style.css, app.js)
docker/Dockerfile  image for the Docker sandbox backend
scripts/selftest.js  fast offline logic tests (no tokens spent)

Run the logic tests any time (no tokens spent):

npm run selftest && npm run check

Notes & limitations

  • Reset detection uses the rolling usage block reported by ccusage. Claude also enforces weekly limits; if one is hit, a run may fail in a way that isn't a normal short-window reset — check the task log.
  • Lea uses your own Claude account and respects your own limits.
  • Contributions welcome — see CONTRIBUTING.md.

License

MIT © Lea contributors. Not affiliated with Anthropic. “Claude” is a trademark of Anthropic.

// compatibility

Platformscli, api, desktop
Operating systems
AI compatibilityclaude
LicenseMIT
Pricingopen-source
LanguageJavaScript

// faq

What is Lea?

Autonomous Claude Code task runner — a menu-bar app that tracks your usage and runs a to-do queue headlessly the moment your limit resets. macOS / Windows / Linux. MIT.. It is open-source on GitHub.

Is Lea free to use?

Lea is open-source under the MIT license, so it is free to use.

What category does Lea belong to?

Lea is listed under automation in the Claudeers registry of Claude-compatible tools.

0 views
20 stars
unclaimed
updated 12 days ago

// embed badge

Lea on Claudeers
[![Claudeers](https://claudeers.com/api/badge/lea.svg)](https://claudeers.com/lea)

// retro hit counter

Lea hit counter
[![Hits](https://claudeers.com/api/counter/lea.svg)](https://claudeers.com/lea)

// reviews

// guestbook

0/500

// related in Developer Tools

🔓

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Curs…

// devtoolsaffaan-m/JavaScript225,699MIT[ claude ]
🔓

Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA

// devtoolsgarrytan/TypeScript119,234MIT[ claude ]
🔓

🙌 OpenHands: AI-Driven Development

// devtoolsOpenHands/Python79,324NOASSERTION[ claude ]
🔓

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

// devtoolsDietrichGebert/JavaScript73,042MIT[ claude ]
→ see how Lea connects across the ecosystem