Skip to main content

Environment Variables

Status: Client variables are verified from cargo-teaql 2.0.8 source and Maven plugin 1.1.0 help. Rust variables are verified from the generated workspace integration, teaql-tool-core 1.0.0, and teaql-runtime 4.1.1 source. The two Rust parsers are separate configuration layers.

MetadataValue
AuthorityInstalled client source/help, generated Rust runtime source, and downloaded crate source.
ScopeCargo/Maven client configuration plus Rust runtime logging and schema modes.
Verified versioncargo-teaql 2.0.8, Maven plugin 1.1.0, and teaql-rs 4.1.1 on 2026-07-13.
VerificationStart the target runtime with the variable set and inspect startup validation and behavior.
Update triggerEnvironment parser, logging level, output target, schema mode, or default change.

Client Variables

VariableCargo configuration keyPurposeVerified default/status
TEAQL_ENDPOINT_PREFIXendpoint_prefixService endpoint prefix.https://api.teaql.io/latest/
TEAQL_SERVICE_URLLegacy alias for endpoint prefix.Backward compatibility.Deprecated; use TEAQL_ENDPOINT_PREFIX.
TEAQL_API_KEYapi_keyOverride service credentials.Built-in free-tier key when omitted. Never print or commit an override.
TEAQL_BUILD_DIRbuild_dirGeneration/output directory.build in Cargo 2.0.8; Maven uses teaql.output and defaults to generated-lib.
TEAQL_TIMEOUT_SECONDStimeout_secondsRequest timeout in seconds.1200 in Cargo 2.0.8.

Cargo client precedence is command-line flag → environment variable → ~/.teaql/config.yml → built-in default. The Maven plugin exposes equivalent overrides through teaql.endpointPrefix, teaql.serviceUrl, teaql.apiKey, teaql.output, and teaql.timeoutSeconds; its exact merge precedence is reported by the effective configuration output.

TEAQL_LICENSE_FILE appears in the Cargo README but is not read by the cargo-teaql 2.0.8 configuration source. Do not rely on it as an active client setting without newer source evidence.

Generated Rust Workspace Variables

Current generated workspaces call teaql_tool_core::audit_config_from_env(...). These variables are therefore the primary configuration contract for newly generated applications.

VariablePurposeAccepted valuesDefault
TEAQL_AUDITEntity/audit detail._silent, _summary, _full_full
TEAQL_SQLSQL detail._silent, _summary, _full_silent
TEAQL_SQL_TABLESRestrict SQL output to generated table names.Comma-separated table namesNo filter; all known tables
TEAQL_TOOLContext-tool detail._silent, _summary, _full_silent
TEAQL_TOOL_FOCUSPromote selected tool modules to full detail.Comma-separated module namesNo focused modules
TEAQL_SINKSelect audit output destination._stdout, _file, _both_both
TEAQL_SCHEMASelect the schema startup mode._verify, _dryrun, _execute_verify

TEAQL_TOOL_FOCUS accepts these module identifiers:

http,file,cmd,email,kv,crypto,jwt,time,id,text,decimal,money,json,regex,
codec,list,map,diff,url,validate,color,unit,daterange,desensitize,filter,
tree,system

The parser fails startup for an unknown focused module or an unknown table in TEAQL_SQL_TABLES. It also rejects unknown environment-variable names that begin with TEAQL_AUDIT, TEAQL_SQL, TEAQL_TOOL, TEAQL_SINK, or TEAQL_SCHEMA; this catches misspellings instead of silently ignoring them.

The schema enum describes verify, dry-run, and execute modes. However, the currently generated runtime calls ensure_schema() for all three branches. Do not assume _dryrun is non-mutating until the generated runtime behavior is fixed and verified against the selected database provider.

teaql-runtime Formatter Compatibility Layer

teaql-runtime 4.1.1 also contains an older log-formatter parser. These names do not replace the generated-workspace variables above; use them only when the application explicitly initializes that formatter path.

VariablePurposeAccepted values/default
TEAQL_LOG_FORMATSelect formatter shape.Human by default; json or debug selects the debug formatter.
TEAQL_AUDIT_LOGFormatter entity/audit level._silent, _summary, _full, _full_with_payload; default _full.
TEAQL_SQL_LOGFormatter SQL level.Same levels; default _summary.
TEAQL_TOOL_LOGFormatter tool level.Same levels; default _full.
TEAQL_AUDIT_LOG_ENTITIESRestrict entity output.Comma-separated entity names.
TEAQL_SQL_LOG_TABLESRestrict SQL output.Comma-separated table names.
TEAQL_TOOL_LOG_FOCUSRestrict tool output.Comma-separated module names.
TEAQL_LOG_ENDPOINTSelect formatter output.Empty is ignored; stdout writes to standard output; another value is a file path.

Invalid formatter level values fall back to that variable's default rather than failing startup. If TEAQL_LOG_ENDPOINT is absent, the formatter uses TEAQL_DOMAIN.log, or the executable name plus .log when the domain is not set. TEAQL_TRACE_MODE=off is guarded by an explicit waiver acknowledgement; without that acknowledgement, tracing remains enabled.

The Java teaql-runtime-log 1.525-RELEASE module implements the same formatter names and additionally supports TEAQL_LOG_MAX_SIZE (default 50MB) and TEAQL_LOG_MAX_FILES (default 7). On Java, a TEAQL_* system property wins over the environment variable, and values are cached at class initialization. See Configuration Properties for the Java module boundary and exact size syntax.

Examples

TEAQL_SQL=_full TEAQL_SQL_TABLES=task cargo run
TEAQL_SCHEMA=_dryrun cargo run
TEAQL_AUDIT=_summary TEAQL_TOOL=_summary TEAQL_SINK=_stdout cargo test

_full_with_payload belongs only to the formatter compatibility layer. Avoid it in production until payload sensitivity, masking, and retention have been reviewed.

Runtime Precedence and Reload

Both Rust parsers read process environment during initialization. Dynamic reload is not established. Treat these as startup settings; programmatic configuration may still override how an application wires its subscribers and sinks.