paths

package
v0.27.7 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: CC0-1.0 Imports: 3 Imported by: 0

Documentation

Overview

Package paths centralizes resolution of prosa's on-disk locations so the rest of the codebase never hard-codes ~/... or XDG layouts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthPath

func AuthPath() (string, error)

AuthPath is where `prosa login` writes the saved token + server URL.

func ConfigHome

func ConfigHome() (string, error)

ConfigHome returns the user's prosa config directory:

  1. $PROSA_CONFIG_HOME (escape hatch).
  2. $XDG_CONFIG_HOME/prosa (or $HOME/.config/prosa if XDG is unset).

This is intentionally separate from Home() (XDG data) so a tarballed config can travel between machines without dragging the SQLite store + raw tree along.

func Home

func Home() (string, error)

Home returns the prosa data root. Resolution order:

  1. $PROSA_HOME if set (escape hatch for tests and exotic installs).
  2. $XDG_DATA_HOME/prosa (or $HOME/.local/share/prosa if XDG_DATA_HOME is unset).

Cut 1 does not deviate per-OS — XDG layout is used on macOS too, per INTENT.md §4.

func ProfilesPath

func ProfilesPath() (string, error)

ProfilesPath is where `prosa profiles` stores its per-agent config.

func RawRoot

func RawRoot(agent string) (string, error)

RawRoot returns the raw preservation directory for the given agent (e.g. "claude-code" -> $PROSA_HOME/raw/claude-code).

func StorePath

func StorePath() (string, error)

func UserHome

func UserHome() (string, error)

UserHome returns the current user's home directory. Centralised so tests and future overrides have one hook point.

Types

This section is empty.

Jump to

Keyboard shortcuts

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