Skip to content
c0ldsheepPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Baton

Meta splits it. Three AIs build it at once.

Baton is a Mac menu bar app. You type one idea. Meta's Muse Spark (through the Meta Model API) splits the work at the start and hands each part to the AI that is best at it:

AI Gets the work it's best at
Claude the main code: app structure, UI, careful multi-file features
Codex terminal work: setup, packages, scripts, tests, running and fixing
Gemini live web research, facts, docs and written content

Then all three run at the same time in one project folder, each on the person's own subscription, with no paid API keys for Claude, ChatGPT or Gemini. If an AI's tool isn't installed or its plan runs out, its card still holds a ready-made prompt: drag it into the Claude, ChatGPT or Gemini app, or press Copy & open.

Built for the Meta Global AI Developer Hackathon (theme: Build for Your World).

Two ways to run Meta's model: Muse Spark on the Meta Model API (default), or Meta's open-weights Llama 3.2 fully offline on your Mac through Ollama (Settings → "Use local Llama"). The demo video uses the local Llama path: my Meta Model API account lists the models but can't make requests until a card hold succeeds.

The problem

People who build with AI hit the same wall: one AI's usage limit ends halfway through the job. Switching to another AI loses the plan, and the second AI breaks what the first one made. Meanwhile, each AI is clearly better at some kinds of work than others, and most of a premium plan gets spent on work another AI does just as well.

How Meta's model is used

Muse Spark is the brain. It does three real jobs:

  1. Writes the contract first. The stack, the exact folder layout, every shared name (files, ids, functions, data shapes) and style rules. That is what lets three AIs work at the same time without seeing each other's work.
  2. Splits the work and assigns owners. Each AI gets its own files and folders. No two AIs own the same path, which Baton also checks in code. Meta writes each AI a complete, ready-to-paste prompt and says why that AI got the job.
  3. Checks the work. "Check the work" sends Muse Spark the contract, each AI's report (.baton/<ai>.md) and the file list. It answers with what's done, what doesn't fit together, and the single best next prompt.

Baton wraps every prompt with rules it adds itself (owned paths, hands off others' files, write a report), so they can't be left out.

How it works

idea ─▶ Muse Spark (Meta Model API) ─▶ plan: contract + 3 jobs + owned paths
                                         │
             ┌───────────────────────────┼───────────────────────────┐
             ▼                           ▼                           ▼
     claude -p (Claude Code)     codex exec (Codex CLI)       gemini -p (Gemini CLI)
     edits only its files        edits only its files         edits only its files
             └──────────── all at once, same folder ─────────────────┘
                                         │
                       .baton/claude.md, codex.md, gemini.md
                                         ▼
                      Muse Spark "Check the work": done / problems / next
  • Each AI runs through its company's official command-line tool, signed in with the person's own plan. Baton never sees or stores those logins and never drives the chat websites.
  • Edits are limited: Claude Code runs with acceptEdits and a short list of allowed commands, Codex runs in its workspace-write sandbox, and Gemini CLI uses auto_edit. None of the runs uses a skip-all-permissions mode.
  • Progress is read live from each tool's JSON output, so every card shows what that AI is doing right now ("Writing gallery.js", "Running npm test", "Searching the web: …").
  • The split is saved into the project as .baton/PLAN.md, plus each AI's full prompt and log.

Privacy

Everything stays on your Mac. The project folder is never uploaded to any Baton server (there isn't one). The Meta API key is kept in the macOS Keychain and is only sent to the Meta server set in Settings. Meta's open-weights models also work fully offline: set the server to http://localhost:11434/v1 (Ollama).

Install and run

Requirements: macOS 14 or later, Swift (Xcode Command Line Tools), a Meta Model API key, and at least one of:

# Claude Code (sign in with your Claude plan)
curl -fsSL https://claude.ai/install.sh | bash && claude
# Codex CLI (sign in with ChatGPT)
npm i -g @openai/codex && codex login
# Gemini CLI (sign in with Google)
npm i -g @google/gemini-cli && gemini

Build and open:

cd mac
./scripts/test.sh                 # 19 tests
./scripts/build-app.sh --install  # builds Baton.app into ~/Applications and opens it

Click the branching icon in the menu bar → gear → paste your Meta API key → Test connection. Then type an idea, press Split it with Meta (⌘↩), and Run all at once. Pin the panel to keep it open while you drag prompts into other apps.

Checks from the command line:

Baton.app/Contents/MacOS/Baton --models                       # which Muse Spark model it will use
Baton.app/Contents/MacOS/Baton --plan "idea" /path/to/folder  # print Meta's plan and the three prompts
Baton.app/Contents/MacOS/Baton --try codex /path "prompt"     # run one AI exactly as the app does

Code

  • mac/Sources/BatonKit: no UI, fully tested. Meta.swift (Meta Model API client, OpenAI-compatible chat completions), Planner.swift (what Muse Spark is asked, prompt wrapping, project files), Plan.swift (reads and validates Meta's plan: JSON repair, path cleaning, ownership overlaps), Runner.swift (runs the three CLIs in parallel and reads their live JSON events), Agent.swift (each AI's strengths, commands, limit detection).
  • mac/Sources/Baton: the SwiftUI menu bar panel: idea box, branching plan view with live cards, drag and drop, Settings.

What's next

  • Live limit meters per AI (reading each tool's own usage numbers), and re-routing a job to the next-best AI when one runs out.
  • Muse Spark vision: screenshot the finished app and let Meta check it against the idea.
  • More agents (any CLI that runs headless).

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages