install

package
v0.16.521 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: AGPL-3.0 Imports: 11 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 install puts Claude Code or Codex on the machine as a job of five steps the hub's UI shows live: the system is checked, the provider's servers are reached, the CLI is downloaded, installed, and started once to see it runs. Claude Code comes from Anthropic's native installer into ~/.local/bin; Codex from npm into ~/.local.

Index

Constants

View Source
const (
	StepSystem   = "system"
	StepProvider = "provider"
	StepDownload = "download"
	StepInstall  = "install"
	StepVerify   = "verify"
)

Step ids, in order (docs/hub/api.md).

Variables

View Source
var ErrBusy = errors.New("an install of this agent is already running")

ErrBusy: an install of that provider is already running.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	// Shell runs scripts in the login shell, EnvDir is where the env files are (a proxy among them).
	Shell  agents.LoginRunner
	EnvDir string
	// Home is the account's home folder; JobsDir holds each job's scratch folder.
	Home    string
	JobsDir string
	// Preflight is a fresh report of the system; Check the provider check through the proxy the agent has.
	Preflight func(ctx context.Context) hubproto.PreflightReport
	Check     func(ctx context.Context, provider string) hubproto.ProviderCheck
	// Emit gets a copy of the job after every change; Done is told when a job ended, for the agent to refresh statuses.
	Emit func(hubproto.Job)
	Done func(provider string, ok bool)
}

Deps are what an install needs of the rest of the agent.

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager runs install jobs, one per provider at a time.

func NewManager

func NewManager(ctx context.Context, d Deps) *Manager

NewManager is a manager whose jobs stop when ctx ends.

func (*Manager) Get

func (m *Manager) Get(id string) (hubproto.Job, bool)

Get is a copy of a job.

func (*Manager) Start

func (m *Manager) Start(jobID, provider string, fromProvider bool) error

Start begins the job for the hub's jobId. fromProvider marks system as done and starts at the provider step.

func (*Manager) Wait

func (m *Manager) Wait()

Wait blocks until the running jobs end.

Jump to

Keyboard shortcuts

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