radioactive_ralph¶
import "github.com/jbcom/radioactive-ralph/cmd/radioactive_ralph"
Command radioactive_ralph is the radioactive-ralph CLI entry point.
Ralph is a per-repo orchestration binary with multiple built-in personas. Today the runtime targets the claude CLI, but the long-term contract is provider-oriented rather than Claude-plugin-oriented. See https://github.com/jbcom/radioactive-ralph for the full rationale and architecture plan.
Index¶
Variables¶
Version is set by GoReleaser at build time via -ldflags.
var (
Version = "dev"
Commit = "none"
Date = "unknown"
)
type AttachCmd¶
AttachCmd is `radioactive_ralph attach –variant X`.
type AttachCmd struct {
Variant string `help:"Variant to attach to." required:""`
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
Raw bool `help:"Emit raw JSON-line event frames instead of the default one-line summary."`
}
func (*AttachCmd) Run¶
func (c *AttachCmd) Run(rc *runContext) error
Run streams events from the supervisor until the operator cancels.
type DoctorCmd¶
DoctorCmd is `radioactive_ralph doctor`.
type DoctorCmd struct{}
func (*DoctorCmd) Run¶
func (c *DoctorCmd) Run(rc *runContext) error
Run prints the doctor report.
type InitCmd¶
InitCmd is `radioactive_ralph init`.
type InitCmd struct {
RepoRoot string `help:"Repo root to initialize. Defaults to cwd." type:"path" default:""`
Force bool `help:"Overwrite existing config.toml."`
Refresh bool `help:"Re-discover capabilities while preserving existing operator choices."`
Yes bool `help:"Skip interactive prompts; auto-select first candidate for multi-candidate categories."`
SkipMCP bool `help:"Skip the Claude Code MCP registration step. Default is to register."`
MCPScope string `help:"Scope for the MCP registration: local, user, or project." default:"user" enum:"local,user,project"`
}
func (*InitCmd) Run¶
func (c *InitCmd) Run(rc *runContext) error
Run executes the init subcommand.
type MCPCmd¶
MCPCmd groups MCP server client-registration helpers. These shell out to `claude mcp add/remove/get` rather than editing Claude Code’s config files directly — the CLI is the supported interface, and using it means we stay correct when Claude changes its on-disk format.
type MCPCmd struct {
Register MCPRegisterCmd `cmd:"" help:"Register radioactive_ralph as an MCP server with Claude Code."`
Unregister MCPUnregisterCmd `cmd:"" help:"Remove radioactive_ralph's MCP server registration."`
Status MCPStatusCmd `cmd:"" help:"Show the registered MCP server entry, if any."`
}
type MCPRegisterCmd¶
MCPRegisterCmd is `radioactive_ralph mcp register`. It wires the current binary into Claude Code as a stdio MCP server.
type MCPRegisterCmd struct {
Name string `help:"Registration name." default:"radioactive_ralph"`
Scope string `help:"Config scope: local, user, project." default:"user" enum:"local,user,project"`
Bin string `help:"Path to radioactive_ralph binary. Defaults to argv[0]."`
}
func (*MCPRegisterCmd) Run¶
func (c *MCPRegisterCmd) Run(_ *runContext) error
Run shells out to `claude mcp add`.
type MCPStatusCmd¶
MCPStatusCmd is `radioactive_ralph mcp status`. Shells out to `claude mcp get <name>`; exit code 0 = registered, non-zero = not.
type MCPStatusCmd struct {
Name string `help:"Registration name." default:"radioactive_ralph"`
}
func (*MCPStatusCmd) Run¶
func (c *MCPStatusCmd) Run(_ *runContext) error
Run shells out to `claude mcp get`.
type MCPUnregisterCmd¶
MCPUnregisterCmd is `radioactive_ralph mcp unregister`.
type MCPUnregisterCmd struct {
Name string `help:"Registration name." default:"radioactive_ralph"`
Scope string `help:"Config scope: local, user, project." default:"user" enum:"local,user,project"`
}
func (*MCPUnregisterCmd) Run¶
func (c *MCPUnregisterCmd) Run(_ *runContext) error
Run shells out to `claude mcp remove`.
type PlanCmd¶
PlanCmd is `radioactive_ralph plan <sub>`. This is the durable plan-DAG surface — direct CRUD against the SQLite store under $XDG_STATE_HOME/radioactive_ralph/.
type PlanCmd struct {
Ls PlanLsCmd `cmd:"" help:"List plans for this repo by default. Use --all-repos to widen the view."`
Show PlanShowCmd `cmd:"" help:"Show one plan's tasks and current ready set."`
Next PlanNextCmd `cmd:"" help:"Print the next ready task for a plan (without claiming it)."`
// Import seeds a plan from a JSON file. Used during the
// dogfooding bootstrap before the MCP server + fixit rewire.
Import PlanImportCmd `cmd:"" help:"Import tasks into a new plan from a JSON file."`
// MarkDone lets an operator (or shell script acting as one)
// close out a task manually while we bootstrap.
MarkDone PlanMarkDoneCmd `cmd:"mark-done" help:"Mark a running task as done."`
}
type PlanImportCmd¶
PlanImportCmd implements `plan import <json-file>`.
type PlanImportCmd struct {
Path string `arg:"" help:"Path to JSON file."`
}
func (*PlanImportCmd) Run¶
func (c *PlanImportCmd) Run(rc *runContext) error
type PlanLsCmd¶
PlanLsCmd implements `plan ls`.
type PlanLsCmd struct {
All bool `help:"Include archived + abandoned plans."`
AllRepos bool `help:"Include plans from every repo in the operator state dir."`
}
func (*PlanLsCmd) Run¶
func (c *PlanLsCmd) Run(rc *runContext) error
type PlanMarkDoneCmd¶
PlanMarkDoneCmd implements `plan mark-done <plan> <task>`.
type PlanMarkDoneCmd struct {
PlanIDOrSlug string `arg:"" help:"Plan UUID or slug."`
TaskID string `arg:"" help:"Task id within the plan."`
Evidence string `help:"Evidence payload (JSON or short string)."`
}
func (*PlanMarkDoneCmd) Run¶
func (c *PlanMarkDoneCmd) Run(rc *runContext) error
type PlanNextCmd¶
PlanNextCmd implements `plan next <id-or-slug>`.
type PlanNextCmd struct {
IDOrSlug string `arg:"" help:"Plan UUID or slug."`
JSON bool `help:"Emit the next task as JSON instead of human-readable."`
}
func (*PlanNextCmd) Run¶
func (c *PlanNextCmd) Run(rc *runContext) error
type PlanShowCmd¶
PlanShowCmd implements `plan show <id-or-slug>`.
type PlanShowCmd struct {
IDOrSlug string `arg:"" help:"Plan UUID or slug."`
}
func (*PlanShowCmd) Run¶
func (c *PlanShowCmd) Run(rc *runContext) error
type RunCmd¶
RunCmd is `radioactive_ralph run –variant X`.
type RunCmd struct {
Variant string `help:"Variant name (blue, grey, green, red, professor, fixit, immortal, savage, old-man, world-breaker)." required:""`
Detach bool `help:"Spawn the supervisor in a multiplexer pane and return immediately."`
Foreground bool `help:"Run in the foreground — invoked by launchd/systemd service units."`
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
SpendCapUSD float64 `help:"Spend cap for variants that require one." name:"spend-cap-usd"`
ConfirmBurnBudget bool `help:"Confirmation gate for savage." name:"confirm-burn-budget"`
ConfirmNoMercy bool `help:"Confirmation gate for old-man." name:"confirm-no-mercy"`
ConfirmBurnEverything bool `help:"Confirmation gate for world-breaker." name:"confirm-burn-everything"`
// Fixit-only flags.
Advise bool `help:"(fixit only) Run in advisor mode: scan the codebase, write .radioactive-ralph/plans/<topic>-advisor.md, and sync the first durable DAG plan for this repo. Auto-enabled when no active plan exists for this repo."`
Topic string `help:"(fixit --advise only) Slug used for the output filename (plans/<topic>-advisor.md). Defaults to 'general'."`
Description string `help:"(fixit --advise only) Free-form operator goal. Overrides TOPIC.md. Passed verbatim to the Claude subprocess."`
AutoHandoff bool `help:"(fixit --advise only) When the recommendation has no tradeoffs, spawn the recommended variant as a follow-up run automatically."`
// Advisor refinement thresholds. Operators can also set these in
// .radioactive-ralph/config.toml under [variants.fixit].
MaxIterations int `help:"(fixit --advise only) Max refinement passes. Default 3."`
MinConfidence int `help:"(fixit --advise only) Confidence threshold for accepting a proposal without refinement. Default 70."`
PlanModel string `help:"(fixit --advise only) Claude model tier for planning. Default opus."`
PlanEffort string `help:"(fixit --advise only) Reasoning-effort level for planning (low/medium/high/max). Default high."`
}
func (*RunCmd) Run¶
func (c *RunCmd) Run(rc *runContext) error
Run launches the supervisor for the named variant.
type ServeCmd¶
ServeCmd is `radioactive_ralph serve –mcp`.
Claude Code spawns this as a stdio MCP server. One process = one Claude session; the binary remains the source of truth and the MCP layer is just the structured control plane.
type ServeCmd struct {
MCP bool `help:"Required. Serve the MCP protocol."`
}
func (*ServeCmd) Run¶
func (c *ServeCmd) Run(rc *runContext) error
Run implements the kong-dispatched serve command.
type ServiceCmd¶
ServiceCmd is `radioactive_ralph service <subcommand>`.
type ServiceCmd struct {
Install ServiceInstallCmd `cmd:"" help:"Install a per-user service unit for a variant."`
Uninstall ServiceUninstallCmd `cmd:"" help:"Remove a per-user service unit."`
List ServiceListCmd `cmd:"" help:"List installed service units."`
Status ServiceStatusCmd `cmd:"" help:"Shell out to launchctl/systemctl for live service status."`
}
type ServiceInstallCmd¶
ServiceInstallCmd wires the service.Install filesystem operation.
type ServiceInstallCmd struct {
Variant string `help:"Variant to install." required:""`
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
RalphBin string `help:"Absolute path to the radioactive_ralph binary. Defaults to the currently-running executable." name:"radioactive_ralph-bin"`
ConfirmBurnBudget bool `help:"Confirmation gate for savage." name:"confirm-burn-budget"`
ConfirmNoMercy bool `help:"Confirmation gate for old-man." name:"confirm-no-mercy"`
ConfirmBurnEverything bool `help:"Confirmation gate for world-breaker." name:"confirm-burn-everything"`
Env []string `help:"KEY=VALUE env vars to inject into the service unit (repeatable)."`
}
func (*ServiceInstallCmd) Run¶
func (c *ServiceInstallCmd) Run(_ *runContext) error
Run installs the unit.
type ServiceListCmd¶
ServiceListCmd lists installed units.
type ServiceListCmd struct{}
func (*ServiceListCmd) Run¶
func (c *ServiceListCmd) Run(_ *runContext) error
Run shells out to launchctl/systemctl to enumerate installed units. M2 implementation is simple: list the unit files under the per-user config dir and report their presence. Status is available via the dedicated status subcommand.
type ServiceStatusCmd¶
ServiceStatusCmd invokes the platform service manager for live status.
type ServiceStatusCmd struct {
Variant string `help:"Variant to query." required:""`
}
func (*ServiceStatusCmd) Run¶
func (c *ServiceStatusCmd) Run(_ *runContext) error
Run shells out to launchctl list / systemctl –user status.
type ServiceUninstallCmd¶
ServiceUninstallCmd removes an installed unit.
type ServiceUninstallCmd struct {
Variant string `help:"Variant to remove." required:""`
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
}
func (*ServiceUninstallCmd) Run¶
func (c *ServiceUninstallCmd) Run(_ *runContext) error
Run removes the unit.
type StatusCmd¶
StatusCmd is `radioactive_ralph status –variant X`.
type StatusCmd struct {
Variant string `help:"Variant to query." required:""`
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
JSON bool `help:"Emit status as JSON instead of the default text table."`
}
func (*StatusCmd) Run¶
func (c *StatusCmd) Run(rc *runContext) error
Run dials the supervisor socket and prints the status reply.
type StopCmd¶
StopCmd is `radioactive_ralph stop –variant X`.
type StopCmd struct {
Variant string `help:"Variant to stop." required:""`
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
}
func (*StopCmd) Run¶
func (c *StopCmd) Run(rc *runContext) error
Run asks the supervisor to shut down gracefully.
type SupervisorCmd¶
SupervisorCmd is the hidden `radioactive_ralph _supervisor` entry invoked by service wrappers (launchd/systemd). Human operators use `radioactive_ralph run` instead — which, for now, simply calls through to the same logic. This command exists so the plist/systemd unit can target a stable, internal-only name that won’t get re-pointed at a different code path by a future CLI refactor.
type SupervisorCmd struct {
Variant string `help:"Variant." required:""`
RepoRoot string `help:"Repo root." type:"path" required:""`
}
func (*SupervisorCmd) Run¶
func (c *SupervisorCmd) Run(rc *runContext) error
Run boots a supervisor in the foreground.
Generated by gomarkdoc