Environment Variables¶
Configure recurl behavior through environment variables.
Available Variables¶
| Variable | Description | Default |
|---|---|---|
RECURL_STRICT | Enable strict mode | (disabled) |
RECURL_DEBUG | Enable debug output | (disabled) |
RECURL_DAEMON_IDLE_MS | Daemon idle timeout in ms | 60000 |
RECURL_POOL_MIN | Minimum browser pool size (daemon) | 1 |
RECURL_POOL_MAX | Maximum browser pool size (daemon) | 3 |
RECURL_ENGINE_PATH | Explicit path to upstream curl binary | (auto-detect) |
RECURL_VERSION | Pin version for the install script | latest |
RECURL_INSTALL_DIR | Override install prefix for the install script | (auto) |
RECURL_STRICT¶
Enable strict mode (no fallback).
# Enable strict mode
export RECURL_STRICT=1
# All recurl commands now run in strict mode
recurl https://example.com
Equivalent to --recurl-strict flag.
Values¶
1,true,yes- Enable0,false,no, (unset) - Disable
RECURL_DEBUG¶
Enable debug output.
# Enable debug output
export RECURL_DEBUG=1
# See escalation steps
recurl https://protected-site.com
# [recurl] curl_engine: 403 Cloudflare
# [recurl] Escalating: impersonation
# ...
Equivalent to --recurl-debug flag.
Values¶
1,true,yes- Enable0,false,no, (unset) - Disable
RECURL_DAEMON_IDLE_MS¶
Set the daemon idle timeout in milliseconds.
# Keep daemon alive for 5 minutes
export RECURL_DAEMON_IDLE_MS=300000
# Run JS preflight requests
recurl --recurl-js https://example.com
The daemon shuts down after this period of inactivity.
Default¶
60000(60 seconds)
Recommendations¶
| Use Case | Value |
|---|---|
| Interactive use | 60000 (default) |
| Batch processing | 300000 (5 minutes) |
| One-off requests | 10000 (10 seconds) |
| Long-running scripts | 600000 (10 minutes) |
RECURL_POOL_MIN / RECURL_POOL_MAX¶
Control the headless Chromium pool size maintained by recurld. The daemon keeps at least RECURL_POOL_MIN browser instances warm and grows up to RECURL_POOL_MAX under load.
# Keep two browsers warm at all times, allow up to six concurrent
export RECURL_POOL_MIN=2
export RECURL_POOL_MAX=6
Defaults: RECURL_POOL_MIN=1, RECURL_POOL_MAX=3.
RECURL_ENGINE_PATH¶
Override the lookup path for the underlying curl engine. recurl normally searches the bundled install location and $PATH; set this to point at a specific curl binary.
If the engine cannot be located, recurl exits with an error suggesting that this variable be set.
RECURL_VERSION / RECURL_INSTALL_DIR¶
Used by the official install.sh / install.ps1 shell installers:
RECURL_VERSION– pin to a specific release tag (e.g.v0.1.2); defaults tolatest.RECURL_INSTALL_DIR– override the install prefix (default is chosen based on whether the script is run as root).
RECURL_VERSION=v0.1.2 RECURL_INSTALL_DIR=/opt/recurl \
curl -fsSL https://recurl.dev/install.sh | bash
Usage Examples¶
Shell Profile¶
Add to your shell profile for persistent configuration:
Per-Command¶
Set for a single command:
# Debug this request only
RECURL_DEBUG=1 recurl https://example.com
# Strict mode for this request
RECURL_STRICT=1 recurl https://example.com
Script Usage¶
#!/bin/bash
# Enable debug for the entire script
export RECURL_DEBUG=1
# Increase daemon timeout for batch processing
export RECURL_DAEMON_IDLE_MS=300000
# Multiple requests
for url in "${urls[@]}"; do
recurl --recurl-js "$url" -o "output_$(basename $url).html"
done
Priority¶
Command-line flags take priority over environment variables:
# RECURL_DEBUG=1 is set
# But --recurl-debug is not passed
recurl https://example.com # Debug enabled (from env)
# Flag overrides environment
RECURL_DEBUG=1 recurl --recurl-strict https://example.com # No debug (strict mode)