Skip to content

Latest commit

 

History

History
121 lines (86 loc) · 3.75 KB

File metadata and controls

121 lines (86 loc) · 3.75 KB

DevFlow CLI

A fast developer productivity CLI built in Rust. Generates changelogs from git history, analyzes log files for error patterns, and reports project statistics with language breakdowns.

Rust License

Why This Exists

Most developer tools are written in JavaScript or Python. This CLI is built in Rust for speed: it processes log files at 500K+ lines/second and scans entire project trees in milliseconds. It also demonstrates systems programming skills that complement a web-focused portfolio.

Features

devflow changelog

Generates structured changelogs from git commit history. Parses conventional commit format (feat:, fix:, chore:, etc.), groups by type, and outputs as colored terminal text or JSON.

devflow logs

Analyzes log files for patterns. Counts log levels, identifies the most frequent error messages, and reports parse speed. Supports level filtering and JSON output.

devflow stats

Scans a project directory and reports file counts, line counts, and size by language. Recognizes 20+ languages, skips common non-source directories (node_modules, target, .git, etc.).

Installation

# Clone and build
git clone https://github.com/ctonneslan/devflow-cli.git
cd devflow-cli
cargo build --release

# Binary is at target/release/devflow-cli
# Optionally copy to PATH:
cp target/release/devflow-cli /usr/local/bin/devflow

Usage

Changelog

# Generate changelog from last 50 commits
devflow changelog

# Last 20 commits, only features
devflow changelog --count 20 --filter-type feat

# Since a specific date, as JSON
devflow changelog --since 2026-01-01 --format json

Log Analysis

# Analyze a log file
devflow logs --path /var/log/app.log

# Show only ERROR lines
devflow logs --path app.log --level error

# Top 5 most frequent errors, as JSON
devflow logs --path app.log --top 5 --format json

Project Stats

# Current directory
devflow stats

# Specific directory, JSON output
devflow stats --dir ~/projects/my-app --format json

Example Output

Project Statistics

Total:  147 files, 12,430 lines, 892.3 KB
Scan time:  6 ms

Language Breakdown:
  Language          Files      Lines       Size      %
  ────────────────────────────────────────────────────
  TypeScript           48       5,210   180.2 KB  41.9% ████████████
  Python               23       3,100   102.1 KB  24.9% ███████
  Rust                 12       2,340    89.4 KB  18.8% █████
  Go                    8       1,200    45.6 KB   9.7% ██
  YAML                  6         580    15.0 KB   4.7% █

Tech Stack

Component Technology Why
Language Rust Performance, safety, zero-cost abstractions
CLI parsing clap 4 Derive macros, automatic help generation
Regex regex crate Fast pattern matching for log parsing
Directory traversal walkdir Recursive iteration with filtering
Serialization serde + serde_json JSON output support
Terminal colors colored Cross-platform ANSI color output

Project Structure

src/
├── main.rs        # CLI argument parsing and command dispatch
├── changelog.rs   # Git log parsing and changelog generation
├── logs.rs        # Log file analysis and pattern detection
└── stats.rs       # Project directory scanning and language detection

Performance

  • Log analysis: 500K+ lines/second on standard hardware
  • Project scan: Full Next.js project (20K files) in under 100ms
  • Binary size: ~3MB release build

License

MIT