cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 44 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 cli wires cobra commands to the vinted client, the store and the output layer. One file per noun. Command handlers stay thin: parse flags, call the client, print.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandTree

func CommandTree(version string) *cobra.Command

CommandTree returns the whole command tree, wired but never executed, so tools outside the package can walk it. The docs generator uses it to build the command reference from the binary rather than from a copy that drifts.

func Execute

func Execute(version string, args []string, stdin io.Reader, stdout, stderr io.Writer) int

Execute runs the CLI and returns the process exit code.

func IsGroup

func IsGroup(cmd *cobra.Command) bool

IsGroup reports whether cmd is a noun that only holds subcommands.

Types

type App

type App struct {
	Version string
	Paths   config.Paths
	Cfg     config.Config
	Creds   config.Credentials
	Profile string
	Client  *vinted.Client
	// Account is the logged-in profile's session in the Galleton daemon;
	// nil when the profile has none.
	Account *managedAccount
	// Gate is the shared cooldown, pacing and budget for the client's site.
	Gate *throttle.Gate
	// Proxy is the proxy all Vinted traffic goes through, without
	// credentials; empty for a direct connection.
	Proxy   string
	Printer output.Printer

	Stdout io.Writer
	Stderr io.Writer
	Stdin  io.Reader

	// Interactive is true only when stdin, stdout and stderr are all TTYs and
	// --no-input is absent. Prompts happen only then.
	Interactive bool
	// contains filtered or unexported fields
}

App is the per-invocation state shared by every command.

func (*App) Store

func (a *App) Store() (*store.Store, error)

Jump to

Keyboard shortcuts

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