इसे छोड़कर कंटेंट पर जाएं

Environment variable reference

यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।

Environment variables carry credentials and process-scoped overrides. Settings files and command flags keep their documented precedence; a similarly named variable is not automatically supported. Provider adapters read their own vendor key names, which the adapter defines rather than this list.

Section titled “Which variables configure models, providers, and search?”
VariableControls
PI_SMOL_MODELDefault model for the lightweight role, equivalent to --smol
PI_SLOW_MODELDefault model for the reasoning role, equivalent to --slow
PI_PLAN_MODELDefault model for the planning role, equivalent to --plan
XCSH_LOCALEInterface locale, ahead of PI_LOCALE and LANG

A flag beats the variable: --smol overrides PI_SMOL_MODEL for that invocation. Model selection stays a model-registry decision, so a name these variables set must still resolve through xcsh --list-models <PROVIDER>.

Which variables address an F5 Distributed Cloud tenant?

Section titled “Which variables address an F5 Distributed Cloud tenant?”
VariableControls
XCSH_API_URLTenant application programming interface (API) endpoint when no named context is active
XCSH_API_TOKENTenant API credential for that endpoint
XCSH_TENANTTenant identifier reported in context status
XCSH_CONTEXT_NAMEName of the context the session binds to
XCSH_NAMESPACENamespace applied when a command does not pass -n and recorded in resource operation records

Treat every value in this group as a secret. Supply them through the runtime environment or a named context, never through a committed file or a command argument that reaches shell history.

Which variables configure Python, shell, and tool execution?

Section titled “Which variables configure Python, shell, and tool execution?”
VariableControls
PI_PYTHON_GATEWAY_URLEndpoint the Python tool sends code to
PI_PYTHON_GATEWAY_TOKENCredential for that gateway
PI_PYTHON_SKIP_CHECKSkips the gateway warm-up probe
PI_SHELL_PREFIXCommand prefix wrapped around shell tool invocations
PI_BASH_NO_LOGINRuns the shell without -l
PI_NO_PTYDisables pseudo-terminal (PTY) execution, equivalent to --no-pty
PI_EDIT_VARIANTSelects the edit tool implementation and rejects an unknown value

Shell execution inherits the launched process environment, subject to the sandbox and command policy. Restrict dependencies, working directory, and credentials at the process boundary rather than in the prompt.

Which variables configure storage, runtime, and diagnostics?

Section titled “Which variables configure storage, runtime, and diagnostics?”
VariableControls
PI_CODING_AGENT_DIRPrimary agent data root, including session storage
PI_CONFIG_DIRConfiguration root directory name, .xcsh by default
PI_PACKAGE_DIRPackaged asset directory the runtime resolves against
PI_SESSION_FILESession file a child process attaches to
PI_NATIVE_VARIANTHardware variant the native addon loader prefers
PI_CACHE_RETENTIONCache retention policy, short by default
PI_NO_TITLEDisables title auto-generation, equivalent to --no-title
PI_NOTIFICATIONSDesktop notification behavior
PI_DEBUG_STARTUPStartup phase diagnostics
PI_TIMINGPhase timing output
PI_TUI_DEBUGTerminal user interface (TUI) rendering diagnostics

Project configuration stays under .xcsh/ even when PI_CODING_AGENT_DIR moves the user root. Never print a credential-bearing variable into a diagnostic receipt; name the variable and state whether it was set.

Set a variable only in the process that needs it, then use the relevant read-only command or a no-tool prompt to confirm selection. Environment values can override files and may be inherited by subprocesses; never print tokens while diagnosing precedence. To undo a test, unset the variable in the same shell and start a new xcsh process because an existing process has already captured its environment.