tracepack

tracepack is a small Go CLI that quickly scans codebases for patterns and saves the results as Markdown, designed to stay simple, fast, and flexible through YAML profiles.
Stack
Why I built it
When you inherit a large, old, or unfamiliar codebase, the first problem is usually not deep semantic analysis. It is getting a fast, reusable overview of what is there: size, structure, hotspots, and recurring patterns worth reviewing first.
Tradeoffs
The tool is intentionally lightweight and pattern-driven. That keeps it flexible and easy to adapt with YAML profiles, but it also means it is not a replacement for deeper static analysis, framework-aware tooling, or manual review.
Notes
The most useful output is often a compact footprint plus a saved Markdown bundle of searches and command output. That makes triage, migration planning, legacy reviews, and sharing findings with others much easier.
It supports two modes:
- footprint prints a compact overview of a codebase, including size, file counts, and related metrics
- summary runs a sequence of searches or shell commands and saves the results as a Markdown analysis bundle
This is useful when you want to:
- get a rough overview of a codebase
- run reusable searches and save findings as Markdown
- build lightweight scan profiles for different stacks or migration tasks
The bundled default profile is php-legacy, but profiles are configurable and not limited to PHP.
Typical profile entries can look for things like:
- session handling and direct superglobal usage
- file operations and writable paths
- database access patterns
- include and require relationships
- likely config or secret locations
- framework- or stack-specific conventions
The goal is not to replace dedicated analyzers. It is to give you a simple, fast way to inspect a codebase, capture repeatable searches, and produce review-friendly artifacts you can share or revisit later.
Status
Released on GitHub as a practical, profile-driven codebase inspection tool with Markdown-first output.