sachaos/viddy
π A modern watch command. Time machine and pager etc.
Healthy across all four use cases
weakest axisPermissive license, no critical CVEs, actively maintained β safe to depend on.
Has a license, tests, and CI β clean foundation to fork and modify.
Documented and popular β useful reference codebase to read through.
No critical CVEs, sane security posture β runnable as-is.
- βLast commit 3mo ago
- β9 active contributors
- βMIT licensed
Show all 7 evidence items βShow less
- βCI configured
- β Slowing β last commit 3mo ago
- β Single-maintainer risk β top contributor 86% of recent commits
- β No test directory detected
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Healthy" badge
Paste into your README β live-updates from the latest cached analysis.
[](https://repopilot.app/r/sachaos/viddy)Paste at the top of your README.md β renders inline like a shields.io badge.
βΈPreview social card (1200Γ630)
This card auto-renders when someone shares https://repopilot.app/r/sachaos/viddy on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: sachaos/viddy
Generated by RepoPilot Β· 2026-05-09 Β· Source
π€Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale β STOP and ask the user to regenerate it before proceeding. - Treat the AI Β· unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/sachaos/viddy shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything β but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
π―Verdict
GO β Healthy across all four use cases
- Last commit 3mo ago
- 9 active contributors
- MIT licensed
- CI configured
- β Slowing β last commit 3mo ago
- β Single-maintainer risk β top contributor 86% of recent commits
- β No test directory detected
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
β Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live sachaos/viddy
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale β regenerate it at
repopilot.app/r/sachaos/viddy.
What it runs against: a local clone of sachaos/viddy β the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in sachaos/viddy | Confirms the artifact applies here, not a fork |
| 2 | License is still MIT | Catches relicense before you depend on it |
| 3 | Default branch master exists | Catches branch renames |
| 4 | Last commit β€ 121 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of sachaos/viddy. If you don't
# have one yet, run these first:
#
# git clone https://github.com/sachaos/viddy.git
# cd viddy
#
# Then paste this script. Every check is read-only β no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of sachaos/viddy and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "sachaos/viddy(\\.git)?\\b" \\
&& ok "origin remote is sachaos/viddy" \\
|| miss "origin remote is not sachaos/viddy (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
&& ok "license is MIT" \\
|| miss "license drift β was MIT at generation time"
# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
&& ok "default branch master exists" \\
|| miss "default branch master no longer exists"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 121 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~91d)"
else
miss "last commit was $days_since_last days ago β artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) β safe to trust"
else
echo "artifact has $fail stale claim(s) β regenerate at https://repopilot.app/r/sachaos/viddy"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
β‘TL;DR
Viddy is a modern Rust implementation of the Unix watch command that executes a command periodically and displays colored, diff-highlighted output in a TUI. Beyond basic watching, it uniquely features a 'time machine mode' that lets you rewind/replay past command executions like a video, search text across outputs, persist history to SQLite, and use a pager interfaceβall with Vim-like keybindings and customizable colors. Single-binary monolith written in Rust. Core logic is organized as: src/main.rs (entry), src/app.rs (state machine), src/tui.rs (UI rendering via ratatui), src/exec.rs (command execution), src/store/ (history backend: memory.rs and sqlite.rs), src/components/ (UI building blocks: clock, command, status, help, history), and src/action.rs/mode.rs (event/state handling). Build metadata from build.rs uses vergen for version embedding.
π₯Who it's for
DevOps engineers, system administrators, and CLI power users who monitor long-running processes (logs, metrics, system status) and need to investigate how outputs changed over time without manually re-running commands or hunting through logs.
π±Maturity & risk
Actively maintained and production-ready. Version 1.3.0 with mature CI/CD (GitHub Actions workflows in .github/workflows/), Cargo-based Rust toolchain, and multi-platform distribution (Homebrew, AUR, Alpine, Scoop). The monolithic codebase structure and single primary maintainer (@sachaos) suggest it's a stable solo project rather than a large team effort.
Low risk for basic use; manageable dependency count (~30 dependencies, mostly well-established crates like ratatui, tokio, crossterm). Single-maintainer project means slower response to edge cases or platform-specific bugs, but no complex dependency tree breaking frequently. SQLite backend (rusqlite with bundled feature) adds operational simplicity.
Active areas of work
No specific open PRs or milestones visible from file list, but the v1.3.0 release and CI/CD setup suggest regular maintenance. The .config/config.json5 and old_config.rs presence suggest recent config migration work. Active keybinding/UX refinement evident from extensive keymaps documentation.
πGet running
git clone https://github.com/sachaos/viddy.git
cd viddy
cargo build --release
./target/release/viddy watch 'ps aux'
Or install via Homebrew: brew install viddy, then run viddy 'your-command-here'.
Daily commands:
Development: cargo run -- 'your-command' or cargo build && ./target/debug/viddy 'your-command'. Release: cargo build --release then ./target/release/viddy 'your-command'. Makefile present but details not shown; likely contains test/fmt targets. CI runs on push/PR via .github/workflows/ci.yml and .github/workflows/cd.yml.
πΊοΈMap of the codebase
- src/app.rs: Core application state machine and update logic; coordinates all subsystems
- src/tui.rs: Main UI rendering loop using Ratatui; where screen layout and widget composition happens
- src/exec.rs: Command execution and output capture; interfaces with shell and handles ANSI codes
- src/action.rs: Event/action type definitions; defines all possible user interactions
- src/store/sqlite.rs: Persistent history backend; enables time-machine replay by storing execution snapshots
- src/components/history.rs: UI component for browsing past executions; critical to time-machine feature
- .config/config.json5: Example configuration for keybindings and colors; users customize here
- src/diff.rs: Diff highlighting logic; implements the colored diff-on-change feature
- src/cli.rs: Clap CLI argument parsing and help text
π οΈHow to make changes
For UI changes: Edit src/components/* (modular UI building blocks) and src/tui.rs (main render loop). For keybindings: src/action.rs defines action enums, src/mode.rs defines modes, and .config/config.json5 maps keys to actions. For command execution: src/exec.rs and src/runner.rs. For history storage: src/store/sqlite.rs or src/store/memory.rs. For config: src/config.rs handles loading from .config/config.json5. Start with src/app.rs to understand the state machine.
πͺ€Traps & gotchas
Config loading: Viddy looks for config in ~/.config/viddy/config.json5 (via directories crate); no explicit default if missing, so first run may have unexpected defaults. Shell aliases: Issue #2 documents shell alias support requiring special handlingβcheck src/exec.rs for shell invocation strategy. Time-zone handling: Uses chrono crate; ensure system TZ is set for correct timestamp display in history. ANSI stripping: Uses strip-ansi-escapes for search, which may lose color context; edge case if searching colored output. No environment variable configuration: Config is file-only (JSON5), not env varsβimportant if containerizing. Termtext module (src/termtext.rs) suggests custom terminal text handling; Unicode width issues possible on certain terminals.
π‘Concepts to learn
- Circular Buffer / Ring Buffer β Viddy's time-machine mode stores recent command outputs in a fixed-size circular buffer to enable efficient rewind/replay without unbounded memory; understanding this is key to the core feature
- ANSI Escape Code Parsing β Viddy preserves colored output from commands by parsing ANSI escape sequences; the ansi-parser and ansi-to-tui dependencies depend on this concept to convert terminal colors into Ratatui widget styling
- Diff Algorithm (LCS / Myers Diff) β The diff highlighting feature (toggle with 'd') uses diff algorithms to detect line-by-line changes; the dissimilar crate implements this to mark changed regions
- Event-Driven TUI Loop β Viddy's main loop (src/tui.rs) processes Crossterm events, updates state, and re-rendersβa classic event loop pattern essential for responsive interactive CLIs
- Time-Series Snapshots / WAL β To enable time-machine replay, viddy must snapshot command output + metadata at each execution interval; SQLite backend in src/store/sqlite.rs effectively implements a mini write-ahead log
- Shell Metacharacter Expansion & Alias Resolution β src/exec.rs must invoke the user's shell (bash/zsh/etc.) and resolve aliases; understanding shell quoting, pipes, and alias expansion is necessary to extend command execution
- Async/Await & Tokio Task Spawning β Viddy uses Tokio for concurrent command execution and signal handling while maintaining a responsive UI; the tokio::spawn patterns in src/runner.rs enable non-blocking command runs
πRelated repos
coreutils/coreutilsβ The original GNU coreutilswatchcommand that viddy modernizes; reference implementation for baseline behaviorBurntSushi/ripgrepβ Another high-quality Rust CLI with similar philosophy (faster, better UX than Unix originals); pattern for maintainable Rust tool architectureatuin-sh/atuinβ Rust TUI shell history tool using SQLite backend like viddy; similar persistent storage & replay patternsratatui-org/ratatuiβ The TUI framework viddy depends on; essential for understanding UI rendering and widget systemstarship/starshipβ Another popular Rust CLI tool with extensive cross-platform CI/packaging; reference for mature Rust project structure
πͺPR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add integration tests for search functionality (src/search.rs)
The search.rs module lacks dedicated test coverage. Given that search is a core feature (mentioned in README), adding integration tests would ensure text search works correctly across different output scenarios, especially with ANSI color codes and diff highlighting.
- [ ] Create tests/search_integration_test.rs with test cases for basic text search
- [ ] Add tests for search with ANSI escape sequences (using ansi-parser dependency)
- [ ] Test search across time machine history (src/store/memory.rs and src/store/sqlite.rs)
- [ ] Verify search works with diff-highlighted output (src/diff.rs)
Add unit tests for config parsing (src/config.rs and src/old_config.rs)
The config module handles JSON5 parsing and migration from old config format, but lacks comprehensive tests. With customizable keymappings and colors being key features, robust config tests would prevent regressions and document expected behavior.
- [ ] Create tests/config_test.rs for JSON5 config parsing (json5 dependency)
- [ ] Add tests for old_config.rs migration logic to ensure backwards compatibility
- [ ] Test color and keymapping configuration parsing with valid/invalid inputs
- [ ] Add tests for config precedence (CLI args vs config file)
Add GitHub Actions workflow for testing SQLite store backend (src/store/sqlite.rs)
While CI exists (.github/workflows/ci.yml and cd.yml), there's no visible workflow specifically testing the SQLite storage backend used for history persistence. This is critical for the 'Look back history' feature mentioned in README.
- [ ] Create .github/workflows/storage_test.yml that runs tests for src/store/sqlite.rs
- [ ] Add matrix testing with different SQLite versions via the 'bundled' feature flag
- [ ] Include tests for concurrent access patterns (tokio async operations in src/runner.rs)
- [ ] Add tests comparing memory.rs vs sqlite.rs behavior for history management
πΏGood first issues
- Add unit tests for src/diff.rs: The diff highlighting module lacks dedicated tests. Write tests comparing expected diff output for identical, partially-changed, and completely-changed command outputs. This catches edge cases in ANSI color re-application.
- Document keybinding customization examples: .config/config.json5 exists but README.md only shows a keybinding table, not how to customize. Add a 'Configuration' section with 2-3 concrete examples (e.g., remap SPACE to 'j' or add custom Ctrl+X binding) and save location clarification.
- Add tests for src/store/sqlite.rs persistence: No visible test coverage for SQLite history storage. Write integration tests that: (1) execute a command, (2) verify snapshot saved to DB, (3) reload and verify history reconstruction. Catch migrations/schema issues early.
βTop contributors
Click to expand
Top contributors
- @sachaos β 86 commits
- @anthr76 β 3 commits
- @mousecrusher2 β 3 commits
- @arpandaze β 2 commits
- @avamsi β 2 commits
πRecent commits
Click to expand
Recent commits
ad1f0feβ Merge pull request #169 from kianmeng/fix-typos-again (sachaos)89f9963β docs: fix typos again (kianmeng)9ef1997β Merge pull request #168 from arpandaze/master (sachaos)86d4b1cβ feat: made interval step and min interval configurable (arpandaze)b04641fβ feat: support for increasing and decreasing interval (arpandaze)1b7493dβ Update to v1.3.0 (sachaos)b9a57a8β Merge pull request #166 from sachaos/disable-mouse-capture (sachaos)c2e11daβ Fix clippy error (sachaos)2bba605β Update dependencies (sachaos)3ac5e05β Fix fmt (sachaos)
πSecurity observations
The viddy codebase is relatively secure with no critical vulnerabilities identified. The main security concerns are moderate: (1) potential command injection risks from user input execution, (2) configuration file permissions and content sensitivity, (3) the large dependency tree which increases supply chain risk. The application properly uses modern Rust security features (memory safety), and dependencies are generally well-maintained. Recommended actions include: regular dependency auditing with cargo-audit, ensuring proper file permissions for config and history storage, hardening command execution to prevent injection attacks, and documenting security best practices for users. The code quality appears good with proper error handling and no obvious cryptographic weaknesses or hardcoded credentials detected.
- Medium Β· SQLite Dependency with Bundled Library β
Cargo.toml - rusqlite dependency. The rusqlite dependency uses the 'bundled' feature which compiles SQLite from source. While this ensures compatibility, it may lag behind security patches in upstream SQLite. The bundled version (0.32.1) should be monitored for updates to ensure timely security fixes. Fix: Regularly update rusqlite to the latest version. Consider monitoring CVE databases for SQLite vulnerabilities and upgrade promptly when security patches are released. - Medium Β· Command Execution via User Input β
src/exec.rs, src/runner.rs. The application executes arbitrary commands periodically based on user input (the 'watch' command pattern). While this is the intended functionality, there's potential for command injection if user input is not properly sanitized before being passed to shell execution in src/exec.rs. Fix: Ensure that command arguments are properly escaped and validated. Avoid using shell=true when executing commands. Use direct process execution with argument arrays instead of shell string interpolation. Validate and sanitize any user-provided command patterns. - Low Β· Config File Exposure Risk β
src/config.rs, .config/config.json5. Configuration files stored in user directories (.config/config.json5) may contain sensitive information. The application uses JSON5 format which is less strict than JSON and could potentially allow unsafe parsing if not handled correctly. Fix: Ensure config files are created with restrictive permissions (0600). Document security best practices for users regarding what should not be stored in config files. Implement file permission checks to warn users if config files are world-readable. - Low Β· Dependency Supply Chain Risk β
Cargo.toml - all dependencies. The project has 38+ dependencies which increases the attack surface. Several dependencies are large (tokio, ratatui) which themselves have many transitive dependencies. A compromise in any transitive dependency could affect this application. Fix: Use 'cargo audit' regularly to check for known vulnerabilities in dependencies. Consider using cargo-deny or similar tools to enforce security policies. Periodically review and update dependencies. Keep Rust and Cargo toolchain updated. - Low Β· Potential Information Disclosure via Error Messages β
src/main.rs, throughout codebase with error handling. The application uses better-panic and human-panic for error handling. While these improve user experience, detailed error messages could potentially leak sensitive information about system paths, environment, or internal state. Fix: Ensure sensitive information is not included in error messages displayed to users. Review panic messages and error output to verify no file paths or system details are unnecessarily exposed. - Low Β· SQLite History Storage Security β
src/store/sqlite.rs. The application stores execution history in SQLite (src/store/sqlite.rs). If the database file is not properly protected with file permissions, historical command outputs (which may contain sensitive data) could be accessed by other users on the system. Fix: Ensure SQLite database files are created with restrictive permissions (0600). Document that users should protect their viddy history database as it may contain sensitive command outputs. Consider adding encryption option for history database.
LLM-derived; treat as a starting point, not a security audit.
πWhere to read next
- Open issues β current backlog
- Recent PRs β what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals β see the live page for receipts. Re-run on a new commit to refresh.