Skip to main content

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.

VariableStatusLibraryWhat it does
APP_URL
Undocumented: Only the program shows this item. It can change without notice.
cloud detectorA bundled cloud detector treats a value that contains ondigitalocean.app as the DigitalOcean App Platform.
AWS_ACCOUNT_ID
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKThe bundled AWS SDK env credential provider reads it with the key, secret, token, expiry, and scope vars.
AWS_AUTH_SCHEME_PREFERENCE
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKThe bundled AWS SDK reads it as a comma list of preferred auth schemes.
AWS_CONTAINER_AUTHORIZATION_TOKEN
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKThe bundled AWS SDK sends it as the auth value to the container credentials endpoint.
AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKThe bundled AWS SDK reads the container credentials auth token from this file path.
AWS_CREDENTIAL_EXPIRATION
Documented: An official docs page names this item.
AWS SDKThe bundled AWS SDK env credential provider reads it as the expiry time of the env credentials.
AWS_DEFAULTS_MODE
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKThe bundled AWS SDK reads it as the SDK defaults mode.
AWS_EC2_METADATA_DISABLED
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKTurns off the EC2 instance metadata lookup in the bundled AWS SDK credential chain and region defaults.
AWS_EC2_METADATA_SERVICE_ENDPOINT
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKSets the EC2 metadata service URL for the bundled AWS SDK.
AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKPicks IPv4 or IPv6 for the EC2 metadata service address in the bundled AWS SDK.
AWS_EC2_METADATA_V1_DISABLED
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKBlocks the IMDSv1 fallback in the bundled AWS SDK, so the SDK uses only token-based IMDSv2.
AWS_ENDPOINT_URL_SSO
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKOverrides the AWS SSO endpoint in the bundled AWS SDK.
AWS_ENDPOINT_URL_SSO_OIDC
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKOverrides the AWS SSO OIDC endpoint in the bundled AWS SDK.
AWS_LAMBDA_MAX_CONCURRENCY
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKSelects the concurrent-aware store in the bundled AWS Lambda InvokeStore when present.
AWS_LOGIN_CACHE_DIRECTORY
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKSets the cache folder for the AWS SDK login_session credential provider (aws login).
AWS_MAX_ATTEMPTS
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKSets the maximum retry attempts of the bundled AWS SDK clients.
AWS_RETRY_MODE
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKSets the retry mode of the bundled AWS SDK clients.
AWS_ROLE_SESSION_NAME
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKSets the session name for AWS web identity role assumption in the bundled AWS SDK.
AWS_SDK_UA_APP_ID
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKAdds an app/<id> part to the user agent of the bundled AWS SDK calls.
AWS_USE_DUALSTACK_ENDPOINT
Undocumented: Only the program shows this item. It can change without notice.
AWS SDKTurns on AWS dual-stack endpoints in the AWS SDK.
AZURE_ADDITIONALLY_ALLOWED_TENANTS
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKLists extra tenant IDs the bundled Azure identity library may use.
AZURE_AUTHORITY_HOST
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKSets the Microsoft Entra authority URL of the bundled Azure identity library.
AZURE_CLIENT_CERTIFICATE_PASSWORD
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKGives the password of the client certificate for the Azure EnvironmentCredential.
AZURE_CLIENT_CERTIFICATE_PATH
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKGives the client certificate path for the Azure EnvironmentCredential.
AZURE_CLIENT_ID
Documented: An official docs page names this item.
Azure SDKGives the Azure app client ID for the bundled Azure identity credentials.
AZURE_CLIENT_SECRET
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKGives the Azure app client secret for the Azure EnvironmentCredential.
AZURE_CLIENT_SEND_CERTIFICATE_CHAIN
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKMakes the Azure client certificate credential send the full certificate chain.
AZURE_FEDERATED_TOKEN_FILE
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKGives the federated token file for Azure workload identity login.
AZURE_IDENTITY_DISABLE_MULTITENANTAUTH
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKTurns off multi-tenant token requests in the Azure identity library, so the library always uses the configured tenant.
AZURE_LOG_LEVEL
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKSets the log level of the bundled Azure SDK logger.
AZURE_PASSWORD
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKGives the password for the Azure username and password credential.
AZURE_POD_IDENTITY_AUTHORITY_HOST
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKSets the Azure pod identity authority host for managed identity login in the bundled MSAL library.
AZURE_REGIONAL_AUTHORITY_NAME
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKSets the regional authority name for MSAL token requests.
AZURE_TENANT_ID
Documented: An official docs page names this item.
Azure SDKGives the Azure tenant ID for the bundled Azure identity credentials.
AZURE_TOKEN_CREDENTIALS
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKPicks which Azure credential chain DefaultAzureCredential uses.
AZURE_USERNAME
Undocumented: Only the program shows this item. It can change without notice.
Azure SDKGives the username for the Azure username and password credential.
BUF_BIGINT_DISABLE
Undocumented: Only the program shows this item. It can change without notice.
protobufTurns off native BigInt use in the bundled protobuf library, so it uses its fallback int64 code.
BUN_DISABLE_DYNAMIC_CHUNK_SIZE
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeTurns off dynamic chunk size tuning for native readable streams in the Bun runtime.
BUN_FEATURE_FLAG_VERBOSE_WARNINGS
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeShows the Bun runtime warning for unsupported async_hooks use.
BUN_INSPECT_NOTIFY
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeTells the Bun inspector where to report that it listens.
BUN_PORT
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeGives a fallback port for the Bun dev server when the default port is busy.
CHOKIDAR_INTERVAL
Undocumented: Only the program shows this item. It can change without notice.
chokidarSets the poll interval for the bundled chokidar file watcher when polling is on.
CHOKIDAR_USEPOLLING
Undocumented: Only the program shows this item. It can change without notice.
chokidarForces the bundled chokidar file watcher to use polling or not.
CLOUD_RUN_JOB
Undocumented: Only the program shows this item. It can change without notice.
Google authMarks a Google Cloud Run job.
DATABASE_URL
Documented: An official docs page names this item.
Bun SQLGives the default connection URL to the embedded Bun SQL client.
DATABASEURL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs a second spelling of DATABASE_URL for the embedded Bun SQL client.
DEBUG_AUTH
Undocumented: Only the program shows this item. It can change without notice.
Google authPrints GCP metadata detection errors with console.info.
DETECT_GCP_RETRIES
Undocumented: Only the program shows this item. It can change without notice.
Google authSets the number of retries for GCP metadata server detection.
FUNCTION_NAME
Undocumented: Only the program shows this item. It can change without notice.
Google authMarks a Google Cloud Functions runtime in the bundled Google auth library.
FUNCTION_TARGET
Undocumented: Only the program shows this item. It can change without notice.
Google authMarks a Google Cloud Functions runtime in the bundled Google auth library.
GAE_MODULE_NAME
Undocumented: Only the program shows this item. It can change without notice.
Google authMarks a Google App Engine runtime in the bundled Google auth library.
GAE_SERVICE
Undocumented: Only the program shows this item. It can change without notice.
Google authMarks a Google App Engine runtime in the bundled Google auth library.
GCE_METADATA_HOST
Undocumented: Only the program shows this item. It can change without notice.
Google authSets the host of the Compute Engine metadata server for the bundled Google auth library.
GCE_METADATA_IP
Undocumented: Only the program shows this item. It can change without notice.
Google authSets the address of the Compute Engine metadata server for the bundled Google auth library.
GOOGLE_API_CERTIFICATE_CONFIG
Undocumented: Only the program shows this item. It can change without notice.
Google authGives the path of the certificate config for mTLS in the bundled Google auth library.
GOOGLE_CLOUD_QUOTA_PROJECT
Undocumented: Only the program shows this item. It can change without notice.
Google authSets the quota project of the credential in the bundled Google auth library.
GRACEFUL_FS_PLATFORM
Undocumented: Only the program shows this item. It can change without notice.
graceful-fsOverrides the platform name that the bundled graceful-fs patches use.
GRPC_DEFAULT_SSL_ROOTS_FILE_PATH
Undocumented: Only the program shows this item. It can change without notice.
gRPCGives the path of a root certificate file that the bundled gRPC library loads as its TLS roots.
GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION
Undocumented: Only the program shows this item. It can change without notice.
gRPCTurns the gRPC outlier detection load balancer on or off.
GRPC_NODE_TRACE
Undocumented: Only the program shows this item. It can change without notice.
gRPCLists the gRPC tracers to turn on.
GRPC_NODE_USE_ALTERNATIVE_RESOLVER
Undocumented: Only the program shows this item. It can change without notice.
gRPCMakes the gRPC DNS resolver use the alternative path when it is true.
GRPC_NODE_VERBOSITY
Undocumented: Only the program shows this item. It can change without notice.
gRPCSets the gRPC log level.
GRPC_SSL_CIPHER_SUITES
Undocumented: Only the program shows this item. It can change without notice.
gRPCSets the TLS cipher suites of the bundled gRPC library.
GRPC_TRACE
Undocumented: Only the program shows this item. It can change without notice.
gRPCLists the gRPC tracers to turn on.
GRPC_VERBOSITY
Undocumented: Only the program shows this item. It can change without notice.
gRPCSets the gRPC log level.
LRU_CACHE_IGNORE_AC_WARNING
Undocumented: Only the program shows this item. It can change without notice.
lru-cacheSet to 1 to hide the lru-cache warning about a missing AbortController.
MARIADB_DATABASE
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the database of the MariaDB connection of the embedded Bun SQL client.
MARIADB_HOST
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the host of the MariaDB connection of the embedded Bun SQL client.
MARIADB_PASSWORD
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the password of the MariaDB connection of the embedded Bun SQL client.
MARIADB_PORT
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the port of the MariaDB connection of the embedded Bun SQL client.
MARIADB_URL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLGives the default MariaDB connection URL to the embedded Bun SQL client.
MARIADB_USER
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets 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 SQLIs another spelling of MARIADB_DATABASE.
MARIADBHOST
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of MARIADB_HOST.
MARIADBPASSWORD
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of MARIADB_PASSWORD.
MARIADBPORT
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of MARIADB_PORT.
MARIADBURL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of MARIADB_URL for the embedded Bun SQL client.
MARIADBUSER
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of MARIADB_USER.
MYSQL_DATABASE
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the database of the MySQL connection of the embedded Bun SQL client.
MYSQL_HOST
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the host of the MySQL connection of the embedded Bun SQL client.
MYSQL_PASSWORD
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the password of the MySQL connection of the embedded Bun SQL client.
MYSQL_PORT
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the port of the MySQL connection of the embedded Bun SQL client.
MYSQL_URL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLGives the default MySQL connection URL to the embedded Bun SQL client.
MYSQL_USER
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets 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 SQLIs another spelling of MYSQL_DATABASE.
MYSQLHOST
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of MYSQL_HOST.
MYSQLPASSWORD
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of MYSQL_PASSWORD.
MYSQLPORT
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of MYSQL_PORT.
MYSQLURL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of MYSQL_URL for the embedded Bun SQL client.
MYSQLUSER
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of MYSQL_USER.
NODE_CHANNEL_FD
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeIn the Bun runtime, a set value means that the process has an IPC channel. The runtime stubs send and disconnect in workers.
NODE_CLUSTER_SCHED_POLICY
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeSets the scheduling policy of the Bun runtime cluster to rr or none.
NODE_DEBUG
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeEnables debuglog sections by name in the Bun runtime.
NODE_DISABLE_COLORS
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeIn the Bun runtime, a non-empty value sets the terminal color depth to one color.
NODE_NO_READLINE
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeIn the Bun REPL, a number that parses to non-zero turns off terminal mode.
NODE_PORT
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeGives a fallback port for the Bun dev server after PORT and BUN_PORT, when the port is in use.
NODE_REPL_EXTERNAL_MODULE
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeGives the path of a module that the Bun REPL loads in place of the built-in REPL.
NODE_REPL_HISTORY
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeSets the file path for persistent history in the Bun REPL.
NODE_REPL_HISTORY_SIZE
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeSets the history size of the Bun REPL.
NODE_REPL_MODE
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeSets the Bun REPL mode to strict or sloppy.
NODE_UNIQUE_ID
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeGives 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.
whichThe bundled which code treats cygwin or msys as a Windows-style path list.
PASSWORD
Documented: An official docs page names this item.
Bun SQLGives a fallback password to the embedded Bun SQL client.
PG_DATABASE
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the database of the Postgres connection of the embedded Bun SQL client.
PG_HOST
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the host of the Postgres connection of the embedded Bun SQL client.
PG_PASSWORD
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the password of the Postgres connection of the embedded Bun SQL client.
PG_PORT
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the port of the Postgres connection of the embedded Bun SQL client.
PG_SSLMODE
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets the TLS mode of the Postgres connection of the embedded Bun SQL client.
PG_URL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs a third spelling of POSTGRES_URL for the embedded Bun SQL client.
PG_USER
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLSets 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 SQLIs another spelling of PG_DATABASE.
PGHOST
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of PG_HOST.
PGPASSWORD
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of PG_PASSWORD.
PGPORT
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of PG_PORT.
PGSSLMODE
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of PG_SSLMODE.
PGURL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of POSTGRES_URL for the embedded Bun SQL client.
PGUSER
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLIs another spelling of PG_USER.
POSTGRES_URL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLGives the default Postgres connection URL to the embedded Bun SQL client.
SQLITE_URL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLGives 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 SQLIs another spelling of SQLITE_URL for the embedded Bun SQL client.
TEAMCITY_VERSION
Undocumented: Only the program shows this item. It can change without notice.
color supportIs a TeamCity CI variable.
TLS_DATABASE_URL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLGives a default URL and turns on TLS for the embedded Bun SQL client.
TLS_MARIADB_DATABASE_URL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLGives the MariaDB URL and turns on TLS for the embedded Bun SQL client.
TLS_MYSQL_DATABASE_URL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLGives the MySQL URL and turns on TLS for the embedded Bun SQL client.
TLS_POSTGRES_DATABASE_URL
Undocumented: Only the program shows this item. It can change without notice.
Bun SQLGives the Postgres URL and turns on TLS for the embedded Bun SQL client.
VERBOSE_SSR
Undocumented: Only the program shows this item. It can change without notice.
Bun runtimeIs 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.

Source: the program (variable names found in the 2.1.312 binary) and the Environment Variables page of the official docs.