Jeff Fontenot
← All projects

WakeTrail

I am building a local DevOps timeline that brings commands, resource changes, and recovery evidence together, with shared terminal/export views and explicit capture controls.

AutomationScriptingCloud Engineering
WakeTrail

When something breaks during engineering work, I want to reconstruct more than the commands I typed. I want to know which configuration or resource changed, what failed afterward, and what I did before it recovered. WakeTrail grew around that question.

I am building it as a local forensic timeline for DevOps work. The Go CLI records shell activity and brings it together with observations from Git, Docker and Compose, systemd, Kubernetes, and Terraform/OpenTofu. The core recorder and review workflow are implemented; the project is now in pre-release development and v1 hardening.

Stack: Go, Cobra, SQLite, Bash integration, Lip Gloss, and a modular collector framework.

Keeping the action and the observation together

The Bash integration records command timing, working directory, exit status, duration, and Git context. Approved diagnostic output can accompany the command. Collectors add resource observations so the trail can show what happened around that work.

A session can be reviewed in the terminal and exported as Markdown:

Bash
waketrail start compose-investigation
waketrail mark "Checking the deployment baseline"
# Perform the investigation in the instrumented Bash shell.
waketrail stop
waketrail show compose-investigation
waketrail export compose-investigation -o compose-investigation.md

The timeline puts those details in one chronological view. That makes it easier to investigate what changed around a failure, while still keeping cause and sequence separate. Seeing an event after a command is a clue, not proof that the command caused it.

Making a Compose deployment readable

A Compose operation can affect several containers. Displaying every transition as an unrelated card makes the investigation harder to follow.

I worked on grouping the observed effects under the Compose activity while preserving the underlying events. Project attribution uses actual Compose labels, which matters when a deployment's project name differs from its directory. Ambiguous project evidence should remain ungrouped.

The resulting cards show the deployment, observed changes, relevant scope, and command together. Container and service counts reflect what WakeTrail actually observed, rather than implying every service in the project was present or healthy.

The repository includes regression cases for project matching, ambiguous projects, observed transitions, and shared terminal/export fields. The hardening notes also record a live Compose up/down smoke test in the installed CLI.

WakeTrail terminal timeline for the Online Boutique Kubernetes deployment, showing commands, resource changes, readiness checks and a successful health check.
WakeTrail terminal timeline for the Online Boutique Kubernetes deployment, showing commands, resource changes, readiness checks and a successful health check.

Keeping the exported account consistent

The terminal view and Markdown export use the same semantic timeline reconstruction. The export path delegates to the shared builder:

Go
func buildExportEvents(commands []storage.CommandEvent, timeline []storage.TimelineEvent) []displayEvent {
    return buildDisplayEvents(commands, timeline, false)
}

That choice keeps the saved account aligned with the trail I reviewed. The shared card-field builder carries the same activity details into both formats, while verbose terminal output provides access to lower-level evidence.

See the export implementation.

Treating captured evidence as sensitive data

A tool that records troubleshooting can also record credentials. I made capture policy part of the recorder rather than relying on every user to remember which output might be sensitive.

Secret-prone inspections, Git patch output, and arbitrary web-response bodies retain command metadata without capturing their output. Eligible diagnostics receive best-effort redaction before new SQLite writes, and the recorder independently checks the capture policy.

Persisted output is limited to 64 KiB per stream. Oversized ordinary output retains a head and tail with an omission marker; privacy-sensitive truncation can withhold the tail. Local state and new exports use restricted permissions.

I'd rather capture less than accidentally save a credential. Redaction is not perfect, however, and it does not rewrite old recordings. I still review exports before sharing them. The security document records those boundaries.

What still needs to earn a v1 release

The CI workflow checks formatting, runs Go vet and the test suite, and builds the project. Release readiness also depends on behavior those checks cannot establish by themselves: clean installation, reliable shell integration, collector failure reporting, and a clear recording lifecycle.

One important current behavior is that waketrail stop ends the named session while leaving the Bash hook loaded. The hook can record outside a named session. Bounded retro retention and its controls still need to be defined and implemented.

The configurable retro buffer, automatic incident preservation, incident-focused reports, and Omarchy widget are planned work. The proposed TUI and desktop investigation interface remain exploratory.

WakeTrail Markdown export of a Docker Compose session, showing its summary, command timeline and grouped container startup events.
WakeTrail Markdown export of a Docker Compose session, showing its summary, command timeline and grouped container startup events.


The immediate goal is a trustworthy CLI release: understandable capture, explicit gaps, consistent evidence, and documentation that matches the installed behavior. The larger interface ideas can build on that foundation.

Explore the repository