setup

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 12 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 setup registers ka with the coding agents installed on this machine: the ka MCP server and the ka skill, at the user level, so every project the user opens gets them. `ka setup` runs it; it is safe to run again (it replaces ka's own entries and touches nothing else).

Each agent is configured through its own CLI where the vendor documents an add command, and otherwise by merging into its JSON config file. The formats follow the vendors' documentation as of 2026-11.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Agents

func Agents() []string

Agents lists the agents setup knows, by ID.

Types

type Options

type Options struct {
	// Ka is the command agents run (an absolute path, so GUI apps that don't
	// read the shell's PATH still find it).
	Ka string
	// Only limits setup to these agent IDs (empty: every detected agent).
	Only []string
	// DryRun reports what would change without changing it.
	DryRun bool
	// Home overrides the home directory (tests).
	Home string
	// LookPath overrides exec.LookPath (tests).
	LookPath func(string) (string, error)
	// Run overrides running an agent's CLI (tests).
	Run func(ctx context.Context, name string, args ...string) error
}

Options control a run.

type Result

type Result struct {
	Agent  string `json:"agent"`
	Name   string `json:"name"`
	Status string `json:"status"` // configured, skipped, failed, planned
	Detail string `json:"detail,omitempty"`
}

Result is what happened for one agent or step.

func Run

func Run(ctx context.Context, o Options, skill string) ([]Result, error)

Run configures every detected agent (or those in o.Only) and installs the skill. skill is the SKILL.md content.

Jump to

Keyboard shortcuts

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