Skip to content

Repository files navigation

AiScribe logo

Your AI's scribe. Every session, recorded, and ready to train your own model.

npm downloads MIT stars

Terminal preview


AIScribe is a CLI tool that journals every AI coding session into a structured, searchable log. Zero config, works offline. Captures git diffs and full AI conversations. Exports as training data to fine-tune your own LLM. Built-in web UI with PDF export and markdown editor. One command.

Works with pi, Claude Code, Cursor, Codex, Aider, Windsurf, or any AI coding tool.

Part of the aiagentflow suite.

Quick Start

npm install -g aiscribe

# Zero config. Just run.
cd /your/project
aiscribe log

# Capture full AI conversations
aiscribe log -c -n "my-feature"

No onboarding. No API key required. Works out of the box. Add an LLM later for AI summaries with aiscribe setup --reconfigure.

Demos

aiscribe log — Journal a session
aiscribe log demo

aiscribe search — Find sessions by meaning
aiscribe search demo

aiscribe hotspots + history — Codebase analytics
aiscribe hotspots demo

Features

  • Zero config: aiscribe log works immediately, no API key needed
  • Full conversation capture: prompts, responses, tool calls, files read, commands run
  • Chat-style formatting in session logs with role-based sections
  • Built-in web UI (aiscribe server): search, download, copy, PDF export
  • Side-by-side markdown editor with live preview and PDF export (/pdf.html)
  • Session numbering, download .md, download all as tar.gz
  • Semantic search with vector embeddings (API key required)
  • Git remote backup: auto-push sessions to private repo
  • Session watch: auto-detect completed pi and Claude Code sessions
  • 13 commands, all with --json flag and colored output
  • Interactive arrow-key provider selector for configuration

Every session is saved as a markdown file you can export as training data:

.aiscribe/sessions/2026-08-08-stripe-refunds.md
# Session: stripe-refunds

**Date:** 2026-08-08 14:32
**Files changed:** 47
**Lines:** +892 / -156

## Summary
Implemented Stripe refund processing with webhook support...

## Chunks
- Payment API (6 files, Medium risk)
- Database migration (2 files, Low risk)

## Key Decisions
- Used Stripe webhooks instead of polling

## Suspicious Changes
- auth.ts changed but unrelated to refunds

Commands

Command What It Does
aiscribe log Journal current git diff as a session
aiscribe log -c Include AI tool conversation context
aiscribe log -n "name" Custom session name
aiscribe search "query" Semantic or keyword search
aiscribe hotspots Files that change most often
aiscribe history <file> Timeline for a file
aiscribe context Export history for AI agents
aiscribe status Active AI coding sessions
aiscribe watch Auto-detect session completion
aiscribe export --format json Export sessions
aiscribe sync Push to server/DB
aiscribe remote set <url> Configure git backup repo
aiscribe server Start web UI on localhost:3848
aiscribe doctor Validate your setup
aiscribe setup Docker files or reconfigure provider

Providers

AIScribe auto-detects your key type. You can also set it explicitly:

export AISCRIBE_API_KEY=sk-or-...    # OpenRouter (200+ models, recommended)
export AISCRIBE_API_KEY=sk-ant-...   # Anthropic Claude
export AISCRIBE_API_KEY=sk-...       # OpenAI, DeepSeek, or custom
export AISCRIBE_PROVIDER=deepseek
export AISCRIBE_PROVIDER=ollama      # Free & local
Provider Models Cost
OpenRouter Claude, GPT, DeepSeek, Qwen, Gemini + 200 more Pay per use
DeepSeek deepseek-chat $0.14/M tokens
Anthropic Claude Sonnet, Opus Higher quality
OpenAI GPT-4o, GPT-4o-mini Pay per use
Ollama Llama, Qwen, Mistral (local) Free

AI Tool Support

Tool Conversation Git Diff
pi Full (prompts + responses + tool calls) Yes
Claude Code Prompts only* Yes
Codex Prompts only* Yes
Aider Prompts only* Yes

*These tools don't persist assistant responses to disk. See docs/SUPPORTED-TOOLS.md for details.

Web UI

aiscribe server
# Open http://localhost:3848

Dark-themed session book with search, pagination, and full session detail view. Works with or without Docker.

Docker (optional)

aiscribe setup
cd .aiscribe && docker-compose up -d

Spins up PostgreSQL + pgvector for semantic search and session persistence.

How It Works

  1. You finish an AI coding session (any tool)
  2. Run aiscribe log — it reads your git diff
  3. Optionally captures prompt history from Claude Code/Codex/Aider
  4. Sends to your chosen LLM for summarization
  5. Saves a structured markdown file to .aiscribe/sessions/
  6. Updates .aiscribe/index.json for quick lookups

Why

After 2 weeks of AI coding sessions, you have no memory of what changed or why. AIScribe fixes that by creating a permanent, searchable journal of every session.

  • Never lose context: search "payment" to find all sessions that touched payment code
  • Understand decisions: every session captures the "why" not just the "what"
  • Catch surprises: AIScribe flags suspicious changes (files changed outside the main domain)
  • Team visibility: commit .aiscribe/ to your repo and your team sees every AI decision

Roadmap

  • Git diff summarization
  • AI tool context capture (Claude Code, Codex, Aider, pi)
  • Interactive onboarding
  • Web UI (session book)
  • Multi-provider LLM support
  • Docker + PostgreSQL setup
  • Terminal UX with colors
  • Vector embeddings + semantic search
  • Pattern matching across sessions (hotspots, history)
  • Git remote backup (auto-push to private repo)
  • Session watch (auto-detect AI sessions)
  • AI agent context export (llms.txt, context command)
  • JSON and machine-readable export
  • Paid plan integration (Stripe, Pro/Team)
  • Team sharing & workspaces

License

MIT — part of the aiagentflow project.

About

Your AI's scribe. Every session, recorded.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages