# DevPulse
```
╔══════════════════════════════════════════════════════════════════════════╗
║ ║
║ ██████╗ ███████╗██╗ ██╗██████╗ ██╗ ██╗██╗ ███████╗███████╗ ║
║ ██╔══██╗██╔════╝██║ ██║██╔══██╗██║ ██║██║ ██╔════╝██╔════╝ ║
║ ██║ ██║█████╗ ██║ ██║██████╔╝██║ ██║██║ ███████╗█████╗ ║
║ ██║ ██║██╔══╝ ╚██╗ ██╔╝██╔═══╝ ██║ ██║██║ ╚════██║██╔══╝ ║
║ ██████╔╝███████╗ ╚████╔╝ ██║ ╚██████╔╝███████╗███████║███████╗ ║
║ ╚═════╝ ╚══════╝ ╚═══╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝╚══════╝ ║
║ ║
║ Take the pulse of your dev environment ⚡ ║
║ ║
╚══════════════════════════════════════════════════════════════════════════╝
```
[](https://github.com/Brutus1066/devpulse/actions/workflows/ci.yml)
[](https://www.rust-lang.org/)
[](https://opensource.org/licenses/MIT)

[](https://www.microsoft.com/windows)
[](https://www.linux.org/)
[](https://www.apple.com/macos)
[](https://crates.io/crates/devpulse)
> Developer diagnostics in a single binary. TUI dashboard, HTTP timing, port scanning, environment analysis, build cleanup, and config conversion — all from one fast Rust CLI.
---
## 🎯 What is DevPulse?
DevPulse is an all-in-one developer environment diagnostics toolkit. Instead of juggling dozens of scattered tools (`curl`, `lsof`, `netstat`, `httpstat`, `npkill`, `jq`, ...), DevPulse gives you everything in **one binary, one command: `devpulse`**.
- 🖥️ **Interactive TUI** — Beautiful terminal dashboard with keyboard navigation
- ⚡ **Fast** — Parallel scanning, zero async, pure Rust performance
- 🌐 **Cross-platform** — Windows, Linux, macOS — same binary, same features
- 📋 **JSON output** — Every command supports `--json` for scripting and CI
- 🔒 **Safe** — Zero `unsafe` code, confirmation before all deletions
- 🦀 **Single binary** — No runtime dependencies, no config files, no setup
---
## ✨ Features
| 🖥️ **TUI Dashboard** | Interactive terminal UI with arrow-key navigation | — |
| 🩺 **Doctor** | Dev tool health checker (Git, Node, Rust, Python, Docker, disk, SSH) | `flutter doctor` |
| 🔌 **Ports** | Parallel port scanner with banner grabbing, PIDs, 36+ service hints | `lsof` / `nmap` |
| 🌍 **Env** | PATH analyzer, dev vars, proxy, CI, `.env`, Git config & SSH key audit | — |
| 🧹 **Sweep** | Build artifact scanner & cleaner (node_modules, target, etc.) | `npkill` |
| ⏱️ **HTTP** | Request timing with DNS/TCP/TLS/TTFB breakdown, security audit (A-F), TLS cert, redirects | `httpstat` |
| 🔄 **Convert** | Config converter: JSON ↔ YAML ↔ TOML ↔ .env with dot-flattening | — |
---
## 📸 Screenshots
### TUI Dashboard

### Doctor — Health Check

### Ports — Port Scanner

### About

---
## 📦 Installation
### From crates.io
```sh
cargo install devpulse
```
### From source
```sh
git clone https://github.com/Brutus1066/devpulse.git
cd devpulse
cargo build --release
# Binary at: target/release/devpulse(.exe)
```
### Pre-built Binaries
Download from [Releases](https://github.com/Brutus1066/devpulse/releases):
| Windows x86_64 | `devpulse-windows-x64.exe` |
| Linux x86_64 | `devpulse-linux-x64` |
| macOS x86_64 | `devpulse-macos-x64` |
| macOS ARM64 | `devpulse-macos-arm64` |
---
## 🚀 Quick Start
```sh
# Launch interactive TUI dashboard (no args needed)
devpulse
# Or use CLI subcommands directly:
devpulse doctor # Health-check your dev toolchain
devpulse ports # See what's listening on your ports
devpulse env # Analyze PATH, dev vars, .env files
devpulse sweep ~/projects # Find build artifacts
devpulse http https://api.github.com # Time HTTP requests
devpulse convert config.yaml --to json # Convert config formats
```
---
## 🖥️ Interactive TUI
Run `devpulse` with no arguments to launch the interactive dashboard:
| ↑↓ / j/k | Navigate menu |
| 1–7 | Quick select tool (from any screen) |
| Enter | Run selected tool |
| Tab / Shift+Tab | Cycle through tools |
| r | Re-run current tool (refresh) |
| F1 / ? | Help screen |
| ↑↓ / PgUp/PgDn / Home/End | Scroll results |
| Esc | Back to menu |
| q | Quit |
DevPulse auto-detects interactive terminals. In non-TTY environments (CI, piped), it falls back to CLI help output.
---
## 📖 CLI Reference
```
$ devpulse --help
Developer diagnostics: HTTP timing, build artifact cleanup, environment
health checks, port scanning, PATH analysis, and config format conversion
Usage: devpulse [OPTIONS] [COMMAND]
Commands:
doctor Dev environment health checker
ports Listening port inspector & scanner
env Environment variable analyzer
sweep Build artifact scanner/cleaner
http HTTP request timing visualizer
convert Config format converter
completions Generate shell completions
help Print help for a command
Options:
--json Output in JSON format
--color <auto|always|never> Control colored output
-h, --help Print help
-V, --version Print version
### 🩺 `doctor` — Toolchain Health Check
Checks Git, Node.js, Rust, Python, Docker, disk space, and SSH keys. Reports pass/warn/fail for each. All 7 checks run **in parallel** for maximum speed.
```sh
devpulse doctor
devpulse doctor --json # JSON output for CI
```
### 🔌 `ports` — Port Scanner & Network Inspector
Shows listening TCP ports with PID, process name, service hints, and network address binding. Includes **parallel scanning** powered by rayon and **banner grabbing** with protocol-specific probes.
```sh
devpulse ports # All listening ports
devpulse ports --port 3000 # Filter by port
devpulse ports --scan-range 8000-9000 # Scan custom port range
devpulse ports --json # JSON output
```
**Service detection** covers 36+ well-known ports: SSH (22), HTTP (80/8080), HTTPS (443), MySQL (3306), PostgreSQL (5432), Vite (5173), Redis (6379), MongoDB (27017), Docker (2375), and more.
**Banner grabbing** — For each open port, DevPulse sends protocol-specific probes:
- HTTP ports: `HEAD / HTTP/1.0` → extracts `Server` header
- Redis: `PING` → expects `PONG`
- Generic: reads initial banner bytes
### 🌍 `env` — Environment Analyzer
Analyzes PATH (duplicates, missing dirs, tool discovery), dev environment variables, proxy settings, CI detection, `.env` file scanning, Git configuration audit, and SSH key security audit.
```sh
devpulse env # Full report
devpulse env --filter path # PATH analysis only
devpulse env --filter proxy # Proxy vars only
devpulse env --filter dotenv # .env file report
devpulse env --json # JSON output
```
**Git Config audit** — Reads 7 global Git keys (user.name, user.email, commit.gpgsign, core.editor, core.autocrlf, credential.helper, init.defaultBranch) with warnings for missing identity and unsigned commits.
**SSH Key audit** — Scans `~/.ssh/*.pub` for key type (RSA/ED25519/ECDSA/DSA), bit strength, and age. Warns on weak keys (RSA < 3072), old keys (> 2 years), and deprecated algorithms (DSA).
### 🧹 `sweep` — Build Artifact Scanner
Finds and optionally deletes build artifacts: `node_modules`, `target/`, `__pycache__`, `.gradle`, `.next`, `venv`, `dist`, `.tox`, and more.
```sh
devpulse sweep . # Scan current directory
devpulse sweep ~/projects --min-size 100M # Only show > 100 MB
devpulse sweep . -y # Delete all found artifacts
devpulse sweep . --json # JSON output
```
### ⏱️ `http` — HTTP Timing & Security Audit
Measures DNS lookup, TCP connect, TLS handshake, server processing (TTFB), and content transfer. Includes **security header audit** with A-F grading, **TLS certificate inspection**, and **redirect chain tracing**.
```sh
devpulse http https://api.github.com
devpulse http -X POST -H "Content-Type: application/json" \
-d '{"key":"val"}' https://httpbin.org/post
devpulse http https://example.com --json
```
**Security audit** — Checks 8 critical HTTP security headers (HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, X-XSS-Protection, COOP) with weighted **A-F grade**.
**TLS certificate** — Extracts subject, issuer, validity dates, days until expiry, key algorithm & size, and SANs via x509-parser.
**Redirect chain** — Follows HTTP redirects (301/302/303/307/308) up to 10 hops with per-hop timing.
### 🔄 `convert` — Config Format Converter
Converts between JSON, YAML, TOML, and .env with auto-detection from file extension. Nested structures are dot-flattened for .env output.
```sh
devpulse convert config.yaml --to json # YAML → JSON
devpulse convert settings.json --to toml # JSON → TOML
devpulse convert app.toml --to env # TOML → .env
devpulse convert .env --to yaml # .env → YAML
devpulse convert config.yaml --to json -o out.json # Write to file
```
---
## ⚙️ Global Flags
| `--json` | Output in JSON format (all subcommands) |
| `--color <auto\|always\|never>` | Control colored output. Respects `NO_COLOR` |
| `--version` | Print version |
| `--help` | Print help |
---
## 🐚 Shell Completions
```sh
devpulse completions bash > ~/.local/share/bash-completion/completions/devpulse
devpulse completions zsh > ~/.zfunc/_devpulse
devpulse completions fish > ~/.config/fish/completions/devpulse.fish
devpulse completions powershell > devpulse.ps1 # dot-source in $PROFILE
```
---
## 🔒 Security & Safety
| 🚫 Zero `unsafe` code | Pure safe Rust throughout |
| 🚫 Zero `.unwrap()` | All errors handled with `thiserror` |
| 🔒 CRLF injection prevention | HTTP headers validated for injection attacks |
| 🔒 TCP timeouts | 30s read / 10s write to prevent hanging |
| 🔒 Body size cap | 10 MB max response body to prevent OOM |
| ✅ UTF-8 safe truncation | No panics on multi-byte characters |
| ✅ Confirmation before delete | Sweep requires explicit confirmation |
| ✅ Selective deletion | Type `1,3,5` to delete specific items |
| ✅ Offline | sweep, doctor, env, ports work fully offline |
---
## 🛠️ Building
```sh
# Debug build
cargo build
# Release build (optimized, LTO, stripped)
cargo build --release
# Run tests
cargo test
# Lint
cargo clippy -- -D warnings
# Format check
cargo fmt -- --check
```
---
## 🧪 Tests
79 tests — all passing ✓
```
64 unit tests across 11 modules
15 integration tests (end-to-end CLI pipeline)
0 failures
```
```sh
cargo test # Run all tests
cargo clippy # Zero warnings
```
---
## 🏗️ Project Structure
```
src/
main.rs — Entry point, Windows VT bootstrap, TUI/CLI dispatch
cli.rs — clap derive definitions (6 subcommands + global flags)
error.rs — Unified thiserror error types
utils.rs — Shared utilities (format_size, safe_truncate)
tui.rs — Interactive ratatui/crossterm TUI dashboard
doctor.rs — Dev environment health checker (7 parallel checks)
ports.rs — Parallel port scanner + banner grabbing + network scan
env.rs — PATH analyzer, dev vars, proxy, CI, .env, Git, SSH audit
sweep.rs — Build artifact scanner/cleaner
http.rs — HTTP timing + security audit + TLS cert + redirects
convert.rs — Config converter: JSON ↔ YAML ↔ TOML ↔ .env
tests/
integration_tests.rs — CLI exit code & JSON output tests
```
### Design Principles
- **Zero async** — Pure synchronous Rust, no runtime overhead
- **One module per feature** — Clean separation of concerns
- **`thiserror`** for all errors — No `process::exit()` calls in library code
- **`serde`** JSON on everything — All outputs are machine-readable
- **Cross-platform** — Windows/macOS/Linux with compile-time `#[cfg]` guards
- **LTO + strip** — Release binary ~2 MB, fully self-contained
---
## 📋 Dependencies
All pure Rust. No OpenSSL. No system libraries.
| clap 4.4 | CLI argument parsing with derive |
| ratatui 0.29 | Terminal UI framework |
| crossterm 0.28 | Cross-platform terminal control |
| serde 1.0 + serde_json 1.0 | Serialization & JSON |
| serde_yml 0.0.12 | YAML support (replaces deprecated serde_yaml) |
| toml 0.8 | TOML support |
| thiserror 1.0 | Error handling |
| colored 2.1 | CLI colored output |
| walkdir 2.5 | Directory walking |
| rayon 1.10 | Parallel scanning |
| native-tls 0.2 | TLS connections |
| x509-parser 0.16 | TLS certificate inspection |
| sysinfo 0.32 | System information |
---
## 🪟 Windows / PowerShell
DevPulse works great in PowerShell 5.1, PowerShell 7, and Windows Terminal:
- **Colors** — Automatically enables Virtual Terminal processing
- **TUI** — Full interactive dashboard via ratatui + crossterm
- **NO_COLOR** — Respects the `NO_COLOR` environment variable
- **Globs** — Uses `wild` crate so `devpulse sweep *` works correctly
- **Exit codes** — Returns proper exit codes for `$LASTEXITCODE` checks
---
## 🐸 LazyFrog Toolkit
| [DevPulse](https://github.com/Brutus1066/devpulse) | Dev environment diagnostics | `devpulse` | `cargo install devpulse` |
| [QuickCrypt](https://github.com/Brutus1066/QuickCrypt) | Offline crypto toolkit | `qc` | `cargo install quickcrypt` |
| [QuickTransform](https://github.com/Brutus1066/QuickTransform) | Encode/decode/hash toolkit | `qt` | `cargo install quicktransform` |
| [portr](https://github.com/Brutus1066/portr) | Port inspector & process killer | `portr` | `cargo install portr` |
| [envcraft](https://github.com/Brutus1066/envcraft) | .env file validator/differ/formatter | `envcraft` | `cargo install envcraft` |
---
## 📄 License
This project is licensed under the MIT License — see the [LICENSE](LICENSE) file for details.
---
## 🐸 About
DevPulse is developed by **LazyFrog** at [kindware.dev](https://kindware.dev/).
- 📧 Support: [support@kindware.dev](mailto:support@kindware.dev)
- 🐙 GitHub: [github.com/Brutus1066/devpulse](https://github.com/Brutus1066/devpulse)
- 🌐 Website: [kindware.dev](https://kindware.dev/)
---
*Take the pulse of your dev environment.*