Chrome extension for real-time token tracking in Claude conversations.
- Real-time token counting for prompts and responses
- Input/output token breakdown
- Total token calculation with configurable buffer (15%)
- Live timestamp updates
- Framework: WXT (Vite-based)
- UI: React 18 with Headless UI
- Styling: UnoCSS with Lucide icons
- State: Zustand
- Testing: Vitest + Playwright
- Linting: ESLint + Prettier
- Git Hooks: Husky + lint-staged + commitlint
- Component Dev: Ladle
# Install dependencies
pnpm install
# Start development mode (with hot reload)
pnpm dev
# Run tests
pnpm test
# Run E2E tests (requires build first)
pnpm build
pnpm e2e
# Component development
pnpm ladle
# Lint and format
pnpm lint
pnpm format# Build for production
pnpm build
# Create distributable zip
pnpm zipThe built extension will be in .output/chrome-mv3/.
- Run
pnpm build - Open Chrome and go to
chrome://extensions - Enable "Developer mode"
- Click "Load unpacked"
- Select the
.output/chrome-mv3directory
pnpm dev- Start development with hot reloadpnpm build- Build for productionpnpm test- Run unit testspnpm test:watch- Run tests in watch modepnpm test:ui- Open test UIpnpm e2e- Run E2E testspnpm e2e:ui- Open Playwright test UIpnpm ladle- Start component development serverpnpm lint- Run ESLintpnpm format- Format code with Prettier
.
├── entrypoints/ # Extension entry points
│ ├── background.ts # Service worker
│ ├── popup/ # Popup UI
│ └── content.ts # Content scripts
├── components/ # React components
├── tests/ # Unit tests
├── e2e/ # E2E tests
├── wxt.config.ts # WXT configuration
├── uno.config.ts # UnoCSS configuration
└── tsconfig.json # TypeScript configuration
MIT
