Documentation
¶
Overview ¶
Package setup installs what Jade can use but does not ship — language servers today, plugins later — behind `jade-mcp install`.
Nothing runs without being shown first: every component lists the exact command it would run, a menu asks which to install and confirms once, and a component with no installer on the machine gets manual instructions instead of a guess.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInstallFailed = errors.New("some installs failed")
ErrInstallFailed reports that at least one installer failed.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
// Key selects it on the command line: go, java, scala…
Key string
// Kind groups the menu. Plugins will be a second kind.
Kind string
Name string
// For is who it serves, as the menu shows it.
For string
// Languages are the Jade language identifiers it provides a server for.
Languages []string
// Detect reports where it is installed.
Detect func() (string, bool)
// Recipes are tried in order; the first whose Needs is on the machine is
// the one offered.
Recipes []Recipe
// Manual says how to install it by hand when no recipe fits.
Manual string
// Note is shown after installing: a prerequisite or an opt-in.
Note string
}
Component is one thing Jade can install.
func LanguageServers ¶
func LanguageServers() []Component
LanguageServers lists the language servers Jade can use, JVM and Go first.
type Environment ¶
type Environment struct {
LookPath func(string) (string, error)
Run func(command []string, out io.Writer) error
}
Environment is the machine a menu works on, replaceable in tests.
type Menu ¶
Menu lists components and installs the ones picked.
func (Menu) Install ¶
Install installs the components with the given keys, or every missing one, without asking. dryRun prints the commands instead of running them, so an agent can show them to its user first.
func (Menu) List ¶
func (m Menu) List()
List prints each component, whether it is installed, and how it would be.
type Status ¶
type Status struct {
Key string `json:"key"`
Kind string `json:"kind"`
Name string `json:"name"`
For string `json:"for"`
Installed bool `json:"installed"`
Path string `json:"path,omitempty"`
Command []string `json:"command,omitempty"`
Manual string `json:"manual,omitempty"`
Note string `json:"note,omitempty"`
}
Status is one component's state as an agent reads it from `jade-mcp install --list --json`.