paths

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package paths gives the configuration, state, and cache folders of the CLI for each OS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Isolated added in v3.2.0

func Isolated() bool

Isolated tells if MAI_HOME is set. Then the CLI keeps all its files in that folder, and it uses no item outside it, for example no legacy item of the keychain.

Types

type Dirs

type Dirs struct {
	Config string
	State  string
	Cache  string
}

Dirs are the folders of the CLI.

func Default

func Default() (Dirs, error)

Default returns the folders for the current user. MAI_HOME, if set, puts all three under one folder; the tests use it.

The state folder holds the key file. It is the folder that fits a secret: it is local to the computer, it does not roam with a Windows profile, and it is not a folder of configuration files that a user can copy to a different computer.

Jump to

Keyboard shortcuts

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