setup

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DescribeProviderField added in v0.1.12

func DescribeProviderField(cfg *config.Config, provider, field string) (string, error)

DescribeProviderField returns a print-ready value for `codag config get <provider>.<field>`: secret fields are masked, host/org are shown in full, and an unset field renders as "(unset)". Validates provider and field.

func ProviderKeys added in v0.1.12

func ProviderKeys() []string

ProviderKeys returns the sorted list of known provider keys, for error messages and help text.

func Run

func Run(opts Options) error

Run is the entry point invoked by `codag setup`.

func RunDisable

func RunDisable(opts DisableOptions) error

RunDisable unregisters codag's MCP server from known agent config files. It does not remove auth tokens, provider config, or the codag binary.

func SetProviderField added in v0.1.12

func SetProviderField(cfg *config.Config, provider, field, value string) error

SetProviderField sets one credential field (e.g. provider "datadog", field "api_key") on cfg.Providers, validating both the provider key and the field name. It mutates cfg in place but does NOT persist — the caller saves via config.Save.

Types

type Agent

type Agent struct {
	Name           string // human-readable
	LocationHint   string // where we found it (CLI on PATH, config dir, etc.)
	RegisterMethod string // describe the path we'll take
	Register       func(codagBin string) error
}

Agent is one MCP-aware agent we know how to register codag with.

type DisableOptions

type DisableOptions struct {
	PrintOnly bool
}

type MCPConfigTarget

type MCPConfigTarget struct {
	Name string
	Path string
}

MCPConfigTarget is one known agent config file that may contain a codag MCP server entry. Used by `codag disable`.

type Options

type Options struct {
	PrintOnly  bool
	SkipAgents bool
}

Jump to

Keyboard shortcuts

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