Skip to content

vava-nessa/AISnitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

100 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AISnitch

See everything your AI coding tools are doing β€” in one place, in real time.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                                 β”‚
β”‚   Claude Code    OpenCode    Gemini CLI    Aider    Codex       β”‚
β”‚       β”‚              β”‚           β”‚          β”‚         β”‚        β”‚
β”‚       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚                             β”‚                                   β”‚
β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”                          β”‚
β”‚                    β”‚   AISnitch      β”‚                          β”‚
β”‚                    β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚                          β”‚
β”‚                    β”‚   β”‚  TUI    β”‚   β”‚  ← Dashboard (real-time) β”‚
β”‚                    β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚                          β”‚
β”‚                    β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚                          β”‚
β”‚                    β”‚   β”‚ Webhook β”‚   β”‚  ← Build anything        β”‚
β”‚                    β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚                          β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                          β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

One command. Every agent. Every project. Live.


⭐ Why AISnitch?

You have multiple AI coding assistants running at the same time:

πŸ”΅ Claude Code   β†’ working on your main project
🟑 OpenCode      β†’ reviewing a PR
🟣 Codex         β†’ writing tests
🟒 Aider         β†’ refactoring legacy code

The problem? You have 4 terminals open, tabbing between them, missing things, context-switching like crazy.

The solution?

aisnitch start

Now you see everything in one dashboard:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  πŸ€– AISnitch                              [q] quit  [?] help β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  πŸ”΅ Claude Code  ● thinking...      β”‚ πŸ“ src/app.ts           β”‚
β”‚  🟑 OpenCode     βœ“ idle            β”‚ πŸ“ /projects/api        β”‚
β”‚  🟣 Codex        ⏳ coding...      β”‚ πŸ“„ tests/users.test.ts  β”‚
β”‚  🟒 Aider        ● task: "cleanup" β”‚ πŸ“ /legacy/db          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Events (42)                     [Space] freeze  [c] clear   β”‚
β”‚  ──────────────────────────────────────────────────────────── β”‚
β”‚  πŸ”΅ 14:30:01  agent.thinking   "Implementing user auth..."   β”‚
β”‚  πŸ”΅ 14:29:58  agent.coding      Edit β†’ src/auth/login.ts      β”‚
β”‚  🟑 14:29:55  agent.idle        waiting for prompt...          β”‚
β”‚  🟣 14:29:52  tool_call         Bash β†’ git status             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start (30 seconds)

1. Install

# npm (recommended)
npm i -g aisnitch

# or Homebrew
brew install aisnitch

2. Run

aisnitch

That's it! aisnitch (no argument) starts the daemon, launches the dashboard server in the background, and opens the web dashboard in your browser.

Want the in-terminal TUI instead?

aisnitch start

No AI tools yet? Try the demo mode:

aisnitch start --mock all

3. Connect your tools

# Pick your tools
aisnitch setup claude-code   # hooks into Claude Code
aisnitch setup opencode      # hooks into OpenCode
aisnitch setup aider         # hooks into Aider

# Verify everything
aisnitch adapters

🎯 Common Use Cases

"I want to see all my AI agents in real time"

aisnitch start

Opens the TUI dashboard. Live events stream in as your tools work.

"I want to build something on top of AISnitch"

# Start the daemon (runs in background)
aisnitch start --daemon

# Now connect your app to ws://127.0.0.1:4820
import { createAISnitchClient } from '@aisnitch/client';
import WebSocket from 'ws';

const client = createAISnitchClient({ WebSocketClass: WebSocket as any });

client.on('event', (e) => {
  console.log(`${e['aisnitch.tool']}: ${e.type}`);
});

"I want a fancy web dashboard on another computer"

aisnitch fs --daemon
# β†’ Opens http://127.0.0.1:5174 in browser
# β†’ Connects to daemon automatically

"I want sound notifications when agents finish"

const client = createAISnitchClient();

client.on('event', (e) => {
  if (e.type === 'task.complete') playSound('success.mp3');
  if (e.type === 'agent.error')  playSound('error.mp3');
  if (e.type === 'agent.asking_user') playSound('ping.mp3');
});

πŸ“¦ Installation Options

npm (Recommended)

npm i -g aisnitch

Homebrew (macOS/Linux)

brew install aisnitch

From Source

git clone https://github.com/vava-nessa/AISnitch.git
cd AISnitch
pnpm install && pnpm build
node dist/cli/index.js start

Upgrade

# npm
npm update -g aisnitch

# Homebrew
brew upgrade aisnitch

πŸ› οΈ Supported Tools

Tool Status Setup Command
Claude Code βœ… Active aisnitch setup claude-code
OpenCode βœ… Active aisnitch setup opencode
Gemini CLI βœ… Active aisnitch setup gemini-cli
Aider βœ… Active aisnitch setup aider
Codex βœ… Active aisnitch setup codex
Goose βœ… Active aisnitch setup goose
Copilot CLI βœ… Active aisnitch setup copilot-cli
OpenClaw βœ… Active aisnitch setup openclaw
Cursor βœ… Active aisnitch setup cursor
Zed βœ… Active aisnitch setup zed
Devin βœ… Active aisnitch setup devin
Kilo βœ… Active aisnitch setup kilo
Pi (zealncer) βœ… Active aisnitch setup pi
Any CLI πŸ”§ Fallback aisnitch wrap <command>

πŸ’‘ Run aisnitch adapters to see which tools are currently connected.


πŸ”Œ Web Dashboard

Open a beautiful real-time dashboard in your browser:

aisnitch                       # Default: start daemon + dashboard + open browser
aisnitch fs                    # Same as `aisnitch`
aisnitch fs --dashboard-port 8080  # Custom port
aisnitch fs --no-browser       # Just start the server

From another computer? Make sure the host machine has the daemon running:

aisnitch start --daemon        # Start on host machine first
aisnitch fs                    # Connect from any browser

πŸ“‘ WebSocket API (Build Anything)

AISnitch exposes a WebSocket stream at ws://127.0.0.1:4820. Connect with the SDK:

Install the SDK

pnpm add @aisnitch/client zod

Basic Usage

import { createAISnitchClient, describeEvent } from '@aisnitch/client';
import WebSocket from 'ws';

const client = createAISnitchClient({ WebSocketClass: WebSocket as any });

// Get notified when connected
client.on('connected', (info) => {
  console.log(`Connected to AISnitch ${info.version}`);
  console.log(`Tools: ${info.activeTools.join(', ')}`);
});

// Receive all events
client.on('event', (event) => {
  console.log(describeEvent(event));
  // β†’ "claude-code is thinking... β†’ user auth module"
  // β†’ "opencode is coding... β†’ src/api/users.ts"
});

// Track sessions
setInterval(() => {
  const sessions = client.sessions?.getAll() ?? [];
  console.log(`${sessions.length} active sessions`);
}, 5000);

Sound Notifications

import { createAISnitchClient } from '@aisnitch/client';

const SOUNDS = {
  'session.start':     'sounds/boot.mp3',
  'task.complete':     'sounds/done.mp3',
  'agent.asking_user': 'sounds/ping.mp3',
  'agent.error':       'sounds/error.mp3',
  'agent.coding':      'sounds/keyboard.mp3',
};

const client = createAISnitchClient();
client.on('event', (e) => {
  if (SOUNDS[e.type]) playSound(SOUNDS[e.type]);
});

Slack/Discord Bot

import { createAISnitchClient, formatStatusLine } from '@aisnitch/client';

const client = createAISnitchClient();

client.on('event', (e) => {
  // Notify on important events
  if (e.type === 'agent.error') {
    postToSlack(`πŸ”΄ Error: ${formatStatusLine(e)}`);
  }
  if (e.type === 'task.complete') {
    postToDiscord(`βœ… Done: ${formatStatusLine(e)}`);
  }
});

Direct WebSocket (No SDK)

# See raw events in one line
node -e "
  const WebSocket = require('ws');
  const ws = new WebSocket('ws://127.0.0.1:4820');
  ws.on('message', m => console.log(JSON.parse(m.toString()).type));
"

⌨️ CLI Reference

Dashboard & TUI

aisnitch start                     # Open TUI dashboard
aisnitch start --tool claude-code  # Filter by tool
aisnitch start --type agent.coding # Filter by event type
aisnitch start --view full-data    # Show full JSON

Web Dashboard (Default)

aisnitch                           # Default: daemon + dashboard + browser
aisnitch fs                        # Explicit form (same effect)
aisnitch fs --dashboard-port 8080  # Custom port
aisnitch fs --no-browser           # Server only

Daemon Management

aisnitch start --daemon            # Start daemon in background
aisnitch status                    # Check daemon status
aisnitch attach                    # Attach TUI to running daemon
aisnitch stop                      # Stop daemon

Tool Setup

aisnitch setup claude-code         # Configure tool
aisnitch setup opencode
aisnitch setup aider
aisnitch setup claude-code --revert  # Remove configuration

Utilities

aisnitch adapters                  # Show enabled tools
aisnitch logger                    # Stream raw events (no TUI)
aisnitch mock claude-code          # Simulate events
aisnitch mock all --speed 2        # Demo mode (2x speed)
aisnitch wrap aider --model sonnet  # Wrap any CLI
aisnitch setup claude-code          # Run setup wizard
aisnitch self-update               # Update AISnitch

πŸ–₯️ TUI Controls

Key Action
q / Ctrl+C Quit
d Toggle daemon
r Refresh
v Toggle JSON inspector
f Filter by tool
t Filter by event type
/ Search
Esc Clear filters
Space Freeze/resume
c Clear buffer
? Help
Tab Switch panel
↑↓ / jk Navigate
[] Page inspector

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     External AI Tools                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚ Claude   β”‚ β”‚ OpenCode β”‚ β”‚ Gemini   β”‚ β”‚ Aider    β”‚  ...     β”‚
β”‚  β”‚  Code    β”‚ β”‚          β”‚ β”‚  CLI     β”‚ β”‚          β”‚          β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜          β”‚
β”‚       β”‚            β”‚            β”‚            β”‚                  β”‚
β”‚       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β”‚                        β”‚                                        β”‚
β”‚                        β–Ό                                        β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                              β”‚
β”‚              β”‚   HTTP Receiver   β”‚                              β”‚
β”‚              β”‚   :4821           β”‚                              β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                              β”‚
β”‚                        β”‚                                        β”‚
β”‚                        β–Ό                                        β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                              β”‚
β”‚              β”‚   EventBus        β”‚                              β”‚
β”‚              β”‚   (validation +  β”‚                              β”‚
β”‚              β”‚    normalization) β”‚                              β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                              β”‚
β”‚                        β”‚                                        β”‚
β”‚          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                          β”‚
β”‚          β–Ό             β”‚             β–Ό                          β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚   β”‚  WebSocket  β”‚      β”‚      β”‚    TUI      β”‚                  β”‚
β”‚   β”‚  :4820      β”‚      β”‚      β”‚  Dashboard  β”‚                  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜      β”‚      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β”‚          β”‚              β”‚                                       β”‚
β”‚          β–Ό              β–Ό                                       β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚   β”‚   Client    β”‚ β”‚   Sound     β”‚ β”‚   Mascot    β”‚              β”‚
β”‚   β”‚  Dashboard  β”‚ β”‚  Engine     β”‚ β”‚  Companion  β”‚              β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Points

  • Zero storage: Events live in memory only, never written to disk
  • Privacy-first: No data leaves your machine
  • Multi-instance tracking: Handles multiple sessions of the same tool
  • Auto-reconnect: SDK handles reconnection automatically
  • Zod validation: All events validated before processing

πŸ“Š Event Model

Every event follows CloudEvents v1.0 format:

{
  "specversion": "1.0",
  "id": "019713a4-beef-7000-8000-deadbeef0042",
  "source": "aisnitch://claude-code/myproject",
  "type": "agent.coding",
  "time": "2026-03-28T14:30:00.000Z",

  "aisnitch.tool": "claude-code",
  "aisnitch.sessionid": "claude-code:myproject:p12345",
  "aisnitch.seqnum": 42,

  "data": {
    "state": "agent.coding",
    "project": "myproject",
    "projectPath": "/home/user/myproject",
    "activeFile": "src/index.ts",
    "toolName": "Edit",
    "model": "claude-sonnet-4-20250514",
    "tokensUsed": 1500,
    "inputTokens": 450,
    "outputTokens": 1050,
    "terminal": "iTerm2",
    "cwd": "/home/user/myproject"
  }
}

Event Types

Type Description
session.start Tool started
session.end Tool closed
task.start User submitted prompt
task.complete Task finished
agent.thinking Model reasoning
agent.streaming Output being generated
agent.coding Editing files
agent.tool_call Using Bash, Grep, etc.
agent.asking_user Waiting for input
agent.idle No activity (2+ min)
agent.error Error occurred
agent.compact Context cleanup

πŸ“ File Structure

~/.aisnitch/
β”œβ”€β”€ config.json          # Your configuration
β”œβ”€β”€ aisnitch.pid         # Daemon PID
β”œβ”€β”€ daemon-state.json    # Connection info
β”œβ”€β”€ daemon.log          # Daemon logs (5MB max)
└── aisnitch.sock       # Unix socket (IPC)

Ports

Port Purpose
4820 WebSocket (connect here)
4821 HTTP webhook receiver + health

Health Check

curl http://127.0.0.1:4821/health

πŸ§ͺ Development

# Setup
git clone https://github.com/vava-nessa/AISnitch.git
cd AISnitch
pnpm install

# Build
pnpm build              # ESM + CJS + TypeScript types

# Quality
pnpm lint               # ESLint
pnpm typecheck          # TypeScript
pnpm test               # 300+ tests
pnpm test:coverage      # Coverage report

Project Structure

aisnitch/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ adapters/       # 13 tool adapters
β”‚   β”œβ”€β”€ cli/           # Commander CLI
β”‚   β”œβ”€β”€ core/          # Events, pipeline, config
β”‚   └── tui/           # Ink terminal dashboard
β”œβ”€β”€ packages/
β”‚   └── client/        # @aisnitch/client SDK
β”œβ”€β”€ docs/              # Technical docs
└── tasks/             # Task board

πŸ“š Resources


❓ FAQ

Q: Does AISnitch store my data?

No. Events transit through memory only and are never written to disk. Nothing leaves your machine.

Q: Which tools are supported?

13 tools out of the box: Claude Code, OpenCode, Gemini CLI, Aider, Codex, Goose, Copilot CLI, OpenClaw, Cursor, Zed, Devin, Kilo, Pi. Plus any CLI via the wrap command.

Q: Can I build my own dashboard?

Yes! Use the @aisnitch/client SDK or connect directly to ws://127.0.0.1:4820.

Q: How do I update AISnitch?

npm update -g aisnitch   # npm
brew upgrade aisnitch    # Homebrew

Q: Why "Snitch"?

Because it snitches on your AI agents β€” tells you what they're doing! 🎭


πŸ“œ License

Apache-2.0 β€” Vanessa Depraute

CI npm Node >=20

About

AI Snitch is a cross-platform universal AI CLI activity bridge.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages