Skip to content

patniko/copilot-tokens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

79 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Copilot Tokens logo

Copilot Tokens

A gamified desktop client for GitHub Copilot

Turn every AI interaction into a slot-machine experience β€” track tokens, hit milestones, level up, and make coding with Copilot feel like winning.

Electron React TypeScript Copilot SDK


What is this?

Copilot Tokens wraps the full power of GitHub Copilot's agentic coding assistant inside a desktop app that makes every session feel alive. It's not a toy β€” underneath the animations is a complete multi-panel AI coding environment with tool permissions, diff viewing, git integration, and session replay. The gamification layer sits on top, giving you real-time feedback on how you and the AI are working together.

See it in action

Code Review

Watch the agent review code changes, provide feedback, and the full tool execution pipeline in action.

review-720.mov

YOLO Mode

One click to skip all permission prompts. The satisfying toggle, the flash β€” and then the agent runs free.

yolo-720.mov

Achievements & Leveling

Hit milestones, earn badges, and level up across 5 categories. Every session adds to your progress.

achievements-720.mov

Settings & SDK Features

Toggle SDK capabilities on and off β€” reasoning chains, custom tools, infinite sessions, hooks, and more. All configurable from the Settings panel.

settings-720.mov

The Million Token Club

What happens when you hit 1,000,000 tokens? Find out.

1million-720.mov

✨ Features

πŸ€– Full Copilot Agent

  • Agentic coding powered by the @github/copilot-sdk β€” file edits, shell commands, web fetches, and more
  • Multi-panel chat with draggable split panes for parallel conversations
  • Tool permission system with YOLO mode for the brave
  • Model selector with live context window tracking
  • MCP server support for extensible tool integrations
  • Custom agents β€” pick from presets or create your own personas with tailored system prompts

🧠 SDK Feature Showcase

Every feature toggleable from Settings β€” turn things on and off to match your preferences:

  • Reasoning chains β€” stream the model's chain-of-thought in a collapsible thinking panel with effort selector (low β†’ max)
  • Ask user flow β€” the agent asks clarifying questions mid-task with interactive choice buttons
  • Native tools β€” desktop notifications, clipboard read/write, system info, app launching, sound playback via defineTool()
  • Infinite sessions β€” conversations never die; auto-compaction keeps the context window managed
  • Session hooks β€” pre/post tool hooks, prompt validation, error recovery, session summaries
  • Session events β€” error banners, model change notifications, truncation warnings, shutdown report cards

🎰 Live Token Dashboard

  • Real-time odometer counters for input tokens, output tokens, and totals
  • Context window progress bar showing actual session utilization with compaction awareness
  • Git stats β€” files changed, lines added/removed β€” polled live from your working directory

πŸ† Leveling & Milestones

  • 100 levels across 5 categories: tokens, messages, tool calls, files, and lines changed
  • 7 tiers from Novice to Legendary β€” all category bars must fill to level up
  • Milestone celebrations at token/file/line thresholds with sparkle, confetti, and jackpot effects
  • Level-up overlays with animated fanfare

🎨 Themes & Customization

  • Neon Arcade β€” dark GitHub palette with neon glows and particles
  • Retro Casino β€” warm reds and golds with a vintage feel
  • Minimal β€” clean and distraction-free
  • Create your own themes, milestone packs, and sound packs in the Pack Studio

πŸ”Š Procedural Audio

Every sound is synthesized at runtime β€” no audio files. Lever pulls, token ticks, milestone chimes, jackpot fanfares, and celebration sequences are all generated from oscillators and envelopes using the Web Audio API.

πŸ“Ό Session Recording & Replay

  • Every session is automatically recorded β€” messages, tool calls, stats, and timing
  • Browse past sessions or resume SDK sessions with full conversation history
  • Full replay with timeline scrubbing

πŸ”’ Permission System

  • Reads under your working directory auto-approve
  • Writes, shell commands, and URL fetches prompt for approval
  • "Always allow" rules persist across sessions
  • YOLO mode bypasses all dialogs (with a satisfying toggle sound)

Architecture

src/
β”œβ”€β”€ main/              Electron main process
β”‚   β”œβ”€β”€ copilot-service    SDK wrapper β€” sessions, streaming, tools, hooks, agents
β”‚   β”œβ”€β”€ permission-service Tool permission rules & evaluation
β”‚   β”œβ”€β”€ auth-service       GitHub OAuth Device Flow + gh CLI detection
β”‚   β”œβ”€β”€ stats-service      Lifetime stats, streaks, level progress
β”‚   └── pack-service       Custom milestone/sound/theme pack CRUD
β”œβ”€β”€ preload/           Context-isolated bridge
β”‚   └── preload            13 typed APIs: copilot, stats, git, auth, model,
β”‚                          settings, features, sessions, agents, pack, mcp, cwd, util
└── renderer/          React 19 + Tailwind 4 + Motion
    β”œβ”€β”€ App                Root β€” panels, modals, state orchestration
    β”œβ”€β”€ components/
    β”‚   β”œβ”€β”€ ReelArea           Animated chat feed (30+ event types)
    β”‚   β”œβ”€β”€ TokenDashboard     Live counters & context progress
    β”‚   β”œβ”€β”€ SplitLayout        Multi-panel with draggable dividers
    β”‚   β”œβ”€β”€ PermissionDialog   Tool approval UI
    β”‚   β”œβ”€β”€ Settings           General, SDK Features, System Prompt tabs
    β”‚   β”œβ”€β”€ AgentPicker        Custom agent personas & presets
    β”‚   β”œβ”€β”€ HooksIndicator     Hook pipeline activity display
    β”‚   β”œβ”€β”€ PackStudio         Theme/milestone/sound editor
    β”‚   β”œβ”€β”€ SessionBrowser     Past sessions + SDK session resume
    β”‚   β”œβ”€β”€ DiffViewer         Unified diff rendering
    β”‚   └── tiles/             16 per-tool UI components
    β”‚       β”œβ”€β”€ ReasoningTile      Chain-of-thought streaming
    β”‚       β”œβ”€β”€ AskUserTile        Interactive choice buttons
    β”‚       β”œβ”€β”€ SessionEventTiles  Error/compaction/shutdown banners
    β”‚       β”œβ”€β”€ NativeToolTiles    Notification/clipboard/system info
    β”‚       β”œβ”€β”€ SqlTile, MemoryTile, SubagentTile, SkillTile
    β”‚       └── BashTile, FileEditTile, FileReadTile, WebFetchTile...
    └── lib/
        β”œβ”€β”€ level-system       100-level polynomial progression
        β”œβ”€β”€ milestones         Threshold-based achievement triggers
        β”œβ”€β”€ sound-manager      Web Audio procedural synthesis
        β”œβ”€β”€ themes             CSS variable-driven theming
        β”œβ”€β”€ tile-registry      Plugin-style tile registration
        └── party-bus          Cross-component event pub/sub

Design Principles

  • Three-process Electron architecture β€” main (Node.js), preload (context bridge), renderer (browser). All IPC is typed end-to-end.
  • No external audio files β€” all sounds are procedurally generated with the Web Audio API.
  • CSS variable theming β€” themes swap a set of CSS custom properties; components reference variables, never hard-coded colors.
  • Event-driven gamification β€” a lightweight pub/sub bus (PartyBus) decouples game events from UI, so milestones, level-ups, and celebrations trigger without tight coupling.
  • Everything is toggleable β€” every SDK feature (reasoning, tools, hooks, agents, sessions) can be turned on/off from Settings without restarting the app.
  • Persistent state β€” auth, permissions, stats, packs, feature flags, and level progress all persist via electron-store.

Getting Started

Prerequisites

  • Node.js 20+
  • A GitHub account with Copilot access
  • The GitHub Copilot CLI installed (copilot in your PATH)

Install & Run

npm install
npm run start

On first launch, you'll authenticate via GitHub OAuth Device Flow (or it picks up your existing gh CLI session).

Build for Distribution

# Package the app
npm run package

# Create platform-specific installers
npm run make

Extending

Custom Tool Tiles

  1. Create a component in src/renderer/components/tiles/
  2. Export from the barrel index.ts
  3. Register in src/renderer/lib/register-tiles.ts with the tool name as key

Custom Themes

Create themes in the Pack Studio or register them programmatically. A theme is a set of color tokens and effect flags:

{
  name: 'my-theme',
  label: 'My Theme',
  colors: { bgPrimary, bgSecondary, border, textPrimary, textSecondary,
            accentGold, accentPurple, accentBlue, accentGreen, accentRed },
  effects: { neonGlow: true, particles: false }
}

Custom Milestones

Define milestones that trigger at token, file, or line thresholds with visual effects (sparkle, banner, confetti, jackpot, mega) and sound cues.

Custom Agents

Create agent personas from the Agent Picker or via the agentsAPI. Each agent gets a name, description, system prompt, and optional tool restrictions.

Native Tools via defineTool()

The app registers Electron-native tools that the AI agent can call: desktop notifications, clipboard read/write, system info, URL opening, and sound playback. Add your own in buildNativeTools() in copilot-service.ts.

Tech Stack

Layer Technology
Runtime Electron 40
Bundler Vite 7 + Electron Forge
Frontend React 19, Tailwind CSS 4, Motion
AI @github/copilot-sdk
Persistence electron-store
Language TypeScript (strict)

License

MIT

About

GitHub Copilot SDK taken to the MAXX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages