Skip to main content

Lightweight function‐call tracer with SQLite backend, built for vibe coders.

Project description

VibeTracer

PyPI version Python versions License

VibeTracer is vibecoders’ best friend – instrument, trace & audit your Python vibes locally, with LLM‑powered insights.


Table of Contents

  1. Key Features
  2. Quick Start
  3. Command‑line Reference
  4. Generated Reports
  5. Installation
  6. Configuration
  7. Security & Privacy
  8. Why VibeTracer?
  9. Roadmap
  10. Contributing
  11. License
  12. Changelog

Key Features

  • One‑line instrumentation – decorate any function with @info_decorator to capture its implementation, arguments, return value, runtime, exceptions, and more, both statically & dynamically.
  • Project‑wide tracingvibetracer run path/to/main.py auto‑instruments every in‑house function (external packages are ignored) and stores rich execution data in a local SQLite DB.
  • LLM‑powered analysisvibetracer analyze turns raw traces into two Markdown reports: human‑readable and LLM‑ready. Plug in Anthropic, OpenAI, or Google with your API key for a full audit.
  • Actionable insights – Errors, security issues, performance hotspots, resource concerns, and architectural notes – each with concrete suggestions.
  • All‑local, zero infra – no remote telemetry, no servers to run, API keys never leave your machine (check the source!).
  • One‑shot conveniencevibetracer runalyze runs & analyzes in a single command.

Quick Start

1· Decorator‑level tracing

from vibetracer import info_decorator


@info_decorator
def greet(name: str) -> str:
    return f"Hello, {name}!"


print(greet("Vibe coder"))

After execution you’ll find an execution_<timestamp>.db SQLite file in .vibetracer/.

2· Project‑wide tracing

vibetracer run path/to/main.py

3· AI‑assisted analysis

export LLM_PROVIDER=openai   # or anthropic / google
export {LLM_PROVIDER}_API_KEY=<your‑LLM-provideer-api‑key>

vibetracer analyze .vibetracer/execution_latest.db

4· All‑in‑one

vibetracer runalyze path/to/main.py --provider='openai' --api_key=$OPENAI_API_KEY

Command‑line Reference

Command Purpose Required Arg Optional Flags / Env Vars
vibetracer run Trace an entire project Path to entry main.py
vibetracer analyze Analyze a trace DB Path to .db file or folder (picks latest) --provider (openai/anthropic/google, default openai) or LLM_PROVIDER, --api_key or {LLM_PROVIDER}_API_KEY
vibetracer runalyze Run + analyze in one go Path to entry main.py Same as analyze

ℹ️ API keys stay local – they are only used to call the selected provider from your machine.


Generated Reports

Each analysis produces two Markdown files:

  1. Human Report – readable, annotated summary of runtime findings.
  2. LLM Report – structured, token‑balanced context ready for further prompts.

Both contain five sections:

Section Description
Errors & Exceptions Runtime failures + fixes
Security Issues Potential vulnerabilities + mitigations
Performance Hotspots Slow spots + optimization ideas
Runtime Concerns Memory / I/O / resource notes
Architectural Notes Organization & best‑practice suggestions

Paste either report into your favourite chat‑GPT‑like tool to continue iterating – or just read it yourself.

Check out this sample report from a real project vibe traced using vibetracer.

VibeTracer


Installation

pip install vibetracer

Configuration

Env Var Purpose Default
LLM_PROVIDER LLM provider (openai, anthropic, google) openai
{LLM_PROVIDER}_API_KEY API key for provider

Config can also be given via CLI flags (see above). CLI flags override env vars.


Security & Privacy

  • Local‑first: All traces & analysis stay on disk – no external telemetry.
  • Transparent: Open‑source code – verify what happens with your data.
  • Ephemeral keys: API keys are read once, kept in memory, never stored.

Why VibeTracer?

Feature VibeTracer PySnooper Manual Telemetry
Static+dynamic capture ⚠️
LLM‑powered audit
Zero infra / local only
SQLite storage
One‑shot run+analyze

Roadmap

  • Plugin system for custom analyzers
  • VS Code extension for in‑editor highlights
  • Cloud‑hosted dashboard (opt‑in)

Contributing

  1. Fork, clone, git checkout -b feat/<name>.
  2. Dev
  3. Open a PR

License

Distributed under the MIT license. See LICENSE for more information.


Changelog

See CHANGELOG for release notes.


Powered by vibes & ☕️ – happy tracing!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vibetracer-0.1.2.tar.gz (107.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vibetracer-0.1.2-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file vibetracer-0.1.2.tar.gz.

File metadata

  • Download URL: vibetracer-0.1.2.tar.gz
  • Upload date:
  • Size: 107.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for vibetracer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9ec9fefd5b17bbd1c298de7617ab703c9003c2f4a73e6779c5216449fd841820
MD5 b483289be9b827b869a1d54fb549a0ff
BLAKE2b-256 12ceb3a04e3a33818e2caf37793cd4769c2118da27f50af3fdd6ee0f471c33dc

See more details on using hashes here.

File details

Details for the file vibetracer-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: vibetracer-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for vibetracer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7024882fcea11159a251a00274c3f2752cef15b9542e60305ef52ee3a647ea58
MD5 6df2d254421a8d5d6443da2f532efd3d
BLAKE2b-256 7656e83e5a3eb039caea432ea4d653a1b65eaf0219536d9b9582600b9af04d17

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page