Skip to main content

Module token

Module token 

Source
Expand description

Token resolution with the contract’s precedence: env var, then tix.toml [export], then the CLI’s native auth.

contracts/external-tools.md §Token resolution: GITLAB_TOKEN / LINEAR_TOKEN (and, for Linear, the tool’s own LINEAR_API_KEY) beat a tix.toml token (which itself never reaches disk), and tokens are injected only as an environment pair — never in argv. The EnvReader seam keeps precedence unit-testable without touching process state; a token found in tix.toml triggers the shared “prefer the env var” warning once per run.

Structs§

RealEnv
The real process environment.

Enums§

TokenResolution
Where the secret ultimately came from.

Traits§

EnvReader
Read access to the process environment, injectable in tests.

Functions§

resolve
Resolve the token for tool per contracts/external-tools.md §Token resolution. Emits a warning through warn exactly once when a cleartext tix.toml token is used (the env var is always preferred and the file token is never written back out).