Bundled Libraries
Claude Code ships with libraries inside its program. These libraries read their own environment variables, and Claude Code itself does not use them. A variable here only works when the library code runs. Setting one can change behavior in a way Claude Code does not plan for.
This page lists 126 variables. The effect depends on the library and the feature that runs it. Set them in your shell.
Example
export GRPC_VERBOSITY=DEBUG
claude
The bundled gRPC library prints more log lines. This helps when an OTEL gRPC exporter fails.
Variables
The table is sorted by name. See Environment Variables for what each column and badge means.
| Variable | Status | Library | What it does |
|---|---|---|---|
APP_ | Undocumented: Only the program shows this item. It can change without notice. | cloud detector | A bundled cloud detector treats a value that contains ondigitalocean. as the DigitalOcean App Platform. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | The bundled AWS SDK env credential provider reads it with the key, secret, token, expiry, and scope vars. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | The bundled AWS SDK reads it as a comma list of preferred auth schemes. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | The bundled AWS SDK sends it as the auth value to the container credentials endpoint. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | The bundled AWS SDK reads the container credentials auth token from this file path. |
AWS_ | Documented: An official docs page names this item. | AWS SDK | The bundled AWS SDK env credential provider reads it as the expiry time of the env credentials. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | The bundled AWS SDK reads it as the SDK defaults mode. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Turns off the EC2 instance metadata lookup in the bundled AWS SDK credential chain and region defaults. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Sets the EC2 metadata service URL for the bundled AWS SDK. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Picks IPv4 or IPv6 for the EC2 metadata service address in the bundled AWS SDK. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Blocks the IMDSv1 fallback in the bundled AWS SDK, so the SDK uses only token-based IMDSv2. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Overrides the AWS SSO endpoint in the bundled AWS SDK. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Overrides the AWS SSO OIDC endpoint in the bundled AWS SDK. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Selects the concurrent-aware store in the bundled AWS Lambda Invoke when present. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Sets the cache folder for the AWS SDK login_ credential provider (aws login). |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Sets the maximum retry attempts of the bundled AWS SDK clients. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Sets the retry mode of the bundled AWS SDK clients. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Sets the session name for AWS web identity role assumption in the bundled AWS SDK. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Adds an app/ part to the user agent of the bundled AWS SDK calls. |
AWS_ | Undocumented: Only the program shows this item. It can change without notice. | AWS SDK | Turns on AWS dual-stack endpoints in the AWS SDK. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Lists extra tenant IDs the bundled Azure identity library may use. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Sets the Microsoft Entra authority URL of the bundled Azure identity library. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Gives the password of the client certificate for the Azure Environment. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Gives the client certificate path for the Azure Environment. |
AZURE_ | Documented: An official docs page names this item. | Azure SDK | Gives the Azure app client ID for the bundled Azure identity credentials. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Gives the Azure app client secret for the Azure Environment. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Makes the Azure client certificate credential send the full certificate chain. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Gives the federated token file for Azure workload identity login. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Turns off multi-tenant token requests in the Azure identity library, so the library always uses the configured tenant. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Sets the log level of the bundled Azure SDK logger. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Gives the password for the Azure username and password credential. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Sets the Azure pod identity authority host for managed identity login in the bundled MSAL library. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Sets the regional authority name for MSAL token requests. |
AZURE_ | Documented: An official docs page names this item. | Azure SDK | Gives the Azure tenant ID for the bundled Azure identity credentials. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Picks which Azure credential chain Default uses. |
AZURE_ | Undocumented: Only the program shows this item. It can change without notice. | Azure SDK | Gives the username for the Azure username and password credential. |
BUF_ | Undocumented: Only the program shows this item. It can change without notice. | protobuf | Turns off native Big use in the bundled protobuf library, so it uses its fallback int64 code. |
BUN_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Turns off dynamic chunk size tuning for native readable streams in the Bun runtime. |
BUN_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Shows the Bun runtime warning for unsupported async_ use. |
BUN_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Tells the Bun inspector where to report that it listens. |
BUN_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Gives a fallback port for the Bun dev server when the default port is busy. |
CHOKIDAR_ | Undocumented: Only the program shows this item. It can change without notice. | chokidar | Sets the poll interval for the bundled chokidar file watcher when polling is on. |
CHOKIDAR_ | Undocumented: Only the program shows this item. It can change without notice. | chokidar | Forces the bundled chokidar file watcher to use polling or not. |
CLOUD_ | Undocumented: Only the program shows this item. It can change without notice. | Google auth | Marks a Google Cloud Run job. |
DATABASE_ | Documented: An official docs page names this item. | Bun SQL | Gives the default connection URL to the embedded Bun SQL client. |
DATABASEURL | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is a second spelling of DATABASE_ for the embedded Bun SQL client. |
DEBUG_ | Undocumented: Only the program shows this item. It can change without notice. | Google auth | Prints GCP metadata detection errors with console.. |
DETECT_ | Undocumented: Only the program shows this item. It can change without notice. | Google auth | Sets the number of retries for GCP metadata server detection. |
FUNCTION_ | Undocumented: Only the program shows this item. It can change without notice. | Google auth | Marks a Google Cloud Functions runtime in the bundled Google auth library. |
FUNCTION_ | Undocumented: Only the program shows this item. It can change without notice. | Google auth | Marks a Google Cloud Functions runtime in the bundled Google auth library. |
GAE_ | Undocumented: Only the program shows this item. It can change without notice. | Google auth | Marks a Google App Engine runtime in the bundled Google auth library. |
GAE_ | Undocumented: Only the program shows this item. It can change without notice. | Google auth | Marks a Google App Engine runtime in the bundled Google auth library. |
GCE_ | Undocumented: Only the program shows this item. It can change without notice. | Google auth | Sets the host of the Compute Engine metadata server for the bundled Google auth library. |
GCE_ | Undocumented: Only the program shows this item. It can change without notice. | Google auth | Sets the address of the Compute Engine metadata server for the bundled Google auth library. |
GOOGLE_ | Undocumented: Only the program shows this item. It can change without notice. | Google auth | Gives the path of the certificate config for mTLS in the bundled Google auth library. |
GOOGLE_ | Undocumented: Only the program shows this item. It can change without notice. | Google auth | Sets the quota project of the credential in the bundled Google auth library. |
GRACEFUL_ | Undocumented: Only the program shows this item. It can change without notice. | graceful-fs | Overrides the platform name that the bundled graceful- patches use. |
GRPC_ | Undocumented: Only the program shows this item. It can change without notice. | gRPC | Gives the path of a root certificate file that the bundled gRPC library loads as its TLS roots. |
GRPC_ | Undocumented: Only the program shows this item. It can change without notice. | gRPC | Turns the gRPC outlier detection load balancer on or off. |
GRPC_ | Undocumented: Only the program shows this item. It can change without notice. | gRPC | Lists the gRPC tracers to turn on. |
GRPC_ | Undocumented: Only the program shows this item. It can change without notice. | gRPC | Makes the gRPC DNS resolver use the alternative path when it is true. |
GRPC_ | Undocumented: Only the program shows this item. It can change without notice. | gRPC | Sets the gRPC log level. |
GRPC_ | Undocumented: Only the program shows this item. It can change without notice. | gRPC | Sets the TLS cipher suites of the bundled gRPC library. |
GRPC_ | Undocumented: Only the program shows this item. It can change without notice. | gRPC | Lists the gRPC tracers to turn on. |
GRPC_ | Undocumented: Only the program shows this item. It can change without notice. | gRPC | Sets the gRPC log level. |
LRU_ | Undocumented: Only the program shows this item. It can change without notice. | lru-cache | Set to 1 to hide the lru- warning about a missing Abort. |
MARIADB_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the database of the MariaDB connection of the embedded Bun SQL client. |
MARIADB_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the host of the MariaDB connection of the embedded Bun SQL client. |
MARIADB_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the password of the MariaDB connection of the embedded Bun SQL client. |
MARIADB_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the port of the MariaDB connection of the embedded Bun SQL client. |
MARIADB_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Gives the default MariaDB connection URL to the embedded Bun SQL client. |
MARIADB_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the user of the MariaDB connection of the embedded Bun SQL client. |
MARIADBDATABASE | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of MARIADB_. |
MARIADBHOST | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of MARIADB_. |
MARIADBPASSWORD | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of MARIADB_. |
MARIADBPORT | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of MARIADB_. |
MARIADBURL | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of MARIADB_ for the embedded Bun SQL client. |
MARIADBUSER | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of MARIADB_. |
MYSQL_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the database of the MySQL connection of the embedded Bun SQL client. |
MYSQL_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the host of the MySQL connection of the embedded Bun SQL client. |
MYSQL_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the password of the MySQL connection of the embedded Bun SQL client. |
MYSQL_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the port of the MySQL connection of the embedded Bun SQL client. |
MYSQL_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Gives the default MySQL connection URL to the embedded Bun SQL client. |
MYSQL_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the user of the MySQL connection of the embedded Bun SQL client. |
MYSQLDATABASE | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of MYSQL_. |
MYSQLHOST | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of MYSQL_. |
MYSQLPASSWORD | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of MYSQL_. |
MYSQLPORT | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of MYSQL_. |
MYSQLURL | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of MYSQL_ for the embedded Bun SQL client. |
MYSQLUSER | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of MYSQL_. |
NODE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | In the Bun runtime, a set value means that the process has an IPC channel. The runtime stubs send and disconnect in workers. |
NODE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Sets the scheduling policy of the Bun runtime cluster to rr or none. |
NODE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Enables debuglog sections by name in the Bun runtime. |
NODE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | In the Bun runtime, a non-empty value sets the terminal color depth to one color. |
NODE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | In the Bun REPL, a number that parses to non-zero turns off terminal mode. |
NODE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Gives a fallback port for the Bun dev server after PORT and BUN_, when the port is in use. |
NODE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Gives the path of a module that the Bun REPL loads in place of the built-in REPL. |
NODE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Sets the file path for persistent history in the Bun REPL. |
NODE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Sets the history size of the Bun REPL. |
NODE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Sets the Bun REPL mode to strict or sloppy. |
NODE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Gives the worker id of a forked worker in the Bun runtime cluster. The runtime deletes it after use. |
OSTYPE | Undocumented: Only the program shows this item. It can change without notice. | which | The bundled which code treats cygwin or msys as a Windows-style path list. |
PASSWORD | Documented: An official docs page names this item. | Bun SQL | Gives a fallback password to the embedded Bun SQL client. |
PG_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the database of the Postgres connection of the embedded Bun SQL client. |
PG_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the host of the Postgres connection of the embedded Bun SQL client. |
PG_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the password of the Postgres connection of the embedded Bun SQL client. |
PG_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the port of the Postgres connection of the embedded Bun SQL client. |
PG_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the TLS mode of the Postgres connection of the embedded Bun SQL client. |
PG_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is a third spelling of POSTGRES_ for the embedded Bun SQL client. |
PG_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Sets the user of the Postgres connection of the embedded Bun SQL client. |
PGDATABASE | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of PG_. |
PGHOST | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of PG_. |
PGPASSWORD | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of PG_. |
PGPORT | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of PG_. |
PGSSLMODE | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of PG_. |
PGURL | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of POSTGRES_ for the embedded Bun SQL client. |
PGUSER | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of PG_. |
POSTGRES_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Gives the default Postgres connection URL to the embedded Bun SQL client. |
SQLITE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Gives the default SQLite connection URL to the embedded Bun SQL client. |
SQLITEURL | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Is another spelling of SQLITE_ for the embedded Bun SQL client. |
TEAMCITY_ | Undocumented: Only the program shows this item. It can change without notice. | color support | Is a TeamCity CI variable. |
TLS_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Gives a default URL and turns on TLS for the embedded Bun SQL client. |
TLS_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Gives the MariaDB URL and turns on TLS for the embedded Bun SQL client. |
TLS_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Gives the MySQL URL and turns on TLS for the embedded Bun SQL client. |
TLS_ | Undocumented: Only the program shows this item. It can change without notice. | Bun SQL | Gives the Postgres URL and turns on TLS for the embedded Bun SQL client. |
VERBOSE_ | Undocumented: Only the program shows this item. It can change without notice. | Bun runtime | Is the debug flag for Bun server-side rendering. |
How It Works
A scan of strings in the program found the names, so the list can miss names that the program builds at run time. Rows describe what the library does with the name, not what Claude Code does.
Related Pages
- Environment Variables: how Claude Code reads variables and which value wins.
- System and Third-Party
- Telemetry and Debug
- Undocumented Items: every item that only the program shows.
Source: the program (variable names found in the 2.1.312 binary) and the Environment Variables page of the official docs.