Documentation
¶
Overview ¶
Package commands implements CLI commands for the Fizzy CLI.
Index ¶
- func Execute()
- func GetRootCmd() *cobra.Command
- func IsMachineOutput() bool
- func NewDoctorCmd() *cobra.Command
- func RefreshSkillsIfVersionChanged() bool
- func ResetTestMode()
- func SetTestConfig(token, account, apiURL string)
- func SetTestCreds(store *credstore.Store)
- func SetTestFormat(format output.Format)
- func SetTestProfiles(store *profile.Store)
- func SetTestSDK(baseURL string)
- func SetVersion(v string)
- func TestOutput() string
- type Account
- type Attachment
- type Board
- type Breadcrumb
- type CommandResult
- type CommentAttachment
- type DoctorCheck
- type DoctorProfileResult
- type DoctorResult
- type SkillLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMachineOutput ¶
func IsMachineOutput() bool
IsMachineOutput returns true when output should be treated as machine-consumable. True when any machine format flag is set, --agent is set, or stdout/stdin is not a TTY.
func NewDoctorCmd ¶
func RefreshSkillsIfVersionChanged ¶
func RefreshSkillsIfVersionChanged() bool
RefreshSkillsIfVersionChanged checks the CLI version sentinel and silently refreshes installed skills when the version has changed. Returns true if skills were refreshed.
func SetTestConfig ¶
func SetTestConfig(token, account, apiURL string)
SetTestConfig sets the config for testing.
func SetTestCreds ¶
SetTestCreds sets the credential store for testing.
func SetTestFormat ¶
SetTestFormat reconfigures the output writer with the given format. Must be called after SetTestMode.
func SetTestProfiles ¶
SetTestProfiles sets the profile store for testing.
func SetTestSDK ¶
func SetTestSDK(baseURL string)
SetTestSDK configures the commands package for SDK-based testing. Pass an httptest.Server URL and the SDK will be created pointing at it.
func SetVersion ¶
func SetVersion(v string)
SetVersion sets the CLI version used for `--version` and `version`.
func TestOutput ¶
func TestOutput() string
TestOutput returns the raw output from the last command execution. Useful for verifying non-JSON format output.
Types ¶
type Attachment ¶
type Attachment struct {
Index int `json:"index"`
Filename string `json:"filename"`
ContentType string `json:"content_type"`
Filesize int64 `json:"filesize"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
DownloadURL string `json:"download_url"`
SGID string `json:"sgid"`
}
Attachment represents a parsed attachment from description_html
type Breadcrumb ¶
type Breadcrumb = output.Breadcrumb
Breadcrumb is a type alias for output.Breadcrumb.
type CommandResult ¶
CommandResult holds the result of a command execution for testing.
func SetTestMode ¶
func SetTestMode(mockClient client.API) *CommandResult
SetTestMode configures the commands package for testing. It sets a mock client factory and captures results instead of exiting.
type CommentAttachment ¶
type CommentAttachment struct {
Attachment
CommentID string `json:"comment_id"`
}
CommentAttachment extends Attachment with comment context
type DoctorCheck ¶
type DoctorCheck struct {
Name string `json:"name"`
Status string `json:"status"` // pass, warn, fail, skip
Message string `json:"message"`
Hint string `json:"hint,omitempty"`
}
DoctorCheck represents a single diagnostic check result.
type DoctorProfileResult ¶
type DoctorProfileResult struct {
Name string `json:"name"`
Default bool `json:"default,omitempty"`
Checks []DoctorCheck `json:"checks"`
Passed int `json:"passed"`
Failed int `json:"failed"`
Warned int `json:"warned"`
Skipped int `json:"skipped"`
}
DoctorProfileResult holds diagnostic results for a single profile.
type DoctorResult ¶
type DoctorResult struct {
Checks []DoctorCheck `json:"checks"`
Profiles []DoctorProfileResult `json:"profiles,omitempty"`
Passed int `json:"passed"`
Failed int `json:"failed"`
Warned int `json:"warned"`
Skipped int `json:"skipped"`
}
DoctorResult holds the complete diagnostic results.
func (*DoctorResult) Summary ¶
func (r *DoctorResult) Summary() string
type SkillLocation ¶
SkillLocation represents a predefined skill installation target.
Source Files
¶
- account.go
- activity.go
- attachment.go
- auth.go
- board.go
- card.go
- column.go
- column_color.go
- columns.go
- commands.go
- comment.go
- comment_attachment.go
- completion.go
- config_cmd.go
- doctor.go
- help.go
- identity.go
- inline_attachments.go
- jq.go
- markdown.go
- mcp.go
- migrate.go
- notification.go
- pin.go
- profile_state.go
- pseudocolumns.go
- quickstart.go
- reaction.go
- root.go
- sdk_errors.go
- search.go
- setup.go
- setup_agents.go
- signup.go
- skill.go
- step.go
- tag.go
- token.go
- update.go
- upload.go
- user.go
- version.go
- webhook.go