navex

A 4 MB HTTP scenario runner with an embedded JS engine. Scrape with CSS selectors, probe a site's forms with validated selectors, replay flows offline, and classify challenge gates instead of guessing.

Documentation

navex

navex — free & open source, maintained, updates planned

Ultra-light HTTP scenario runner — 5.1 MB binary, ~7 MB RAM, no browser.

Français · Deutsch · Español · Italiano · Português · Nederlands · Polski · Русский · Türkçe · العربية · 中文 · 日本語 · 한국어 · हिन्दी · Indonesia

navex replays declarative HTTP scenarios and produces a machine-readable report. It is built for CI, QA and behaviour measurement: verify that a service answers, that a protected page redirects, or that an edge/CDN classifies a client the way you expect.

Why it exists

Running a full browser to send three HTTP requests is wasteful. navex keeps the useful parts — TLS behaviour, headers, cookies, redirects, an embedded JS engine — and drops the rendering stack.

Features

  • Declarative TOML scenarios: steps, regex captures, verdict rules
  • Two backends: builtin (ureq + rustls) and curl_cffi (browser TLS fingerprint)
  • Embedded QuickJS engine with a restricted simulated DOM (navigator, screen, canvas, cookies, crypto). Memory and time are bounded; no host object is exposed
  • Human input simulation: Bézier mouse paths following Fitts's law, keystroke dwell/flight timings, cursor position preserved across steps
  • Configurable session rotation (per run count, on verdict, or after N minutes)
  • Optional ad/tracker blocklist to keep the simulated DOM stable
  • Resumable JSONL report, plus a local debug UI (--ui)

Documentation

Full documentation lives in wiki/:

PageContent
Getting startedinstall, first run, first scenario
CLI referenceevery command and flag
Scenariosthe TOML format step by step
Enginesbuiltin vs curl_cffi, TLS fingerprints
JS engineQuickJS, simulated DOM, limits
Profilesdevice coherence, 2^64 configurations
Proxiesrotation, verification, exit-IP detection
Challenges13 types, sitekey extraction, solver config
Verdictswhat each outcome means
Debug UI--ui, /state, /metrics
Architecturemodules, data flow, isolation
Troubleshootingthe errors you will actually hit

For AI agents

One command to load the operator guide:

curl -s https://raw.githubusercontent.com/pecorio-dev/navex/master/PROMPT.md

MCP server, installed from PyPI:

pip install navex-mcp          # 7.5 KB, no required dependency
pip install navex-mcp[fetch]   # adds curl_cffi for navex_fetch / navex_google

MCP (stdio) exposes the runner to any agent:

{
  "mcpServers": {
    "navex": { "command": "python3", "args": ["/path/to/navex/mcp/server.py"] }
  }
}

Tools: navex_run (scenario → report), navex_fetch (single request + gate detection), navex_google (search with gate detection).

Install

cargo build --release
./target/release/navex --help

Quick start

navex run --site scenarios/app.toml
navex run --site scenarios/app.toml --proxies egress.txt --workers 8 --out report.jsonl
navex run --site scenarios/app.toml --var token=abc --cookie-jar session.json
navex run --site scenarios/app.toml --ui 7899
navex extract --url https://example.com --select 'a@href' --all
navex import session.har --out scenarios/site.toml
navex diff before.jsonl after.jsonl

Verdicts

OK, REFUSED, CHALLENGE, AUTH_REQUIRED, RATE_LIMITED, NOT_FOUND, TIMEOUT, ERREUR.

A detected challenge is never reported as a credential failure: AUTH_REQUIRED means the site answered and wants a session; CHALLENGE means a bot-defence layer answered instead of the site.

What it costs

Measured with /usr/bin/time -f %M (peak RSS of the process).

Use caseRSSNote
--help4.8 MBbare binary
one simple scenario7.4 MBthe usual case
4 workers7.9 MBthreads are cheap
dom / page (real DOM)13-15 MBlinkedom tree
[engine] webgl = true75 MBMesa + driver, opt-in only

WebGL is off by default for this reason: it costs ten times the rest. A 256 MB VPS will feel it.

Measured

MetricValue
Release binary5 128 064 bytes
RSS, 4 workers6 908 KB
Tests61 (58 unit + 1 integration)
Live HTTP request200, 49 ms

Responsibility

This is a testing and measurement tool. It ships with no accounts, no credentials and no targets.

The author is not responsible for how it is used. You alone are responsible for complying with the terms of service of the services you query, with applicable law, and with the data you process. Use it only on systems you are authorised to test.

Licence

MIT