Skip to main content
Glama
README.md
<div align="center">

**English** · [العربية](README.ar.md)

<img src="docs/hero-banner.png" alt="DevAnvil — Zero-Dependency Local Developer Studio & CLI" width="100%" />

<br />

[![Live Playground](https://img.shields.io/badge/Live_Playground-Try_in_Browser-f59e0b?style=for-the-badge)](https://abd77o.github.io/devanvil/)
[![npm](https://img.shields.io/npm/v/devanvil?style=for-the-badge&color=cb3837&label=npm)](https://www.npmjs.com/package/devanvil)
[![GitHub Release](https://img.shields.io/github/v/release/abd77o/devanvil?style=for-the-badge&color=10b981)](https://github.com/abd77o/devanvil/releases)
[![Zero Runtime Deps](https://img.shields.io/badge/Runtime_Deps-0-10b981?style=for-the-badge)](package.json)

[![CI](https://github.com/abd77o/devanvil/actions/workflows/ci.yml/badge.svg)](https://github.com/abd77o/devanvil/actions/workflows/ci.yml)
[![Node.js 20+](https://img.shields.io/badge/node-%3E%3D20.0.0-339933?style=flat-square)](https://nodejs.org)
[![TypeScript Strict](https://img.shields.io/badge/TypeScript-strict-3178c6?style=flat-square)](tsconfig.json)
[![Tests Passing](https://img.shields.io/badge/tests-64%2F64%20passing-10b981?style=flat-square)](tests/)
[![MCP Server](https://img.shields.io/badge/MCP_Server-16_Offline_Tools-38bdf8?style=flat-square)](#ai-agent-mcp-server)
[![License: MIT](https://img.shields.io/badge/license-MIT-f59e0b?style=flat-square)](LICENSE)
[![Offline First](https://img.shields.io/badge/privacy-100%25%20offline%20%7C%200%20telemetry-0f172a?style=flat-square)](SECURITY.md)

**Stop pasting production JWTs, `.env` secrets, OpenAPI specs, SSL certs, SQL query plans, Protobuf binaries, and logs into ad-filled websites.**  
**DevAnvil v2.1** is the sovereign, self-hosted, **zero-runtime-dependency**, **100% offline** developer platform combining **18 high-craft studios** + **16-tool AI Agent MCP Server** + **OpenAPI Contract Drift & Traffic Recorder** + **OAuth2 PKCE & Protobuf Wire Inspector** + **Chained API Test Runner** + **HTTP Load Benchmarker (with CI Thresholds)** + **Worker+VM Plugin Sandbox** in one runtime.

[Try Live Demo](https://abd77o.github.io/devanvil/) · [Quickstart](#30-second-quickstart) · [MCP Server](#ai-agent-mcp-server) · [Studio Gallery](#studio-gallery) · [18 Studios](#18-built-in-studios) · [Benchmarks](#performance-benchmarks) · [CLI & Examples](#cli-and-examples) · [Security](#security-by-design) · [Roadmap](docs/ROADMAP.md)

<br />

<img src="docs/demo.gif" alt="DevAnvil Interactive CLI & Studio Walkthrough" width="92%" />

</div>

---

## Why DevAnvil?

Developers routinely juggle 15+ browser tabs and heavy Electron apps for JWT inspection, JSON/YAML conversion, Regex debugging, API testing, OpenAPI mocking, Webhook catching, Secret redaction, and LLM token budgeting—often leaking sensitive company data to third-party websites.

Static browser toolkits cannot bypass CORS, cannot run a real HTTP Mock server, cannot stream live Webhooks over SSE, and cannot act as CI gates. **DevAnvil solves all of it with `0` runtime npm dependencies.**

| Capability | **DevAnvil v2.1** | Static Dev-Tool Sites | CyberChef | Cloud API Clients |
| :--- | :---: | :---: | :---: | :---: |
| **Zero runtime npm dependencies** | **Yes (`0`)** | No | No | No |
| **100% Offline & Zero Telemetry** | **Yes** | Varies | Yes | No (cloud/login) |
| **Built-In AI Agent MCP Server (16 Tools)** | **Yes (`devanvil mcp`)** | No | No | No |
| **OpenAPI Contract Drift + Traffic Recorder** | **Yes (`devanvil drift`)** | No | No | Paid / Separate |
| **OAuth 2.0/OIDC PKCE + Protobuf Wire Decoder** | **Yes (`pkce` / `proto`)** | No | No | No |
| **HTTP Load Benchmarker (RPS + P95/P99 + CI Gates)** | **Yes (`devanvil load`)** | No | No | Paid / Separate |
| **SQL EXPLAIN ANALYZE Visualizer (Postgres & SQLite)** | **Yes (`devanvil explain`)** | No | No | No |
| **Structured Log Analyzer & Error Fingerprinting** | **Yes (`devanvil logs`)** | No | No | No |
| **Zero-Trust Worker+VM Local Plugin API** | **Yes (48MB/500ms)** | No | No | Unsafe / None |
| **Git-Native `devanvil.json` + `{{env.VAR}}` + `.anvil` AES-256** | **Yes (`--workspace`)** | No | No | Cloud / Paid |
| **CLI Collection Runner + Request Chaining + JUnit XML** | **Yes (`devanvil run`)** | No | No | Heavy (Newman) |
| **TLS/X.509 Inspector + GraphQL + RFC 6455 WebSocket** | **Yes (Zero Deps)** | No | No | Partial |
| **Full-Repo & `--staged` Secret Scanner + SARIF + `.devanvilignore`** | **Yes (Web + CI Gate)** | No | No | No |
| **SSRF + DNS-Pinning + Strict CSP + Slowloris Defense** | **Yes** | N/A | N/A | Varies |

---

## 30-Second Quickstart

### Option 1: Instant Run via `npx` or Global `npm` (Node.js 20+)
```bash
npx devanvil serve
# or install globally:
npm install -g devanvil && devanvil serve
```

### Option 2: Homebrew (macOS / Linux)
```bash
brew install abd77o/tap/devanvil
devanvil serve
```

### Option 3: Try Instantly in Your Browser (Zero Install)
👉 **[Open DevAnvil Live Playground](https://abd77o.github.io/devanvil/)** — 100% client-side, zero network calls, zero login.

### Option 4: 1-Line Standalone Binary (SHA-256 Verified) or Docker (`read_only` + `cap_drop: ALL`)
```bash
curl -fsSL https://raw.githubusercontent.com/abd77o/devanvil/main/install.sh | bash
# or Docker:
git clone https://github.com/abd77o/devanvil.git && cd devanvil && docker compose up -d
```

> **Tip:** `npx devanvil serve` / `npm install -g devanvil` / `brew install abd77o/tap/devanvil` is ~200 KB and runs instantly with zero OS prompts. Standalone Node SEA binaries (~75–100 MB) are unsigned community builds — on macOS/Windows you may see a standard Gatekeeper/SmartScreen prompt on first run (every binary is verified fail-closed against its `.sha256` checksum by `install.sh` / `install.ps1`).

Open **`http://127.0.0.1:4321`** — press **`⌘K` / `Ctrl+K`** to jump across all **18 studios**, press **`⌘Enter` / `Ctrl+Enter`** to run the active studio action, or deep-link directly via URL hash (e.g. `/#jwt-studio`, `/#data-studio`). Need HTTP MCP transport? Send JSON-RPC 2.0 to **`POST http://127.0.0.1:4321/mcp`** (Streamable HTTP) or run **`devanvil mcp`** over `stdio`. Want Git-native persistence for your team's Collections, Environments & Mock routes? Run `devanvil serve --workspace ./devanvil.json` (use `{{env.SECRET}}` or gitignored `devanvil.local.json` to keep secrets out of Git!).

---

## AI Agent MCP Server

Give **Claude Code**, **Claude Desktop**, **Cursor**, or **Windsurf** **16 blazing-fast offline tools** (Secret Scanner + SARIF, `.env` Drift Validator, OpenAPI -> Mock, **OpenAPI Contract Drift Detector**, **Protobuf Wire Decoder**, JWT Audit, X.509 Certificate Inspector, SQL EXPLAIN Analyzer, Log Fingerprinting, ReDoS-safe Regex VM, Data Converter, Semantic JSON Diff, LLM Token Estimator, UUIDv7/ULID Generator, and Cron Explainer) with **zero dependencies**:

```bash
# Claude Code (1-line setup)
claude mcp add devanvil -- devanvil mcp
```

Or drop this into your Claude Desktop / Cursor / Windsurf MCP JSON config:

```json
{
  "mcpServers": {
    "devanvil": {
      "command": "devanvil",
      "args": ["mcp"]
    }
  }
}
```

---

## Studio Gallery

### 1. OpenAPI 3.x / Swagger -> Instant Live Mock Server
Paste any YAML/JSON OpenAPI spec, resolve `$ref` schemas safely, and mount every endpoint live to `/mock/*` in one click.

<div align="center">
  <img src="docs/studio-openapi.png" alt="DevAnvil OpenAPI to Live Mock Server Studio" width="100%" />
</div>

### 2. Offline Secret & `.env` Guard (18 Providers + 1-Click Redactor)
Detect leaked credentials & high-entropy keys completely offline, redact logs before sharing, and catch missing `.env` variables vs `.env.example`.

<div align="center">
  <img src="docs/studio-secrets.png" alt="DevAnvil Offline Secret Scanner and .env Guard Studio" width="100%" />
</div>

### 3. Offline LLM Token, Cost & Context Budget Studio
Estimate BPE tokens across English, Arabic, CJK & code for Claude, GPT, Gemini & Llama — and strip redundant tokens offline.

<div align="center">
  <img src="docs/studio-llm.png" alt="DevAnvil Offline LLM Token and Context Budget Studio" width="100%" />
</div>

---

## 18 Built-In Studios

### Network, API & Contracts
1. **API Studio** — CORS-free HTTP/HTTPS client with DNS/TTFB/Total timings, `{{VAR}}` & `{{env.SECRET}}` interpolation, **Record response -> Live `/mock/*`**, auto **Traffic Recording**, **Live SSE Stream Tester (with TTFT)**, Auth Helper, Save-to-Collection, cURL importer, and 4-language codegen.
2. **Workspaces, Import & MCP** — Git-native `devanvil.json` Collections & Environments manager with **Workspace Secret Audit**, gitignored `devanvil.local.json` overrides, **AES-256-GCM `.anvil` Encrypted Backups**, **Visual Assertions & Request Chaining Builder** (`devanvil run --junit`), **Postman v2.1 / HAR 1.2 / `.http` Importer**, and copy-ready **16-Tool MCP** configs.
3. **Contract, Auth & Protobuf (New in v2.1!)** — **OpenAPI Contract Drift Detector** (breaking vs warning drift + 0–100 score + `devanvil drift`), **Live Traffic Recorder -> Inferred OpenAPI 3.0.3 / Mocks / Collection**, **OAuth 2.0 / OIDC PKCE (S256) Debugger** (`devanvil pkce`), and **Zero-Dep Protobuf Binary Wire Decoder + `.proto` Schema Mapper** (`devanvil proto`).
4. **TLS, GraphQL & WebSocket** — **X.509 / SSL Certificate Inspector** (offline PEM + live SSRF-guarded TLS handshake), **GraphQL Studio** (queries, variables & 1-click Schema Introspection), and zero-dependency **RFC 6455 WebSocket Live Tester**.
5. **Mock & Live SSE Webhooks** — Dynamic Mock API server (`/mock/*`) with `:param` routes, custom latency/headers, template interpolation, plus a real-time **SSE Webhook Inspector** (`/hook/:channel`) with 1-click **Replay -> API Studio**.
6. **OpenAPI -> Instant Mock Server** — Parse OpenAPI 3.x / Swagger 2.0 YAML/JSON specs, resolve `$ref` schemas safely, and **mount every route live at `/mock/*` in one click**.

### Performance, Database & Extensibility
7. **Load Bench & SQL Explain** — Concurrent **HTTP Load & Latency Benchmarker** (RPS, P50/P90/P95/P99, Histogram, **Baseline Regression Diff** & **CI Threshold Gates `--max-p95`/`--min-rps`**) + **PostgreSQL & SQLite EXPLAIN ANALYZE Visualizer** with heat bars and automated bottleneck detection.
8. **Log Analyzer & Plugins** — **NDJSON / Server Log Analyzer** (UUID/IP/duration error fingerprinting, P50/P95/P99 latency & leaked secret detection) + **Hardened Zero-Trust Worker+VM Local Plugin Engine** (`~/.devanvil/plugins`, in-browser code editor, 48MB heap cap, 500ms hard terminate).

### Security & Identity
9. **JWT Studio** — Decode, automated **JWT Security Audits**, sign & verify **HS256/384/512, RS256, ES256**, and generate local RSA/EC keypairs.
10. **Secret & `.env` Guard** — 18 provider patterns + Shannon entropy + sequential alphabet filtering + `.devanvilignore` + `devanvil-ignore` + `devanvil scan --staged --sarif` + `.env` drift validator.
11. **Crypto, Encoding & IDs** — **AES-256-GCM**, SHA/BLAKE2/HMAC, CSPRNG Password Studio, batch **UUIDv7 / UUIDv4 / ULID / NanoID / API Keys**, and 10 codecs.

### Data, Code & Ops
12. **Data Studio** — Bidirectional **JSON ↔ YAML ↔ TOML ↔ CSV ↔ Query**, **Interactive JSON Tree Explorer** (1-click Copy JSONPath), **TypeScript & JSON Schema** codegen, **JSONPath**, and **SQL Formatter**.
13. **Diff Studio** — Prefix/suffix-trimmed LCS line diff + order-independent **Semantic JSON Structural Diff**.
14. **Regex & ReDoS Lab** — Highlighted matches, named groups, static ReDoS check, and isolated 250ms `node:vm` sandbox.
15. **Pipeline Lab ("Recipes")** — Chain up to 25 steps across 31 operations with starter recipes and trace.
16. **LLM Token & Context Budget Studio** — Offline BPE-calibrated multi-script tokenizer, cost gauges & Smart Context Compactor.
17. **Cron & Time Studio** — Jump-optimized 5/6-field Cron parser + auto-detecting Epoch ↔ ISO-8601 ↔ RFC-2822 converter.
18. **Network, Chmod & Color** — IPv4 CIDR subnet calculator, Linux `chmod` matrix, **WCAG 2.1** color contrast checker & HTTP Status reference.

---

## Performance Benchmarks

Measured locally on **Node.js v20.20.2** with zero runtime dependencies. Reproduce anytime via `npm run bench`:

| Operation | Throughput (Ops/sec) | Avg Latency |
| :--- | ---: | ---: |
| RFC 9562 UUIDv7 generation | **272,389 /s** | **3.7 µs** |
| SQL EXPLAIN Plan + Bottleneck Analyzer | **124,901 /s** | **8.0 µs** |
| Postman v2.1 Import -> Requests + Mocks | **61,237 /s** | **16.3 µs** |
| Secret Scanner + Redaction (18 rules + entropy) | **52,100 /s** | **19.2 µs** |
| MCP JSON-RPC Tool Call (UUIDv7 batch) | **46,814 /s** | **21.4 µs** |
| JWT HS256 cryptographic verify (timing-safe) | **45,961 /s** | **21.8 µs** |
| JSON -> YAML conversion | **22,025 /s** | **45.4 µs** |
| OpenAPI 3.0 YAML -> Mock synthesis | **17,226 /s** | **58.1 µs** |
| Semantic JSON Structural Diff | **17,136 /s** | **58.4 µs** |
| Cron next-5 (sparse leap-day `0 0 29 2 *`) | **13,899 /s** | **71.9 µs** |
| 3-step Data Pipeline (`trim -> sort -> yaml`) | **11,348 /s** | **88.1 µs** |
| Structured Log Fingerprinting (20 lines) | **6,981 /s** | **143.3 µs** |
| 1,500-line LCS Diff (prefix/suffix optimized) | **4,042 /s** | **247.4 µs** |
| VM-guarded Regex match + ReDoS analysis | **1,497 /s** | **668.1 µs** |
| Live HTTP Mock Endpoint (`/mock/health`) | **1,287 /s** | **777.0 µs** |

Static UI assets are served from an in-memory cache with **SHA-256 `ETag` (`304 Not Modified`)** and **pre-compressed Gzip**.

---

## CLI and Examples

Explore the ready-to-run files in [`examples/`](examples/):

```bash
# 1. Start Local Studio with Git-native workspace persistence (Collections + Envs + Mocks)
devanvil serve --workspace ./devanvil.json

# 2. Run API Collection Tests with Request Chaining, Assertions & JUnit XML (0-dep Newman!)
devanvil run ./devanvil.json --env Staging --junit test-results.xml

# 3. Concurrent HTTP Load & Latency Benchmark (0-dep k6-lite: RPS, P50/P90/P95/P99 & Histogram)
devanvil load https://httpbin.org/get -c 10 -n 100

# 4. Analyze PostgreSQL EXPLAIN JSON or SQLite Query Plan for bottlenecks & missing indexes
devanvil explain query-plan.json

# 5. Analyze NDJSON/Server Logs (Error Fingerprinting + P95 latency + Secret leak check)
cat app.log | devanvil logs

# 6. Scaffold & run Zero-Trust VM Sandboxed Local Plugins (~/.devanvil/plugins)
devanvil plugins scaffold my-tool
devanvil plugins run my-tool "hello\nworld"

# 7. Inspect SSL/TLS certificates (live domain OR local .pem file)
devanvil tls example.com

# 8. Run DevAnvil as a zero-dependency MCP Server (14 tools) for Claude Code / Cursor / Windsurf
devanvil mcp

# 9. Scan Git staged changes (pre-commit) or full repo -> SARIF 2.1.0
devanvil scan --staged
devanvil scan . --sarif > devanvil-secrets.sarif

# 10. Import Postman v2.1, browser HAR 1.2, or .http files -> devanvil.json workspace
devanvil import postman collection.json --out devanvil.json

# 11. Spin up a live Mock API server straight from an OpenAPI YAML spec
devanvil openapi examples/petstore-openapi.yaml --serve --port 4321
```

---

## Architecture

<div align="center">
  <img src="docs/architecture.png" alt="DevAnvil Clean 4-Layer Architecture" width="100%" />
</div>

See [docs/architecture.md](docs/architecture.md) for full details.

---

## Security by Design

Verified continuously by our dedicated adversarial security & integration test suite (`tests/` — **50/50 tests passing**). Full threat model in [SECURITY.md](SECURITY.md).

- **Zero Runtime Dependencies (`"dependencies": {}`)**: `npm audit` reports **0 vulnerabilities** and zero transitive supply-chain surface.
- **SSRF & DNS-Rebinding Guard**: Blocks loopback, RFC1918, `169.254.169.254` (Cloud IMDS), CGNAT, NAT64, IPv4-mapped IPv6, and non-HTTP schemes by default; pins validated IPs on sockets; strips `Authorization`/`Cookie` on cross-origin redirects.
- **Strict CSP & Zero `innerHTML`**: Served with `default-src 'self'; script-src 'self'; object-src 'none'` — zero inline scripts, zero external CDNs, zero unsafe DOM sinks.
- **Prototype Pollution & Circular `$ref` Defense**: Null-prototype parsers across JSON, YAML, TOML, CSV, QueryString, JSONPath, OpenAPI & `.env`.
- **ReDoS, Zip-Bomb & Slowloris Guards**: Every built-in secret regex is verified ReDoS-safe; user regex runs inside an isolated `node:vm` 250ms sandbox; decompression capped at 10 MB; strict HTTP timeouts (`headersTimeout`, `requestTimeout`, `maxHeadersCount`).

---

## Roadmap & Contributing

Check out our [Public Roadmap](docs/ROADMAP.md) and open [`good first issue`](https://github.com/abd77o/devanvil/labels/good%20first%20issue) tickets! Contributions of new studios, benchmarks, docs, and security audits are warmly welcome — see [CONTRIBUTING.md](CONTRIBUTING.md).

<div align="center">
  <img src="docs/logo.png" alt="DevAnvil Official Emblem" width="84" />
  <br />
  <sub>If <strong>DevAnvil</strong> replaces 15 browser tabs and keeps your secrets off random websites, give it a <strong>★ Star</strong>!</sub>
</div>

---

## License

Released under the [MIT License](LICENSE) © 2026 [abd77o](https://github.com/abd77o).

TDQS

A3.6/5.0

Scored across 16 tools

Disambiguation4/5

Each of the 16 tools has a clearly differentiated purpose, and the descriptions make the boundaries readable. The only mild overlaps are devanvil_scan_secrets vs devanvil_scan_directory (both secret scanning, differentiated only by input source) and the two OpenAPI tools (mock generation vs contract drift), plus analyze_logs reporting secret counts.

Naming Consistency4/5

All names share a consistent devanvil_ prefix in snake_case, which is very predictable. The only deviation is the verb pattern: some are verb_noun (check_env, scan_secrets, generate_id, decode_protobuf) while others are noun-based (jwt_audit, semantic_diff, regex_test, llm_tokens), but this is minor and still readable.

Tool Count4/5

Sixteen tools is at the upper edge of a comfortable set, but this is a deliberate multi-purpose dev toolbox where each entry is a genuinely distinct utility. No tool feels like filler or a duplicate of another, so the count is justified by the breadth of the domain.

Completeness4/5

For a grab-bag developer utility server, coverage is broad and each function appears self-contained: env validation, data conversion, secret scanning (text and directory with SARIF), JWT, regex, diffing, tokens, IDs, cron, certs, SQL, logs, contract drift, and protobuf. As a general-purpose toolbox it can never be exhaustively complete, but no obvious dead end stands out for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues