settings

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 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 settings persists user choices that are not secrets, alongside the cookie files in ~/.cu-cli.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilePath

func FilePath() (string, error)

func Save

func Save(s Settings) error

Types

type LoginMethod

type LoginMethod string

LoginMethod records how the user prefers to obtain the LMS cookie.

const (
	// LoginMethodUnset means the first-run prompt has not happened yet.
	LoginMethodUnset LoginMethod = ""
	// LoginMethodManual copies bff.cookie out of an already-open browser.
	LoginMethodManual LoginMethod = "manual"
	// LoginMethodBrowser drives Chrome over CDP and captures the cookie.
	LoginMethodBrowser LoginMethod = "browser"
)

type Settings

type Settings struct {
	LoginMethod LoginMethod `json:"login_method,omitempty"`
}

Settings is the on-disk shape of ~/.cu-cli/config.json.

func Load

func Load() (Settings, error)

Load returns zero-valued Settings when the file is absent, so a fresh install is indistinguishable from "nothing chosen yet".

Jump to

Keyboard shortcuts

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