Skip to content

Paths

paths

Canonical path constants for Crux's ~/.crux/ home directory.

All paths respect two environment variables
  • CRUX_HOME Override the default ~/.crux/ root
  • CRUX_TEST_ROOT If set, ALL paths are rooted under this directory instead of ~/.crux/ (used for test isolation)

crux_home

crux_home()

Return the resolved Crux home directory.

Source code in src/crux_cli/paths.py
def crux_home() -> Path:
    """Return the resolved Crux home directory."""
    return _resolve_crux_home()

registry_path

registry_path()

Path to the local plugin/MCP registry.

Source code in src/crux_cli/paths.py
def registry_path() -> Path:
    """Path to the local plugin/MCP registry."""
    return crux_home() / "registry.json"

mcps_dir

mcps_dir()

Directory containing installed MCP server configurations.

Source code in src/crux_cli/paths.py
def mcps_dir() -> Path:
    """Directory containing installed MCP server configurations."""
    return crux_home() / "mcps"

launchers_dir

launchers_dir()

Directory containing generated MCP launcher scripts (legacy).

Source code in src/crux_cli/paths.py
def launchers_dir() -> Path:
    """Directory containing generated MCP launcher scripts (legacy)."""
    return crux_home() / "mcps" / "launchers"

shared_launchers_dir

shared_launchers_dir()

Directory containing shared (non-generated) launcher scripts.

Source code in src/crux_cli/paths.py
def shared_launchers_dir() -> Path:
    """Directory containing shared (non-generated) launcher scripts."""
    return crux_home() / "launchers"

skills_dir

skills_dir()

Directory containing installed skills.

Source code in src/crux_cli/paths.py
def skills_dir() -> Path:
    """Directory containing installed skills."""
    return crux_home() / "skills"

sandbox_dir

sandbox_dir()

Directory containing run sandboxes.

Source code in src/crux_cli/paths.py
def sandbox_dir() -> Path:
    """Directory containing run sandboxes."""
    return crux_home() / "sandbox"

projects_path

projects_path()

Path to the projects index file.

Source code in src/crux_cli/paths.py
def projects_path() -> Path:
    """Path to the projects index file."""
    return crux_home() / "projects.json"

secrets_path

secrets_path()

Path to the secrets index file.

Source code in src/crux_cli/paths.py
def secrets_path() -> Path:
    """Path to the secrets index file."""
    return crux_home() / "secrets.json"

config_path

config_path()

Path to the user configuration file.

Source code in src/crux_cli/paths.py
def config_path() -> Path:
    """Path to the user configuration file."""
    return crux_home() / "config.toml"

tokens_path

tokens_path()

Path to the OAuth token metadata file.

Source code in src/crux_cli/paths.py
def tokens_path() -> Path:
    """Path to the OAuth token metadata file."""
    return crux_home() / "tokens.json"