Skip to main content

Module config

Module config 

Source
Expand description

Where yapi keeps its state. Same layout as pi, under yapi’s own directories.

Constants§

AGENT_DIR_ENV
Environment variable overriding the agent directory.
APP_NAME
Application name in messages and paths.
PROJECT_DIR
Project configuration directory name.
PROJECT_ONLY_ENV
Environment variable that turns on project-only mode, as --project-only does. Child processes get it while the mode is on.
SESSION_DIR_ENV
Environment variable overriding the session directory. --session-dir wins.

Functions§

agent_dir
The agent directory: YAPI_CODING_AGENT_DIR, else ~/.yapi/agent.
bin_dir
Executables the agent installs for its tools, prepended to PATH for commands.
child_env
Variables every child process gets, as pi sets them on its own process: the agent markers PI_CODING_AGENT=true and AI_AGENT=yapi, the offline variables in offline mode, YAPI_PROJECT_ONLY=1 in project-only mode, and the proxy from the httpProxy setting where the environment has none.
default_session_dir
Where sessions for cwd live by default: <agent>/sessions/--<cwd with separators as dashes>--, both resolved against the process directory.
docs_dir
The documentation the model reads: yapi’s pages, with pi’s README, docs and examples under pi/. The installer or yapi’s first run puts it here.
env_flag
Whether environment variable name is set to 1, true or yes, as pi reads PI_OFFLINE.
env_set
Whether environment variable name is set and not empty, as pi tests process.env.PI_OFFLINE and PI_SKIP_VERSION_CHECK.
env_var
Environment variable name, with the values offline mode sets.
project_only
Whether project-only mode is on for the process.
set_offline
Turns on offline mode for the process, as pi does for --offline or a true PI_OFFLINE: from then on PI_OFFLINE and PI_SKIP_VERSION_CHECK read as 1 here and in every child’s environment.
set_project_only
Turns on project-only mode for the process: runs load the project’s packages, skills and MCP servers, and of the user’s only those the global projectOnly setting keeps. Every child’s environment gets YAPI_PROJECT_ONLY=1, so a yapi it starts runs in the mode too.