workcli

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package workcli wires the `work` command-line surface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(args []string) int

Types

type CLI

type CLI struct {
	Verbose     bool             `short:"v" help:"enable debug logs"`
	NoColor     bool             `name:"no-color" help:"disable colorized output"`
	JSON        bool             `help:"emit machine-readable JSON output"`
	Store       string           `help:"path to the work store" default:".work"`
	VersionFlag kong.VersionFlag `name:"version" help:"print version and exit"`

	Init    InitCmd    `cmd:"" help:"initialize a work store"`
	Inbox   InboxCmd   `cmd:"" help:"capture and list inbox items"`
	Triage  TriageCmd  `cmd:"" help:"triage inbox items"`
	New     NewCmd     `cmd:"" help:"create a work item"`
	Claim   ClaimCmd   `cmd:"" help:"claim a work item lease"`
	Migrate MigrateCmd `cmd:"" help:"migrate older work store records"`
	View    ViewCmd    `cmd:"" help:"list a named work view"`
	Show    ShowCmd    `cmd:"" help:"show a work item"`
	Version VersionCmd `cmd:"" help:"print build metadata"`
	// contains filtered or unexported fields
}

type ClaimCmd added in v0.2.0

type ClaimCmd struct {
	ID      string        `arg:"" help:"work item id"`
	Actor   string        `help:"actor id; defaults to WORK_ACTOR or USER@hostname"`
	Owner   string        `help:"alias for --actor"`
	TTL     time.Duration `help:"lease duration" default:"1h"`
	Session string        `help:"runtime session id"`
	Thread  string        `help:"runtime thread id"`
	Turn    string        `help:"runtime turn id"`
}

func (*ClaimCmd) Run added in v0.2.0

func (c *ClaimCmd) Run(globals *CLI) error

type InboxAddCmd

type InboxAddCmd struct {
	Title  string   `arg:"" help:"inbox item title"`
	Body   string   `help:"inbox item body"`
	Source string   `help:"source reference"`
	Labels []string `name:"label" help:"label to attach; repeatable"`
}

func (*InboxAddCmd) Run

func (c *InboxAddCmd) Run(globals *CLI) error

type InboxCmd

type InboxCmd struct {
	List InboxListCmd `cmd:"" default:"1" hidden:"" help:"list inbox items"`
	Add  InboxAddCmd  `cmd:"" help:"add an inbox item"`
}

type InboxListCmd

type InboxListCmd struct{}

func (*InboxListCmd) Run

func (c *InboxListCmd) Run(globals *CLI) error

type InitCmd

type InitCmd struct{}

func (*InitCmd) Run

func (c *InitCmd) Run(globals *CLI) error

type MigrateCmd added in v0.2.1

type MigrateCmd struct {
	DryRun bool `help:"report migrations without writing files"`
}

func (*MigrateCmd) Run added in v0.2.1

func (c *MigrateCmd) Run(globals *CLI) error

type NewCmd

type NewCmd struct {
	Title       string   `arg:"" help:"work item title"`
	Type        string   `help:"work type id"`
	Description string   `help:"work item description"`
	Status      string   `help:"initial work status" enum:"ready,active,blocked,done,cancelled" default:"ready"`
	Priority    string   `help:"priority label"`
	Area        string   `help:"work area"`
	Labels      []string `name:"label" help:"label to attach; repeatable"`
}

func (*NewCmd) Run

func (c *NewCmd) Run(globals *CLI) error

type ShowCmd

type ShowCmd struct {
	ID     string `arg:"" help:"work item id"`
	Policy bool   `help:"print the work type policy for a typed work item"`
}

func (*ShowCmd) Run

func (c *ShowCmd) Run(globals *CLI) error

type TriageAcceptCmd

type TriageAcceptCmd struct {
	ID          string   `arg:"" help:"inbox item id"`
	Title       string   `help:"work item title override"`
	Type        string   `help:"work type id"`
	Description string   `help:"work item description override"`
	Status      string   `help:"initial work status" enum:"ready,active,blocked,done,cancelled" default:"ready"`
	Priority    string   `help:"priority label"`
	Area        string   `help:"work area"`
	Labels      []string `name:"label" help:"label to attach; repeatable"`
}

func (*TriageAcceptCmd) Run

func (c *TriageAcceptCmd) Run(globals *CLI) error

type TriageCmd

type TriageCmd struct {
	Accept TriageAcceptCmd `cmd:"" help:"accept an inbox item"`
}

type VersionCmd

type VersionCmd struct {
	Check bool `help:"check the latest GitHub release"`
}

func (*VersionCmd) Run

func (c *VersionCmd) Run(globals *CLI) error

type ViewCmd

type ViewCmd struct {
	Name string `arg:"" optional:"" default:"ready" help:"view name"`
}

func (*ViewCmd) Run

func (c *ViewCmd) Run(globals *CLI) error

Jump to

Keyboard shortcuts

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