Documentation
¶
Index ¶
- func Execute(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) (err error)
- func ExitCode(err error) int
- func VersionString() string
- type CLI
- type CompletionCmd
- type DoctorCmd
- type LocalSessionsCmd
- type LocalSessionsDeleteCmd
- type LocalSessionsListCmd
- type LocalSessionsPathCmd
- type LocalSessionsPruneCmd
- type LocalSessionsShowCmd
- type LoginCmd
- type LogoutCmd
- type MCPCmd
- type NativeHostCmd
- type PinCmd
- type PinsCmd
- type RootFlags
- type SearchCmd
- type SessionCmd
- type SessionsCmd
- type SetupLocalCmd
- type VersionCmd
- type WhoamiCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) (err error)
Execute parses args and dispatches to the selected command.
func VersionString ¶
func VersionString() string
VersionString returns the human-readable version string.
Types ¶
type CLI ¶
type CLI struct {
RootFlags
Version kong.VersionFlag `name:"version" help:"Show version."`
Sessions SessionsCmd `cmd:"" name:"sessions" help:"List sessions."`
Session SessionCmd `cmd:"" name:"session" help:"Show a session."`
Pin PinCmd `cmd:"" name:"pin" help:"Show a pin."`
Pins PinsCmd `cmd:"" name:"pins" help:"List pins."`
Search SearchCmd `cmd:"" name:"search" help:"Search Disbug data."`
Login LoginCmd `cmd:"" name:"login" help:"Log in to Disbug."`
Logout LogoutCmd `cmd:"" name:"logout" help:"Log out of Disbug."`
Whoami WhoamiCmd `cmd:"" name:"whoami" help:"Show the current user."`
Doctor DoctorCmd `cmd:"" name:"doctor" help:"Check CLI configuration."`
MCP MCPCmd `cmd:"" name:"mcp" help:"Run MCP integration commands."`
NativeHost NativeHostCmd `cmd:"" name:"native-host" help:"Run the browser native messaging host."`
SetupLocal SetupLocalCmd `cmd:"" name:"setup-local" help:"Install local AI handoff support."`
LocalSessions LocalSessionsCmd `cmd:"" name:"local-sessions" help:"Manage local sessions."`
Completion CompletionCmd `cmd:"" name:"completion" help:"Generate shell completion scripts."`
VersionCmd VersionCmd `cmd:"" name:"version" help:"Print the disbug version."`
}
CLI is the root Kong command graph.
type CompletionCmd ¶
type CompletionCmd struct {
Shell string `arg:"" enum:"bash,zsh,fish,powershell" help:"Shell to generate completions for."`
}
CompletionCmd prints shell completion scripts.
func (CompletionCmd) Run ¶
func (c CompletionCmd) Run(b bindings) error
Run writes the placeholder shell completion script.
type DoctorCmd ¶
type DoctorCmd struct{}
DoctorCmd checks local CLI configuration and backend compatibility.
type LocalSessionsCmd ¶
type LocalSessionsCmd struct {
List LocalSessionsListCmd `cmd:"" name:"list" help:"List local sessions."`
Show LocalSessionsShowCmd `cmd:"" name:"show" help:"Show local session metadata."`
Delete LocalSessionsDeleteCmd `cmd:"" name:"delete" help:"Delete a local session."`
Prune LocalSessionsPruneCmd `cmd:"" name:"prune" help:"Delete old local sessions."`
Path LocalSessionsPathCmd `cmd:"" name:"path" help:"Print the local session store path."`
}
LocalSessionsCmd manages local reports written by native-host.
type LocalSessionsDeleteCmd ¶
type LocalSessionsDeleteCmd struct {
ID string `arg:"" name:"local-id" help:"Local session id."`
}
LocalSessionsDeleteCmd deletes one local session.
type LocalSessionsListCmd ¶
type LocalSessionsListCmd struct {
Limit int `default:"50" help:"Maximum sessions to return."`
}
LocalSessionsListCmd lists committed local sessions.
type LocalSessionsPathCmd ¶
type LocalSessionsPathCmd struct{}
LocalSessionsPathCmd prints the local session store path.
type LocalSessionsPruneCmd ¶
type LocalSessionsPruneCmd struct {
OlderThan string `name:"older-than" required:"" help:"Delete sessions older than duration, e.g. 30d or 12h."`
}
LocalSessionsPruneCmd deletes local sessions older than the requested age.
type LocalSessionsShowCmd ¶
type LocalSessionsShowCmd struct {
ID string `arg:"" name:"local-id" help:"Local session id."`
}
LocalSessionsShowCmd shows one local session.
type LoginCmd ¶
type LoginCmd struct {
Name string `help:"Agent name to pre-fill. Defaults to hostname."`
APIURL string `name:"api-url" env:"DISBUG_API_URL" default:"https://disbug.io" help:"Disbug API URL."`
ListenAddr string `name:"listen-addr" help:"Local listener host:port override."`
Manual bool `help:"Print auth URL and paste redirect URL back instead of listening."`
NoBrowser bool `name:"no-browser" help:"Print auth URL instead of opening the browser."`
Force bool `help:"Overwrite an existing token profile."`
Token *string `help:"Set token directly."`
TokenFromStdin bool `name:"token-from-stdin" help:"Read token from the first stdin line."`
TokenFromEnv bool `name:"token-from-env" help:"Read token from DISBUG_LOGIN_TOKEN."`
}
LoginCmd logs in to Disbug and persists a token profile.
type LogoutCmd ¶
type LogoutCmd struct {
LocalOnly bool `name:"local-only" help:"Skip server revoke; just delete local profile."`
}
LogoutCmd logs out by revoking the current token and removing the local profile.
type NativeHostCmd ¶
type NativeHostCmd struct{}
NativeHostCmd runs the Chrome native messaging host.
type PinCmd ¶
type PinCmd struct {
Ref string `arg:"" name:"pin" help:"Pin reference (e.g. 7392.2)"`
Fields string `help:"Comma-separated fields: screenshot,console,network,events,replay,voice_note,video,all" default:"all"`
}
PinCmd shows a single pin by session and pin number.
type PinsCmd ¶
type PinsCmd struct {
Refs []string `arg:"" name:"refs" help:"One or more pin refs (e.g. 7392.2 or 7392.2:console,network)"`
Fields string `help:"Default fields when ref omits :<fields>" default:"all"`
}
PinsCmd fetches multiple pins by session and pin number.
type RootFlags ¶
type RootFlags struct {
Pretty bool `help:"Indent JSON output with 2 spaces."`
Profile string `default:"default" env:"DISBUG_PROFILE" help:"Configuration profile to use."`
Verbose bool `short:"v" help:"Enable verbose logging."`
}
RootFlags are global flags accepted by every command.
type SearchCmd ¶
type SearchCmd struct {
Query string `arg:"" name:"query" help:"Search query"`
Scope string `help:"Search scope" enum:"sessions,pins" default:"sessions"`
Limit int `help:"Max results (1-50)" default:"20"`
}
SearchCmd searches sessions or pins.
type SessionCmd ¶
type SessionCmd struct {
Ref string `arg:"" name:"session" help:"Session id (e.g. 7392)"`
}
SessionCmd shows a single session.
type SessionsCmd ¶
type SessionsCmd struct {
Status string `help:"Filter by status" enum:"open,resolved,dismissed," default:""`
Project string `help:"Filter by project slug"`
Limit int `help:"Max results (1-100)" default:"50"`
Cursor string `help:"Pagination cursor"`
}
SessionsCmd lists sessions.
type SetupLocalCmd ¶
type SetupLocalCmd struct {
ExtensionIDs []string `name:"extension-id" help:"Chrome extension id to allow. Repeat for production and dev ids."`
SkipMCP bool `name:"skip-mcp" help:"Install browser native-host manifests without editing MCP configs."`
}
SetupLocalCmd installs local native-host and MCP configuration.