earl

Configuration

Config file reference — network policies, OAuth profiles, sandbox, and search

Config file: ~/.config/earl/config.toml. All sections are optional.

File Locations

PathPurpose
~/.config/earl/config.tomlMain configuration
~/.config/earl/templates/*.hclGlobal templates
./templates/*.hclWorkspace templates (override global)
~/.local/state/earl/secrets-index.jsonSecret metadata index
~/.cache/earl/search-index-v1.jsonSearch cache

Full Example

# --- Network ---

[[network.allow]]
scheme = "https"
host = "api.github.com"
port = 443
path_prefix = "/"

[network.proxy_profiles.corp]
url = "https://proxy.corp.example.com:8080"

# --- Auth ---

[auth.profiles.github]
flow = "device_code"
client_id = "your-client-id"
token_url = "https://github.com/login/oauth/access_token"
device_authorization_url = "https://github.com/login/device/code"
scopes = ["repo", "read:org"]

# --- Sandbox ---

[sandbox]
bash_max_time_ms = 30000
bash_max_output_bytes = 1048576
bash_allow_network = false
sql_force_read_only = true
sql_max_rows = 1000
sql_connection_allowlist = ["myapp.db_url"]

# --- Search ---

[search]
top_k = 40
rerank_k = 10

[search.local]
embedding_model = "BGESmallENV15Q"
reranker_model = "JINARerankerV1TurboEn"

[search.remote]
enabled = true
base_url = "https://search.example.com"
api_key_secret = "search.api_key"
embeddings_path = "/embeddings"
rerank_path = "/rerank"
openai_compatible = true
timeout_ms = 10000

Network Allowlist

[[network.allow]] restricts outbound HTTP traffic. Without any entries, all destinations are allowed. With one or more entries, requests must match at least one rule.

FieldTypeRequiredDescription
schemestringYeshttps or http
hoststringYesExact hostname
portu16YesTCP port (usually 443)
path_prefixstringYesOnly paths starting with this prefix are allowed

Proxy Profiles

Named proxy profiles under [network.proxy_profiles.<name>]. Templates reference them via transport.proxy_profile.

[network.proxy_profiles.corp]
url = "https://proxy.corp.example.com:8080"

OAuth Profiles

Define profiles under [auth.profiles.<name>] and reference them from templates via auth.kind = "oauth2_profile". See Auth for flow details.

FlowRequired Fields
auth_code_pkcetoken_url, authorization_url
device_codetoken_url, device_authorization_url
client_credentialstoken_url, client_secret_key

All flows require client_id. Optional fields: client_secret_key (required for client_credentials), redirect_url, scopes, issuer, use_auth_request_body.

Sandbox

The [sandbox] section controls execution limits for Bash and SQL protocol operations. These settings apply both to direct earl call invocations and to tools served through the MCP server.

Bash

KeyTypeDefaultDescription
bash_max_time_msu64 (optional)Maximum wall-clock time for a Bash command (ms)
bash_max_output_bytesu64 (optional)Maximum stdout/stderr capture size (bytes)
bash_allow_networkboolfalseAllow network access from Bash commands

SQL

KeyTypeDefaultDescription
sql_force_read_onlybooltrueForce all SQL queries to be read-only
sql_max_rowsu64 (optional)Maximum number of rows returned per query
sql_connection_allowliststring[][]Secret keys whose values are permitted as connection strings

The sql_connection_allowlist entries refer to secret names managed by earl secrets. Only connections whose secret key appears in this list are allowed.

[sandbox]
bash_max_time_ms = 30000
sql_force_read_only = true
sql_connection_allowlist = ["myapp.db_url", "analytics.readonly_url"]

Controls the semantic search engine used by earl templates search and MCP discovery mode.

Global

KeyTypeDefaultDescription
search.top_kusize40Candidates retrieved from embeddings
search.rerank_kusize10Results returned after reranking

Local Models

KeyTypeDefaultDescription
search.local.embedding_modelstringBGESmallENV15QLocal embedding model name
search.local.reranker_modelstringJINARerankerV1TurboEnLocal reranker model name

Remote Backend

Enable a remote search backend for embedding and reranking when local models are not sufficient.

KeyTypeDefaultDescription
search.remote.enabledboolfalseEnable remote search backend
search.remote.base_urlstringBase URL of the remote service
search.remote.api_key_secretstringSecret key name for the API key
search.remote.embeddings_pathstring/embeddingsPath appended to base URL for embeddings
search.remote.rerank_pathstring/rerankPath appended to base URL for reranking
search.remote.openai_compatiblebooltrueUse OpenAI-compatible request format
search.remote.timeout_msu6410000Request timeout in milliseconds

Run earl doctor to verify your configuration. See Troubleshooting for common errors.

On this page