paths

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package paths resolves Smif's config, data and socket locations.

Defaults follow RFC 8.1 and 5.4. Every location can be overridden with an environment variable, which the tests use to keep socket paths short (macOS limits Unix socket paths to 104 bytes).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaudeDir

func ClaudeDir() string

ClaudeDir is ~/.claude unless CLAUDE_CONFIG_DIR is set.

func CodexDir

func CodexDir() string

CodexDir is ~/.codex unless CODEX_HOME is set.

func ConfigDir

func ConfigDir() string

ConfigDir is ~/.config/smif unless SMIF_CONFIG_DIR is set.

func ConfigFile

func ConfigFile() string

ConfigFile is ConfigDir()/config.toml unless SMIF_CONFIG is set.

func CopilotDir

func CopilotDir() string

CopilotDir is ~/.copilot unless COPILOT_HOME is set.

func DataDir

func DataDir() string

DataDir is the state directory (RFC 8.1).

func EnsureDir

func EnsureDir(dir string) error

EnsureDir creates dir with mode 0700.

func Expand

func Expand(p string) string

Expand replaces a leading ~ with the home directory and cleans the path.

func FactoryDir

func FactoryDir() string

FactoryDir is Droid's ~/.factory. FACTORY_HOME_OVERRIDE stands in for the home folder.

func Home

func Home() string

Home returns the user's home directory, honouring $HOME.

func OpenCodeDB

func OpenCodeDB() string

OpenCodeDB is OpenCode's database: OPENCODE_DB, else under XDG_DATA_HOME, on macOS too. Smif reads only the default channel.

func PartsDir

func PartsDir() string

PartsDir keeps the parts of a prompt (ADR-0020). It is a cache folder and not DataDir, because a path with no spaces stays whole in a prompt, and on macOS DataDir has one.

func QwenDir

func QwenDir() string

QwenDir is ~/.qwen unless QWEN_HOME is set. It holds sessions/.

func QwenRuntimeDir

func QwenRuntimeDir() string

QwenRuntimeDir holds Qwen Code's projects/: QWEN_RUNTIME_DIR moves it apart from QwenDir. Smif does not read the runtimeOutputDir setting.

func Socket

func Socket() string

Socket is the daemon's Unix socket path (RFC 5.4).

func TokenDir

func TokenDir() string

TokenDir holds one token file per agent plus the admin token.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL