Skip to content

MohammadAsadolahi/InkFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

InkFlow Version MIT License VS Code PostgreSQL TypeScript React Docker

πŸ–‹οΈ InkFlow

Real-time, lossless capture & analytics for every GitHub Copilot Chat conversation

Never lose a Copilot conversation again.
InkFlow watches your VS Code Copilot Chat sessions in real time, captures every mutation β€” every keystroke, every AI response, every tool call, every file edit β€” and stores it all in a local PostgreSQL database with a beautiful web dashboard for search, analysis, and audit.


Features β€’ Architecture β€’ Quick Start β€’ Dashboard β€’ Use Cases β€’ Configuration β€’ Tech Stack β€’ Contributing β€’ License


πŸ” The Problem

GitHub Copilot Chat is an incredible productivity tool β€” but conversations are ephemeral. Once you close a session, that valuable context, those debugging breakthroughs, those architectural decisions, the AI's chain-of-thought reasoning... it's all gone.

GitHub's own audit logs only track license and settings changes β€” not the actual conversation content. There is no built-in way to:

  • πŸ”Ž Search across all your past Copilot conversations
  • πŸ“Š Analyze how your team uses AI-assisted coding
  • πŸ›‘οΈ Audit what code AI suggested and what was accepted
  • 🧠 Preserve institutional knowledge from AI interactions
  • πŸ“ˆ Measure developer productivity with AI tools

InkFlow solves all of this.


✨ Features

πŸ”΄ Real-Time Capture

File System Events β†’ Watcher β†’ Parser β†’ Processor β†’ PostgreSQL
         ↓              ↓          ↓           ↓
    fs.watch()      Debounce    JSONL      Materialize
                   (300ms)    Replay    Turns & Parts

Every mutation is captured the instant it happens β€” streaming tokens, thinking blocks, tool invocations, file edits, forks, and deletions.

🧬 Lossless Event Sourcing

  • Immutable raw event log β€” every JSONL mutation is stored as-is, forever
  • Full state reconstruction β€” replay any conversation to any point in time
  • Fork detection β€” automatically identifies when users regenerate or branch off responses
  • Content versioning β€” tracks every edit to every message through message_versions

🌐 Multi-User & Multi-Workspace

  • Shared PostgreSQL instance across your entire team
  • Per-user identity tracking (userId, displayName, machineId)
  • Multi-workspace support β€” monitors all your VS Code projects simultaneously
  • Multi-variant support β€” works with VS Code Stable, Insiders, Exploration, and VSCodium

πŸ›‘οΈ Privacy & Security First

  • Local-first β€” data never leaves your infrastructure
  • Optional content redaction β€” strip sensitive information before storage
  • Configurable retention β€” automatic data expiration policies
  • Soft deletes everywhere β€” nothing is ever truly lost, full audit trail maintained

πŸ“Š Rich Web Dashboard

A full-featured React SPA with real-time analytics, deep search, and session exploration β€” see Dashboard section below.

πŸ’ͺ Battle-Tested Resilience

  • Write-ahead queue (WAL) β€” events persist to disk before DB commit, surviving crashes
  • Crash recovery β€” orphaned events from crashed instances are automatically reprocessed
  • File rewrite detection β€” SHA-256 header hashing detects when VS Code compacts files
  • Deduplication β€” event hash-based uniqueness prevents double processing
  • Rate limiting β€” Windows fs.watch() infinite-loop workaround built in

πŸ—οΈ Architecture

InkFlow consists of three components working together:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           YOUR MACHINE(S)                                   β”‚
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚    VS Code Extension (Watcher)   β”‚    β”‚     Web Dashboard (React)     β”‚  β”‚
β”‚  β”‚                                  β”‚    β”‚                                β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚    β”‚  πŸ“Š Dashboard    πŸ” Search    β”‚  β”‚
β”‚  β”‚  β”‚ Discovery  β”‚β†’ β”‚ fs.watch() β”‚  β”‚    β”‚  πŸ“‹ Sessions     πŸ‘₯ Users     β”‚  β”‚
β”‚  β”‚  β”‚ (Scan VS   β”‚  β”‚ (Monitor   β”‚  β”‚    β”‚  πŸ“„ Turn Detail               β”‚  β”‚
β”‚  β”‚  β”‚  Code dirs)β”‚  β”‚  .jsonl)   β”‚  β”‚    β”‚                                β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚  β”‚                        β”‚         β”‚                    β”‚                   β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”  β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  β”‚    Event Processor         β”‚  β”‚    β”‚     Express API Server         β”‚  β”‚
β”‚  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚  β”‚    β”‚                                β”‚  β”‚
β”‚  β”‚  β”‚  β”‚ β€’ Parse JSONL         β”‚ β”‚  β”‚    β”‚  /api/sessions  /api/turns     β”‚  β”‚
β”‚  β”‚  β”‚  β”‚ β€’ Detect forks        β”‚ β”‚  β”‚    β”‚  /api/stats     /api/search    β”‚  β”‚
β”‚  β”‚  β”‚  β”‚ β€’ Filter noise        β”‚ β”‚  β”‚    β”‚  /api/users     /api/filters   β”‚  β”‚
β”‚  β”‚  β”‚  β”‚ β€’ Materialize turns   β”‚ β”‚  β”‚    β”‚                                β”‚  β”‚
β”‚  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚  β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚                    β”‚                   β”‚
β”‚  β”‚                β”‚                 β”‚                    β”‚                   β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚                    β”‚                   β”‚
β”‚  β”‚  β”‚  Write-Ahead Queue (WAL)   β”‚  β”‚                    β”‚                   β”‚
β”‚  β”‚  β”‚  (Disk-backed resilience)  β”‚  β”‚                    β”‚                   β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚                    β”‚                   β”‚
β”‚  β”‚                β”‚                 β”‚                    β”‚                   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β”‚                   β”‚
β”‚                   β”‚                                      β”‚                   β”‚
β”‚                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                   β”‚
β”‚                                 β”‚                                            β”‚
β”‚                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                              β”‚
β”‚                   β”‚       PostgreSQL 17        β”‚                              β”‚
β”‚                   β”‚                            β”‚                              β”‚
β”‚                   β”‚  raw_events (immutable log) β”‚                             β”‚
β”‚                   β”‚  sessions / turns / parts  β”‚                              β”‚
β”‚                   β”‚  messages / versions        β”‚                             β”‚
β”‚                   β”‚  workspaces / users         β”‚                             β”‚
β”‚                   β”‚  watch_state / instances    β”‚                             β”‚
β”‚                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Pipeline

 VS Code Chat File (.jsonl)
         β”‚
         β–Ό
 β‘  DISCOVER β€” Scan VS Code storage dirs for chat session files
         β”‚
         β–Ό
 β‘‘ WATCH β€” fs.watch() with debounce, rate-limiting, rewrite detection
         β”‚
         β–Ό
 β‘’ READ β€” Read new bytes from last known offset (crash-safe resume)
         β”‚
         β–Ό
 β‘£ PARSE β€” Parse JSONL entries (Kind 0-3 mutations)
         β”‚    Kind 0: Full state replacement
         β”‚    Kind 1: Set nested property
         β”‚    Kind 2: Truncate array then push (forks!)
         β”‚    Kind 3: Delete property
         β”‚
         β–Ό
 β‘€ FILTER β€” Remove keystroke noise (inputState patches)
         β”‚
         β–Ό
 β‘₯ QUEUE β€” Write-ahead to disk for durability
         β”‚
         β–Ό
 ⑦ STORE β€” Immutable raw events (dedup via SHA-256 hash)
         β”‚
         β–Ό
 β‘§ MATERIALIZE β€” Sessions β†’ Turns β†’ Turn Parts
         β”‚              (user↔AI exchanges with typed response pieces)
         β”‚
         β–Ό
 ⑨ TRACK β€” Update watch state for next resume

πŸš€ Quick Start

Prerequisites

  • VS Code 1.100+ with GitHub Copilot Chat
  • Docker & Docker Compose (recommended) β€” or PostgreSQL 17+ installed locally
  • Node.js 20+ (for development)

1. Start the Database & Dashboard

# Clone the repository
git clone https://github.com/inkflow/inkflow.git
cd inkflow

# Start PostgreSQL + Web Dashboard with Docker
docker-compose up -d

The dashboard will be available at http://localhost:3700

2. Install the VS Code Extension

cd extension

# Install dependencies
npm install

# Build the extension
npm run build

# Package and install (or use F5 in VS Code to launch Extension Development Host)

Tip: For development, press F5 in VS Code with the extension folder open to launch the Extension Development Host with InkFlow active.

3. Configure (Optional)

Add to your VS Code settings.json:

{
    // Database connection (defaults match docker-compose)
    "inkflow.database.host": "localhost",
    "inkflow.database.port": 5434,
    "inkflow.database.name": "inkflow",
    "inkflow.database.user": "inkflow",
    "inkflow.database.password": "inkflow_dev",

    // Your identity (for multi-user setups)
    "inkflow.identity.userId": "your@email.com",
    "inkflow.identity.displayName": "Your Name"
}

4. Start Chatting

Open Copilot Chat in VS Code and start a conversation. InkFlow will automatically:

  1. πŸ” Discover your chat session files
  2. πŸ‘οΈ Watch for changes in real time
  3. πŸ’Ύ Capture every mutation to PostgreSQL
  4. πŸ“Š Make everything searchable in the dashboard

πŸ“Š Dashboard

The web dashboard provides a comprehensive view of all captured Copilot Chat interactions.

Overview Dashboard

At a Glance: Total sessions, turns, parts, users, workspaces, and 24-hour activity metrics. See part-kind distribution (AI text vs. thinking vs. tool calls vs. file edits) and recent activity trends over 30 days.

Metric Description
πŸ“‹ Sessions Total conversations tracked across all workspaces
πŸ”„ Turns Individual requestβ†’response exchanges
🧩 Parts Atomic response pieces (text, thinking, tools, edits, refs)
πŸ‘₯ Users Contributing developers
πŸ“ Workspaces Monitored VS Code projects
⏰ 24h Activity Sessions created in the last 24 hours

Session Explorer

Browse, filter, sort, and search through all captured sessions:

  • Filter by workspace, user, or date range
  • Sort by last modified, created date, turn count, or title
  • Search across titles, custom titles, and session UUIDs
  • Paginate through results (25 per page)

Session Detail View

Deep-dive into any session with a turn-by-turn breakdown:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Session: "Refactor authentication module"       β”‚
β”‚  Project: my-app  Β·  User: alice  Β·  12 turns   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                  β”‚
β”‚  Turn 1  ──────────────────────────  14:23:01    β”‚
β”‚  πŸ‘€ "Can you help me refactor the auth module?"  β”‚
β”‚  πŸ€– β”œβ”€β”€ πŸ’­ Thinking (analyzing codebase...)     β”‚
β”‚     β”œβ”€β”€ πŸ”§ Tool: read_file (src/auth.ts)        β”‚
β”‚     β”œβ”€β”€ πŸ”§ Tool: read_file (src/middleware.ts)   β”‚
β”‚     β”œβ”€β”€ πŸ’¬ "I'll restructure the auth module..." β”‚
β”‚     └── ✏️ File Edit: src/auth.ts (+42 -18)     β”‚
β”‚                                                  β”‚
β”‚  Turn 2  ──────────────────────────  14:25:33    β”‚
β”‚  πŸ‘€ "Now add unit tests for the new structure"   β”‚
β”‚  πŸ€– β”œβ”€β”€ πŸ’­ Thinking (planning test strategy...) β”‚
β”‚     β”œβ”€β”€ πŸ’¬ "I'll create comprehensive tests..."  β”‚
β”‚     └── ✏️ File Edit: test/auth.test.ts (+87)   β”‚
β”‚                                                  β”‚
β”‚  Turn 3  πŸ”€ FORK ──────────────────  14:28:15   β”‚
β”‚  πŸ‘€ "Actually, try a different approach..."      β”‚
β”‚  ...                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Each turn part is color-coded by type:

  • 🟣 Violet β€” Thinking / chain-of-thought reasoning
  • 🟑 Amber β€” Tool invocations (file reads, searches, terminal)
  • 🟒 Emerald β€” File edits and code changes
  • πŸ”΅ Blue β€” AI text responses
  • βšͺ Gray β€” References, code block URIs, progress messages

Advanced Search

Search across all conversations with powerful multi-field filtering:

  • Free-text search across user prompts, AI responses, tool output, and file content
  • Filter by user, workspace, model ID, agent ID, part kind, and date range
  • Results include session context, matching turn/part, and content snippets with direct links

User Management

Track all contributing developers with session counts, turn counts, machine IDs, and activity timelines.


🌍 Real-World Use Cases

InkFlow addresses critical needs that are emerging as AI-assisted coding becomes mainstream across the software industry.

🏒 Enterprise Compliance & Audit

"The audit log does not include client session data, such as the prompts a user sends to Copilot locally." β€” GitHub Docs

GitHub's built-in audit logs only track license assignments and settings changes β€” not conversation content. Organizations subject to SOC 2, ISO 27001, HIPAA, or FedRAMP compliance need to demonstrate governance over AI-generated code. InkFlow fills this critical gap by providing:

  • Complete audit trail of every AI interaction, prompt, and suggestion
  • Immutable event log that cannot be tampered with (append-only, hash-verified)
  • Retention policies aligned with compliance requirements
  • User attribution linking every AI interaction to a specific developer

Who needs this: Financial services, healthcare, government contractors, defense, and any enterprise with strict code provenance requirements.

πŸ“ˆ Developer Productivity Analytics

McKinsey research shows that developers complete tasks up to 2x faster with generative AI tools β€” but measuring this impact requires data. InkFlow enables engineering leaders to:

  • Quantify AI adoption β€” How many conversations per developer per day? Which workspaces use Copilot most?
  • Measure response quality β€” Track the ratio of thinking-to-output, regeneration frequency (forks), and conversation length
  • Identify power users β€” Find team members who have mastered effective AI prompting to mentor others
  • Benchmark productivity β€” Compare AI usage patterns across teams, projects, and time periods
  • Track trends β€” 30-day activity charts show adoption curves and usage patterns

Who needs this: Engineering managers, VP Engineering, CTOs measuring ROI of GitHub Copilot investment.

🧠 Knowledge Management & Institutional Memory

AI conversations contain valuable institutional knowledge that is lost when sessions close:

  • Architectural decisions β€” "Why did we choose this database schema?" The AI-assisted discussion is preserved
  • Debugging sessions β€” Complex bug investigations with step-by-step AI reasoning are fully searchable
  • Onboarding accelerator β€” New team members can search past conversations to understand codebase decisions
  • Pattern library β€” Search across all "how to" conversations to build a team knowledge base
  • Cross-project learning β€” Find how a problem was solved in one project and apply it to another

Who needs this: Engineering teams of any size that want to preserve and share AI-assisted development knowledge.

πŸ”’ Security Review & Incident Response

When a security incident involves AI-generated code, organizations need to answer: What exactly did the AI suggest? What was the developer's prompt? Was the vulnerable code AI-generated or human-written?

  • Code provenance β€” Trace any piece of code back to the exact AI conversation that generated it
  • Prompt forensics β€” Review what developers asked the AI during a specific time window
  • Tool call audit β€” See exactly which files the AI read, which terminal commands it ran
  • Post-incident analysis β€” Full-text search across all conversations for security-relevant terms

Who needs this: Security teams, DevSecOps, incident response teams, and organizations in regulated industries.

πŸ“œ Intellectual Property Governance

As legal and regulatory frameworks evolve around AI-generated content, organizations need to track the provenance of AI-assisted code:

  • IP documentation β€” Maintain a record of which code was AI-generated vs. human-written
  • License compliance β€” Track what code snippets the AI referenced or suggested
  • Legal defensibility β€” Provide evidence of the development process in IP disputes
  • Policy enforcement β€” Verify that developers follow organizational AI usage policies

Who needs this: Legal teams, open-source compliance officers, and organizations with IP-sensitive codebases.

πŸŽ“ Training & Coaching Optimization

Research participants noted that prompt quality improves significantly with practice and shared learnings. InkFlow enables data-driven training:

  • Prompt quality analysis β€” Compare effective vs. ineffective prompting patterns across the team
  • Identify training needs β€” Find developers who struggle with AI tools (high fork rates, short sessions)
  • Best practice extraction β€” Surface the most productive conversation patterns for training materials
  • Coaching insights β€” Mentors can review mentees' AI interactions to provide targeted guidance
  • Workshop content β€” Use real anonymized conversations as training examples

Who needs this: Tech leads, engineering coaches, L&D teams, and organizations investing in AI literacy.

πŸ”¬ AI Research & Model Evaluation

For teams evaluating different AI models or building custom AI tooling:

  • Model comparison β€” Track which model IDs produce the longest thinking, most tool calls, or best results
  • Agent analysis β€” Compare performance of different Copilot agents (code, terminal, workspace)
  • Conversation patterns β€” Study how developers interact with AI at scale
  • Quality metrics β€” Analyze the distribution of part kinds (thinking, code, tools) across sessions

Who needs this: AI/ML teams, developer experience researchers, and organizations evaluating AI tooling investments.


βš™οΈ Configuration

VS Code Extension Settings

All settings are under the inkflow.* namespace in VS Code settings:

πŸ—„οΈ Database Configuration
{
    "inkflow.database.host": "localhost",       // PostgreSQL host
    "inkflow.database.port": 5434,              // PostgreSQL port
    "inkflow.database.name": "inkflow",         // Database name
    "inkflow.database.user": "inkflow",         // Database user
    "inkflow.database.password": "inkflow_dev", // Database password
    "inkflow.database.ssl": false               // Enable SSL/TLS
}

Override everything with a single connection string:

export INKFLOW_DATABASE_URL="postgres://user:pass@host:5432/inkflow?sslmode=require"
πŸ‘€ Identity (Multi-User)
{
    "inkflow.identity.userId": "alice@example.com",
    "inkflow.identity.displayName": "Alice Chen"
}
πŸ‘οΈ Watcher
{
    "inkflow.watcher.enabled": true,
    "inkflow.watcher.debounceMs": 300,                        // 50–5000ms
    "inkflow.watcher.watchVariants": ["stable", "insiders"],  // VS Code variants to monitor
    "inkflow.watcher.periodicScanSeconds": 30                 // Belt-and-suspenders scan interval
}
πŸ”‡ Ingestion
{
    "inkflow.ingestion.filterInputState": true   // Filter keystroke noise (10+ events/sec)
}
πŸ” Privacy
{
    "inkflow.privacy.redactContent": false        // Redact sensitive content before storage
}
πŸ—“οΈ Retention
{
    "inkflow.retention.maxAgeDays": null           // null = keep forever, or set a number
}
πŸ“€ Export
{
    "inkflow.export.defaultFormat": "markdown",    // markdown | html | json
    "inkflow.export.includeMetadata": true,
    "inkflow.export.includeForks": true,
    "inkflow.export.includeDeleted": false
}

Environment Variables

Variable Description Default
INKFLOW_DATABASE_URL Full PostgreSQL connection string (overrides all DB settings) β€”
INKFLOW_DB_PASSWORD Database password for docker-compose inkflow_dev
INKFLOW_DB_PORT Exposed database port 5434
INKFLOW_API_PORT Dashboard API port 3700
PORT Backend server port 3700
NODE_ENV Node environment development

πŸ› οΈ Tech Stack

Extension (VS Code Plugin)

Technology Purpose
TypeScript Primary language
porsager/postgres PostgreSQL driver (pure JS, zero native deps)
esbuild Ultra-fast bundler
Vitest Unit + E2E testing
Node.js crypto SHA-256 hashing for deduplication

Backend & Dashboard

Technology Purpose
React 19 UI framework
React Router 7 Client-side routing
Tailwind CSS 4 Utility-first styling
Express 5 API server
pg PostgreSQL client
Lucide React Icon library
date-fns Date formatting
Vite 6 Build tool & dev server

Infrastructure

Technology Purpose
PostgreSQL 17 Primary data store
Docker + Compose Containerized deployment
tsx TypeScript execution for server

πŸ—ƒοΈ Database Schema

InkFlow uses a carefully designed PostgreSQL schema optimized for append-heavy writes and analytical reads:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   raw_events     β”‚     β”‚    sessions      β”‚     β”‚     turns        β”‚
β”‚ (immutable log)  β”‚     β”‚                  β”‚     β”‚                  β”‚
β”‚                  β”‚     β”‚  session_uuid    │◄────│  session_id      β”‚
β”‚  event_hash  ◄───┼──┐  β”‚  workspace_id ──►│     β”‚  turn_index      β”‚
β”‚  kind (0-3)      β”‚  β”‚  β”‚  user_id ───────►│     β”‚  user_text       β”‚
β”‚  raw_content     β”‚  β”‚  β”‚  title           β”‚     β”‚  model_id        β”‚
β”‚  byte_offset     β”‚  β”‚  β”‚  turn_count      β”‚     β”‚  is_fork         β”‚
β”‚  session_file    β”‚  β”‚  β”‚  fork_count      β”‚     β”‚  agent_id        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚                                     β”‚
                      β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                      β”‚  β”‚    workspaces    β”‚     β”‚   turn_parts     β”‚
                      β”‚  β”‚                  β”‚     β”‚                  β”‚
                      β”‚  β”‚  storage_hash    β”‚     β”‚  part_index      β”‚
                      β”‚  β”‚  variant         β”‚     β”‚  kind            β”‚
                      β”‚  β”‚  folder_uri      β”‚     β”‚  content         β”‚
                      β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚  raw_json        β”‚
                      β”‚                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                      β”‚  β”‚     users        β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                      β”‚  β”‚                  β”‚     β”‚  watch_state     β”‚
                      β”‚  β”‚  user_uid        β”‚     β”‚                  β”‚
                      β”‚  β”‚  display_name    β”‚     β”‚  file_path       β”‚
                      β”‚  β”‚  machine_id      β”‚     β”‚  last_byte_offsetβ”‚
                      β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚  header_hash     β”‚
                      β”‚                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                      └──│ message_versions β”‚
                         β”‚                  β”‚
                         β”‚  version         β”‚
                         β”‚  content_hash    β”‚
                         β”‚  change_type     β”‚
                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Turn Part Kinds

Kind Description Example
(null) AI text response "Here's how to refactor..."
thinking Chain-of-thought reasoning "Let me analyze the codebase..."
toolInvocationSerialized Tool calls read_file, run_in_terminal
textEditGroup File edits Changes to src/auth.ts
inlineReference Code references Links to files/symbols
codeblockUri Code block URIs Source file associations
progressMessage Progress updates "Searching workspace..."
confirmation Confirmations User approval prompts
command VS Code commands Editor actions

πŸ§ͺ Development

# Extension development
cd extension
npm install
npm test                    # Run unit tests
npm run test:e2e            # Run end-to-end tests

# Backend development
cd backend
npm install
npm run dev                 # Start with hot reload (API + Vite)

# Full stack with Docker
docker-compose up -d        # Start PostgreSQL + Dashboard
# Then F5 in VS Code to launch extension

Project Structure

inkflow/
β”œβ”€β”€ extension/              # VS Code extension
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ extension.ts    # Entry point
β”‚   β”‚   β”œβ”€β”€ config.ts       # Settings management
β”‚   β”‚   β”œβ”€β”€ types.ts        # TypeScript types
β”‚   β”‚   β”œβ”€β”€ db/             # Database layer
β”‚   β”‚   β”œβ”€β”€ discovery/      # Chat file discovery
β”‚   β”‚   β”œβ”€β”€ parser/         # JSONL parsing & replay
β”‚   β”‚   β”œβ”€β”€ processor/      # Event processing pipeline
β”‚   β”‚   β”œβ”€β”€ utils/          # Hashing utilities
β”‚   β”‚   └── watcher/        # File system watcher
β”‚   └── test/               # Unit & integration tests
β”œβ”€β”€ backend/                # Web dashboard
β”‚   β”œβ”€β”€ server/             # Express API
β”‚   β”‚   └── routes/         # REST endpoints
β”‚   └── src/                # React frontend
β”‚       β”œβ”€β”€ pages/          # Dashboard, Sessions, Search, Users
β”‚       β”œβ”€β”€ components/     # Reusable UI components
β”‚       └── lib/            # API client
└── docker-compose.yml      # One-command deployment

🀝 Contributing

Contributions are welcome! Whether it's bug fixes, new features, documentation improvements, or use case stories β€” we'd love your input.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Areas We'd Love Help With

  • πŸ“Š Additional dashboard visualizations and charts
  • πŸ”Œ Export integrations (Slack, Notion, Confluence)
  • πŸ§ͺ Expanding test coverage
  • πŸ“š Documentation and tutorials
  • 🌐 Internationalization (i18n)
  • 🎨 Dashboard UI/UX improvements

πŸ“ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ™ Acknowledgments

  • GitHub Copilot for the AI coding assistance that inspired this tool
  • VS Code for the extensibility platform
  • The JSONL mutation format is based on VS Code's internal objectMutationLog.ts implementation

InkFlow β€” Because every conversation with AI deserves to be remembered.

Built with ❀️ for developers who believe in transparency, accountability, and the power of preserved knowledge.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors