Short-term memory for AI agents — captures your coding context in real time
Project description
⚡ TerminalPulse
Short-term memory for AI agents. Captures your coding context in real time — silently.
TerminalPulse runs in the background and watches your terminal, editor, and filesystem. When something breaks, type pulse fix — no copy-pasting, no explaining. It already knows what happened.
📋 Table of Contents
- The Problem
- The Solution
- How It Works
- Installation
- Setup
- Commands
- Real World Scenarios
- Auto-Suggest on Error
- MCP Integration
- Language & Project Support
- The Difference
- Security & Privacy
- Requirements
- Contributing
- License
🔥 The Problem Every Developer Knows
You're deep in a feature. Your build breaks. Now you have to:
- Read the traceback
- Copy the error
- Switch to Claude / ChatGPT / Cursor
- Explain your project, your git branch, which file you were editing
- Paste the file contents
- Wait for the answer
- Switch back to terminal
- Apply the fix manually
That's 2 minutes of context-switching friction. Every. Single. Time.
The worst part? The AI doesn't know anything about what you were doing. You have to re-explain everything from scratch.
✅ The Solution
# Your Next.js build breaks at 2am
npm run build
# TypeError: Cannot read properties of undefined (reading 'userId')
# ⚡ Error detected. Run 'pulse fix' to auto-fix.
pulse fix
# TerminalMind already knows:
# → Project: Next.js + TypeScript
# → Branch: feature/auth
# → Last commit: "add JWT middleware"
# → Active file: src/middleware/auth.ts
# → Full build error output
# → Actual file contents
# → Precise fix in seconds
No switching tabs. No explaining. No copy-pasting.
🏗️ How It Works
Three silent streams feed a time-decaying knowledge graph:
| Stream | Source | What It Captures |
|---|---|---|
| Focus | VS Code window title | Which file is active in your editor |
| Activity | Filesystem watchdog | Which files were just saved |
| Distress | Bash hook | Which terminal commands just failed |
Every event gets a heat score that decays over time:
heat = e^(-λ × seconds_since_event) × severity
Older events fade automatically. The AI always gets what's relevant right now — not noise from this morning's work.
Data Flow
VS Code (Windows) → HTTP:7077 ─┐
Terminal errors → Unix socket ─┼→ pulsed daemon → ~/.devpulse_state.json
File saves → watchdog ─┘ ↓
pulse fix → TerminalMind → Fix
Technology Stack
| Layer | Technology | Role |
|---|---|---|
| Daemon | Python asyncio | Long-lived background process |
| Graph | NetworkX + Pydantic | Time-decaying knowledge graph |
| CLI | Typer + Rich | Commands and formatted output |
| AI Bridge | TerminalMind | Auto-fix powered by live context |
🚀 Installation
pip install terminalpulse
pip install terminalmind
tmind auth
⚙️ Setup (One Time)
# Install system dependencies
pulse install-deps
# Inject shell hook
pulse init
source ~/.bashrc
# Start watching your project
cd your-project
pulse watch
That's it. TerminalPulse runs silently in the background from now on.
🛠️ Commands
| Command | What It Does |
|---|---|
pulse watch |
Auto-detect project type and start daemon |
pulse fix |
Send full context to AI — no input needed |
pulse context |
Copy formatted context block for any AI |
pulse insights |
Detect recurring failure patterns |
pulse report |
End of day coding summary |
pulse history |
30-minute activity timeline |
pulse state |
Show raw JSON context |
pulse init |
Inject shell hook into .bashrc |
pulse install-deps |
Install system dependencies |
pulse mcp |
Start MCP server for Claude Desktop / Cursor |
pulse_run <cmd> |
Capture full stderr for large builds |
🧑💻 Real World Scenarios
Scenario 1 — Full-Stack Developer (Next.js + TypeScript)
cd ~/my-saas
pulse watch
# Project detected: Next.js + TypeScript
# Watching: /home/user/my-saas
# Later — build breaks
npm run build
# Module not found: Can't resolve '@/components/AuthGuard'
# ⚡ Error detected. Run 'pulse fix' to auto-fix.
pulse fix
# Sends to TerminalMind:
# → Project: Next.js + TypeScript
# → Branch: feature/dashboard
# → Changed files: components/AuthGuard.tsx, pages/dashboard.tsx
# → Full webpack error
# → File contents of dashboard.tsx
# → Precise fix instantly
Scenario 2 — Backend Developer (Python / FastAPI)
cd ~/api-server
pulse watch
# Project detected: Python
# Server crashes
python3 main.py
# sqlalchemy.exc.OperationalError: no such table: users
# ⚡ Error detected. Run 'pulse fix' to auto-fix.
pulse fix
# AI knows you just edited models.py and ran a migration
# Gives exact Alembic fix, not a generic answer
Scenario 3 — You Use Claude, Not TerminalMind
pulse context
# Copies to clipboard:
# === TerminalPulse Context ===
# Project: React + TypeScript
# Branch: fix/payment-flow
# Active file: src/checkout/PaymentForm.tsx
# Last error: npm run build (exit 1)
# Changed files: PaymentForm.tsx, useStripe.ts
# File contents: [actual code]
# =============================
# Paste into Claude — full context in one paste
Scenario 4 — Recurring Bug Pattern
# After hitting the same error 4 times today
pulse insights
# ⚡ TerminalPulse Insights
# Project: Python | Branch: feature/auth
#
# Recurring failure: python3 server.py failed 4 times
# → All failures occurred after editing config.py
# → Suggestion: run pulse fix to investigate root cause
# High error rate: 80%
# → Consider adding input validation to config.py
Scenario 5 — End of Day Standup
pulse report
# 📊 TerminalPulse Daily Report
# Branch: feature/payment-integration
#
# • Files saved: 23
# • Errors hit: 6
# • Focus changes: 14
#
# Most edited file: PaymentForm.tsx (6 saves)
# Most common error: npm run build (4x)
#
# Rough session — 6 errors. Run pulse insights for patterns.
⚡ Auto-Suggest on Error
Every time a command fails, TerminalPulse prints:
⚡ Error detected. Run 'pulse fix' to auto-fix.
You never have to remember to use it.
🔌 MCP Integration (Claude Desktop / Cursor)
pulse mcp
Add to claude_desktop_config.json:
{
"mcpServers": {
"terminalpulse": {
"command": "pulse",
"args": ["mcp"]
}
}
}
Claude Desktop now has live access to your coding context. Ask it:
- "What was I working on?"
- "What errors did I hit today?"
- "Which file is causing the most problems?"
Available tools:
| Tool | Returns |
|---|---|
get_pulse_state |
Full current coding context |
get_hottest_error |
Most recent error with full stderr |
get_active_context |
Active file, language, git branch |
get_history |
Last 30 minutes timeline |
🌍 Language & Project Support
| Stack | Detection | Error Capture | Fix |
|---|---|---|---|
| Python / FastAPI / Django | ✓ | ✓ | ✓ |
| React / Next.js | ✓ | ✓ | ✓ |
| TypeScript / Node.js | ✓ | ✓ | ✓ |
| Rust | ✓ | ✓ | ✓ |
| Go | ✓ | ✓ | ✓ |
| Java / Spring | ✓ | ✓ | ✓ |
| Large builds (webpack, gradle, pytest) | ✓ via pulse_run |
✓ | ✓ |
📊 The Difference
| Without TerminalPulse | With TerminalPulse |
|---|---|
| Copy error manually | Auto-captured |
| Switch to AI chat | Already connected |
| Explain your project | Auto-detected |
| Explain git branch | Auto-detected |
| Paste file contents | Auto-read |
| Wait for response | Instant |
| Apply fix manually | One keypress |
| ~2 minutes every time | ~5 seconds |
🛡️ Security & Privacy
- Local first — your context graph lives entirely on your machine
- No telemetry — nothing is sent anywhere without your command
- Targeted context — only the specific error and active file go to the AI
- Secure keys — API keys stored in OS keyring, never in plain files
📋 Requirements
- Python 3.10+
- WSL Ubuntu (Linux daemon)
netcat— pre-installed on Ubuntuterminalmind— forpulse fix- Windows 11 + VS Code — for focus tracking (optional)
🤝 Contributing
- Fork the repository
- Create your branch:
git checkout -b feature/your-feature - Commit:
git commit -m 'Add your feature' - Push:
git push origin feature/your-feature - Open a Pull Request
📄 License
MIT © 2026 Prajwal Hulle — See LICENSE for full details.
Built for developers who are tired of copy-pasting errors into AI.
PyPI •
GitHub •
Issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terminalpulse-0.5.0.tar.gz.
File metadata
- Download URL: terminalpulse-0.5.0.tar.gz
- Upload date:
- Size: 32.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5f6c6c85746d9ba1242594bac7c09316883012e6c1dd4b1ef5538af691d1175
|
|
| MD5 |
d55843593aafa56755d41d4afb24aca9
|
|
| BLAKE2b-256 |
db51200179694d93fa57e249f991fa78e72bc317b8b713d82063ff99b5a00ca5
|
File details
Details for the file terminalpulse-0.5.0-py3-none-any.whl.
File metadata
- Download URL: terminalpulse-0.5.0-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b6f2860fffce1446bd2fed6713adfb4f746174d46d424844beace33c8d6cbe3
|
|
| MD5 |
8a0682475a5fe5c1fb57bde57fdb0cdd
|
|
| BLAKE2b-256 |
f6b23f87e516b7195e19462178920ac3a0559a38e184411df334c375dd643b94
|