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_URLUndocumentedcloud detectorA bundled cloud detector treats a value that contains ondigitalocean.app as the DigitalOcean App Platform.
AWS_ACCOUNT_IDUndocumentedAWS SDKThe bundled AWS SDK env credential provider reads it with the key, secret, token, expiry, and scope vars.
AWS_AUTH_SCHEME_PREFERENCEUndocumentedAWS SDKThe bundled AWS SDK reads it as a comma list of preferred auth schemes.
AWS_CONTAINER_AUTHORIZATION_TOKENUndocumentedAWS SDKThe bundled AWS SDK sends it as the auth value to the container credentials endpoint.
AWS_CONTAINER_AUTHORIZATION_TOKEN_FILEUndocumentedAWS SDKThe bundled AWS SDK reads the container credentials auth token from this file path.
AWS_CREDENTIAL_EXPIRATIONDocumentedAWS SDKThe bundled AWS SDK env credential provider reads it as the expiry time of the env credentials.
AWS_DEFAULTS_MODEUndocumentedAWS SDKThe bundled AWS SDK reads it as the SDK defaults mode.
AWS_EC2_METADATA_DISABLEDUndocumentedAWS SDKTurns off the EC2 instance metadata lookup in the bundled AWS SDK credential chain and region defaults.
AWS_EC2_METADATA_SERVICE_ENDPOINTUndocumentedAWS SDKSets the EC2 metadata service URL for the bundled AWS SDK.
AWS_EC2_METADATA_SERVICE_ENDPOINT_MODEUndocumentedAWS SDKPicks IPv4 or IPv6 for the EC2 metadata service address in the bundled AWS SDK.
AWS_EC2_METADATA_V1_DISABLEDUndocumentedAWS SDKBlocks the IMDSv1 fallback in the bundled AWS SDK, so only token-based IMDSv2 is used.
AWS_ENDPOINT_URL_SSOUndocumentedAWS SDKOverrides the AWS SSO endpoint in the bundled AWS SDK.
AWS_ENDPOINT_URL_SSO_OIDCUndocumentedAWS SDKOverrides the AWS SSO OIDC endpoint in the bundled AWS SDK.
AWS_LAMBDA_MAX_CONCURRENCYUndocumentedAWS SDKSelects the concurrent-aware store in the bundled AWS Lambda InvokeStore when present.
AWS_LOGIN_CACHE_DIRECTORYUndocumentedAWS SDKSets the cache folder for the AWS SDK login_session credential provider (aws login).
AWS_MAX_ATTEMPTSUndocumentedAWS SDKSets the maximum retry attempts of the bundled AWS SDK clients.
AWS_RETRY_MODEUndocumentedAWS SDKSets the retry mode of the bundled AWS SDK clients.
AWS_ROLE_SESSION_NAMEUndocumentedAWS SDKSets the session name for AWS web identity role assumption in the bundled AWS SDK.
AWS_SDK_UA_APP_IDUndocumentedAWS SDKAdds an app/<id> part to the user agent of the bundled AWS SDK calls.
AWS_USE_DUALSTACK_ENDPOINTUndocumentedAWS SDKTurns on AWS dual-stack endpoints in the AWS SDK.
AZURE_ADDITIONALLY_ALLOWED_TENANTSUndocumentedAzure SDKLists extra tenant IDs the bundled Azure identity library may use.
AZURE_AUTHORITY_HOSTUndocumentedAzure SDKSets the Microsoft Entra authority URL of the bundled Azure identity library.
AZURE_CLIENT_CERTIFICATE_PASSWORDUndocumentedAzure SDKGives the password of the client certificate for the Azure EnvironmentCredential.
AZURE_CLIENT_CERTIFICATE_PATHUndocumentedAzure SDKGives the client certificate path for the Azure EnvironmentCredential.
AZURE_CLIENT_IDDocumentedAzure SDKGives the Azure app client ID for the bundled Azure identity credentials.
AZURE_CLIENT_SECRETUndocumentedAzure SDKGives the Azure app client secret for the Azure EnvironmentCredential.
AZURE_CLIENT_SEND_CERTIFICATE_CHAINUndocumentedAzure SDKMakes the Azure client certificate credential send the full certificate chain.
AZURE_FEDERATED_TOKEN_FILEUndocumentedAzure SDKGives the federated token file for Azure workload identity login.
AZURE_IDENTITY_DISABLE_MULTITENANTAUTHUndocumentedAzure SDKTurns off multi-tenant token requests in the Azure identity library, so the configured tenant is always used.
AZURE_LOG_LEVELUndocumentedAzure SDKSets the log level of the bundled Azure SDK logger.
AZURE_PASSWORDUndocumentedAzure SDKGives the password for the Azure username and password credential.
AZURE_POD_IDENTITY_AUTHORITY_HOSTUndocumentedAzure SDKSets the Azure pod identity authority host for managed identity login in the bundled MSAL library.
AZURE_REGIONAL_AUTHORITY_NAMEUndocumentedAzure SDKSets the regional authority name for MSAL token requests.
AZURE_TENANT_IDDocumentedAzure SDKGives the Azure tenant ID for the bundled Azure identity credentials.
AZURE_TOKEN_CREDENTIALSUndocumentedAzure SDKPicks which Azure credential chain DefaultAzureCredential uses.
AZURE_USERNAMEUndocumentedAzure SDKGives the username for the Azure username and password credential.
BUF_BIGINT_DISABLEUndocumentedprotobufTurns off native BigInt use in the bundled protobuf library, so it uses its fallback int64 code.
BUN_DISABLE_DYNAMIC_CHUNK_SIZEUndocumentedBun runtimeTurns off dynamic chunk size tuning for native readable streams in the Bun runtime.
BUN_FEATURE_FLAG_VERBOSE_WARNINGSUndocumentedBun runtimeShows the Bun runtime warning for unsupported async_hooks use.
BUN_INSPECT_NOTIFYUndocumentedBun runtimeTells the Bun inspector where to report that it listens.
BUN_PORTUndocumentedBun runtimeGives a fallback port for the Bun dev server when the default port is busy.
CHOKIDAR_INTERVALUndocumentedchokidarSets the poll interval for the bundled chokidar file watcher when polling is on.
CHOKIDAR_USEPOLLINGUndocumentedchokidarForces the bundled chokidar file watcher to use polling or not.
CLOUD_RUN_JOBUndocumentedGoogle authMarks a Google Cloud Run job.
DATABASE_URLDocumentedBun SQLGives the default connection URL to the embedded Bun SQL client.
DATABASEURLUndocumentedBun SQLIs a second spelling of DATABASE_URL for the embedded Bun SQL client.
DEBUG_AUTHUndocumentedGoogle authPrints GCP metadata detection errors with console.info.
DETECT_GCP_RETRIESUndocumentedGoogle authSets the number of retries for GCP metadata server detection.
FUNCTION_NAMEUndocumentedGoogle authMarks a Google Cloud Functions runtime in the bundled Google auth library.
FUNCTION_TARGETUndocumentedGoogle authMarks a Google Cloud Functions runtime in the bundled Google auth library.
GAE_MODULE_NAMEUndocumentedGoogle authMarks a Google App Engine runtime in the bundled Google auth library.
GAE_SERVICEUndocumentedGoogle authMarks a Google App Engine runtime in the bundled Google auth library.
GCE_METADATA_HOSTUndocumentedGoogle authSets the host of the Compute Engine metadata server for the bundled Google auth library.
GCE_METADATA_IPUndocumentedGoogle authSets the address of the Compute Engine metadata server for the bundled Google auth library.
GOOGLE_API_CERTIFICATE_CONFIGUndocumentedGoogle authPath of the certificate config for mTLS in the bundled Google auth library.
GOOGLE_CLOUD_QUOTA_PROJECTUndocumentedGoogle authSets the quota project of the credential in the bundled Google auth library.
GRACEFUL_FS_PLATFORMUndocumentedgraceful-fsOverrides the platform name that the bundled graceful-fs patches use.
GRPC_DEFAULT_SSL_ROOTS_FILE_PATHUndocumentedgRPCPath of a root certificate file that the bundled gRPC library loads as its TLS roots.
GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTIONUndocumentedgRPCTurns the gRPC outlier detection load balancer on or off.
GRPC_NODE_TRACEUndocumentedgRPCLists the gRPC tracers to turn on.
GRPC_NODE_USE_ALTERNATIVE_RESOLVERUndocumentedgRPCMakes the gRPC DNS resolver use the alternative path when it is true.
GRPC_NODE_VERBOSITYUndocumentedgRPCSets the gRPC log level.
GRPC_SSL_CIPHER_SUITESUndocumentedgRPCSets the TLS cipher suites of the bundled gRPC library.
GRPC_TRACEUndocumentedgRPCLists the gRPC tracers to turn on.
GRPC_VERBOSITYUndocumentedgRPCSets the gRPC log level.
LRU_CACHE_IGNORE_AC_WARNINGUndocumentedlru-cacheSet to 1 to hide the lru-cache warning about a missing AbortController.
MARIADB_DATABASEUndocumentedBun SQLSets the database of the MariaDB connection of the embedded Bun SQL client.
MARIADB_HOSTUndocumentedBun SQLSets the host of the MariaDB connection of the embedded Bun SQL client.
MARIADB_PASSWORDUndocumentedBun SQLSets the password of the MariaDB connection of the embedded Bun SQL client.
MARIADB_PORTUndocumentedBun SQLSets the port of the MariaDB connection of the embedded Bun SQL client.
MARIADB_URLUndocumentedBun SQLGives the default MariaDB connection URL to the embedded Bun SQL client.
MARIADB_USERUndocumentedBun SQLSets the user of the MariaDB connection of the embedded Bun SQL client.
MARIADBDATABASEUndocumentedBun SQLIs another spelling of MARIADB_DATABASE.
MARIADBHOSTUndocumentedBun SQLIs another spelling of MARIADB_HOST.
MARIADBPASSWORDUndocumentedBun SQLIs another spelling of MARIADB_PASSWORD.
MARIADBPORTUndocumentedBun SQLIs another spelling of MARIADB_PORT.
MARIADBURLUndocumentedBun SQLIs another spelling of MARIADB_URL for the embedded Bun SQL client.
MARIADBUSERUndocumentedBun SQLIs another spelling of MARIADB_USER.
MYSQL_DATABASEUndocumentedBun SQLSets the database of the MySQL connection of the embedded Bun SQL client.
MYSQL_HOSTUndocumentedBun SQLSets the host of the MySQL connection of the embedded Bun SQL client.
MYSQL_PASSWORDUndocumentedBun SQLSets the password of the MySQL connection of the embedded Bun SQL client.
MYSQL_PORTUndocumentedBun SQLSets the port of the MySQL connection of the embedded Bun SQL client.
MYSQL_URLUndocumentedBun SQLGives the default MySQL connection URL to the embedded Bun SQL client.
MYSQL_USERUndocumentedBun SQLSets the user of the MySQL connection of the embedded Bun SQL client.
MYSQLDATABASEUndocumentedBun SQLIs another spelling of MYSQL_DATABASE.
MYSQLHOSTUndocumentedBun SQLIs another spelling of MYSQL_HOST.
MYSQLPASSWORDUndocumentedBun SQLIs another spelling of MYSQL_PASSWORD.
MYSQLPORTUndocumentedBun SQLIs another spelling of MYSQL_PORT.
MYSQLURLUndocumentedBun SQLIs another spelling of MYSQL_URL for the embedded Bun SQL client.
MYSQLUSERUndocumentedBun SQLIs another spelling of MYSQL_USER.
NODE_CHANNEL_FDUndocumentedBun runtimeBun runtime: if set, the process has an IPC channel and send and disconnect are stubbed in workers.
NODE_CLUSTER_SCHED_POLICYUndocumentedBun runtimeBun runtime cluster: rr or none picks the scheduling policy.
NODE_DEBUGUndocumentedBun runtimeBun runtime: enables debuglog sections by name.
NODE_DISABLE_COLORSUndocumentedBun runtimeBun runtime: a non-empty value sets terminal color depth to one color.
NODE_NO_READLINEUndocumentedBun runtimeBun REPL: a number that parses to non-zero turns off terminal mode.
NODE_PORTUndocumentedBun runtimeBun dev server: fallback port after PORT and BUN_PORT when the port is in use.
NODE_REPL_EXTERNAL_MODULEUndocumentedBun runtimeBun REPL: path of a module to load in place of the built-in REPL.
NODE_REPL_HISTORYUndocumentedBun runtimeBun REPL: file path for persistent history.
NODE_REPL_HISTORY_SIZEUndocumentedBun runtimeBun REPL: history size.
NODE_REPL_MODEUndocumentedBun runtimeBun REPL: strict or sloppy mode.
NODE_UNIQUE_IDUndocumentedBun runtimeBun runtime cluster: gives the worker id of a forked worker and is deleted after use.
OSTYPEUndocumentedwhichThe bundled which code treats cygwin or msys as a Windows-style path list.
PASSWORDDocumentedBun SQLGives a fallback password to the embedded Bun SQL client.
PG_DATABASEUndocumentedBun SQLSets the database of the Postgres connection of the embedded Bun SQL client.
PG_HOSTUndocumentedBun SQLSets the host of the Postgres connection of the embedded Bun SQL client.
PG_PASSWORDUndocumentedBun SQLSets the password of the Postgres connection of the embedded Bun SQL client.
PG_PORTUndocumentedBun SQLSets the port of the Postgres connection of the embedded Bun SQL client.
PG_SSLMODEUndocumentedBun SQLSets the TLS mode of the Postgres connection of the embedded Bun SQL client.
PG_URLUndocumentedBun SQLIs a third spelling of POSTGRES_URL for the embedded Bun SQL client.
PG_USERUndocumentedBun SQLSets the user of the Postgres connection of the embedded Bun SQL client.
PGDATABASEUndocumentedBun SQLIs another spelling of PG_DATABASE.
PGHOSTUndocumentedBun SQLIs another spelling of PG_HOST.
PGPASSWORDUndocumentedBun SQLIs another spelling of PG_PASSWORD.
PGPORTUndocumentedBun SQLIs another spelling of PG_PORT.
PGSSLMODEUndocumentedBun SQLIs another spelling of PG_SSLMODE.
PGURLUndocumentedBun SQLIs another spelling of POSTGRES_URL for the embedded Bun SQL client.
PGUSERUndocumentedBun SQLIs another spelling of PG_USER.
POSTGRES_URLUndocumentedBun SQLGives the default Postgres connection URL to the embedded Bun SQL client.
SQLITE_URLUndocumentedBun SQLGives the default SQLite connection URL to the embedded Bun SQL client.
SQLITEURLUndocumentedBun SQLIs another spelling of SQLITE_URL for the embedded Bun SQL client.
TEAMCITY_VERSIONUndocumentedcolor supportTeamCity CI variable.
TLS_DATABASE_URLUndocumentedBun SQLGives a default URL and turns on TLS for the embedded Bun SQL client.
TLS_MARIADB_DATABASE_URLUndocumentedBun SQLGives the MariaDB URL and turns on TLS for the embedded Bun SQL client.
TLS_MYSQL_DATABASE_URLUndocumentedBun SQLGives the MySQL URL and turns on TLS for the embedded Bun SQL client.
TLS_POSTGRES_DATABASE_URLUndocumentedBun SQLGives the Postgres URL and turns on TLS for the embedded Bun SQL client.
VERBOSE_SSRUndocumentedBun runtimeBun's server-side rendering debug flag.

How It Works​

The names were found by scanning strings in the program, so the list can miss names built 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.304 binary) and the Environment Variables page of the official docs.