commands

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 46 Imported by: 0

Documentation

Overview

Package commands implements the CLI commands.

Package commands implements the CLI commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatalogCommandNames

func CatalogCommandNames() []string

CatalogCommandNames returns all command names from the catalog. Used by tests to verify catalog matches registered commands.

func NewAPICmd

func NewAPICmd() *cobra.Command

NewAPICmd creates the api command for raw API access.

func NewAccountsCmd added in v0.4.0

func NewAccountsCmd() *cobra.Command

NewAccountsCmd creates the accounts command group.

func NewAssignCmd

func NewAssignCmd() *cobra.Command

NewAssignCmd creates the assign command.

func NewAttachCmd added in v0.4.0

func NewAttachCmd() *cobra.Command

NewAttachCmd creates the 'attach' command — a staging primitive for uploading files.

func NewAuthCmd

func NewAuthCmd() *cobra.Command

NewAuthCmd creates the auth command group.

func NewBonfireCmd added in v0.3.0

func NewBonfireCmd() *cobra.Command

NewBonfireCmd creates the bonfire command group.

func NewBoostShortcutCmd

func NewBoostShortcutCmd() *cobra.Command

NewBoostShortcutCmd creates the boost shortcut command for quickly boosting a recording.

func NewBoostsCmd

func NewBoostsCmd() *cobra.Command

NewBoostsCmd creates the boost command for managing boosts.

func NewCampfireCmd

func NewCampfireCmd() *cobra.Command

NewCampfireCmd creates the campfire command for real-time chat.

func NewCardCmd

func NewCardCmd() *cobra.Command

NewCardCmd creates the card command (shortcut for creating cards).

func NewCardsCmd

func NewCardsCmd() *cobra.Command

NewCardsCmd creates the cards command group.

func NewCheckinsCmd

func NewCheckinsCmd() *cobra.Command

NewCheckinsCmd creates the checkins command group.

func NewCommandsCmd

func NewCommandsCmd() *cobra.Command

NewCommandsCmd creates the commands listing command.

func NewCommentCmd

func NewCommentCmd() *cobra.Command

NewCommentCmd creates the 'comment' shortcut (alias for 'comments create').

func NewCommentsCmd

func NewCommentsCmd() *cobra.Command

NewCommentsCmd creates the comments command group (list/show/update).

func NewCompletionCmd

func NewCompletionCmd() *cobra.Command

NewCompletionCmd creates the completion command group.

func NewConfigCmd

func NewConfigCmd() *cobra.Command

NewConfigCmd creates the config command for managing configuration.

func NewDocsCmd

func NewDocsCmd() *cobra.Command

NewDocsCmd creates the docs command alias.

func NewDoctorCmd

func NewDoctorCmd() *cobra.Command

NewDoctorCmd creates the doctor command.

func NewDoneCmd

func NewDoneCmd() *cobra.Command

NewDoneCmd creates the 'done' command as an alias for 'todos complete'.

func NewEventsCmd

func NewEventsCmd() *cobra.Command

NewEventsCmd creates the events command for viewing recording event history.

func NewFilesCmd

func NewFilesCmd() *cobra.Command

NewFilesCmd creates the files command group.

func NewForwardsCmd

func NewForwardsCmd() *cobra.Command

NewForwardsCmd creates the forwards command for managing email forwards.

func NewLineupCmd

func NewLineupCmd() *cobra.Command

NewLineupCmd creates the lineup command for managing lineup markers.

func NewLoginCmd added in v0.3.0

func NewLoginCmd() *cobra.Command

NewLoginCmd creates the top-level login shortcut.

func NewLogoutCmd added in v0.3.0

func NewLogoutCmd() *cobra.Command

NewLogoutCmd creates the top-level logout shortcut.

func NewMCPCmd

func NewMCPCmd() *cobra.Command

NewMCPCmd creates the mcp command group.

func NewMeCmd

func NewMeCmd() *cobra.Command

func NewMessageCmd

func NewMessageCmd() *cobra.Command

NewMessageCmd creates the message command (shortcut for creating messages).

func NewMessageboardsCmd

func NewMessageboardsCmd() *cobra.Command

NewMessageboardsCmd creates the messageboards command for viewing message board containers.

func NewMessagesCmd

func NewMessagesCmd() *cobra.Command

NewMessagesCmd creates the messages command group.

func NewMessagetypesCmd

func NewMessagetypesCmd() *cobra.Command

NewMessagetypesCmd creates the messagetypes command for managing message types.

func NewMigrateCmd

func NewMigrateCmd() *cobra.Command

NewMigrateCmd creates the migrate command.

func NewPeopleCmd

func NewPeopleCmd() *cobra.Command

func NewProfileCmd

func NewProfileCmd() *cobra.Command

NewProfileCmd creates the profile command group.

func NewProjectsCmd

func NewProjectsCmd() *cobra.Command

NewProjectsCmd creates the projects command group.

func NewQuickStartCmd

func NewQuickStartCmd() *cobra.Command

NewQuickStartCmd creates the quick-start command.

func NewRecordingsCmd

func NewRecordingsCmd() *cobra.Command

NewRecordingsCmd creates the recordings command for cross-project browsing.

func NewReopenCmd

func NewReopenCmd() *cobra.Command

NewReopenCmd creates the 'reopen' command as an alias for 'todos uncomplete'.

func NewReportsCmd

func NewReportsCmd() *cobra.Command

NewReportsCmd creates the reports command for viewing various reports.

func NewScheduleCmd

func NewScheduleCmd() *cobra.Command

NewScheduleCmd creates the schedule command for managing schedules.

func NewSearchCmd

func NewSearchCmd() *cobra.Command

NewSearchCmd creates the search command for full-text search.

func NewSetupCmd

func NewSetupCmd() *cobra.Command

NewSetupCmd creates the setup command (explicit wizard invocation).

func NewShowCmd

func NewShowCmd() *cobra.Command

NewShowCmd creates the show command for viewing any recording.

func NewSkillCmd added in v0.2.0

func NewSkillCmd() *cobra.Command

NewSkillCmd creates the skill command.

func NewSubscriptionsCmd

func NewSubscriptionsCmd() *cobra.Command

NewSubscriptionsCmd creates the subscriptions command for managing recording subscriptions.

func NewTUICmd

func NewTUICmd() *cobra.Command

NewTUICmd creates the tui command for the persistent workspace.

func NewTemplatesCmd

func NewTemplatesCmd() *cobra.Command

NewTemplatesCmd creates the templates command for managing project templates.

func NewTimelineCmd

func NewTimelineCmd() *cobra.Command

NewTimelineCmd creates the timeline command for viewing activity feeds.

func NewTimesheetCmd

func NewTimesheetCmd() *cobra.Command

NewTimesheetCmd creates the timesheet command for managing time tracking.

func NewTodoCmd

func NewTodoCmd() *cobra.Command

NewTodoCmd creates the 'todo' command as a shortcut for 'todos create'.

func NewTodolistgroupsCmd

func NewTodolistgroupsCmd() *cobra.Command

NewTodolistgroupsCmd creates the todolistgroups command group.

func NewTodolistsCmd

func NewTodolistsCmd() *cobra.Command

NewTodolistsCmd creates the todolists command group.

func NewTodosCmd

func NewTodosCmd() *cobra.Command

NewTodosCmd creates the todos command group.

func NewTodosetsCmd

func NewTodosetsCmd() *cobra.Command

NewTodosetsCmd creates the todosets command for viewing todoset containers.

func NewToolsCmd

func NewToolsCmd() *cobra.Command

NewToolsCmd creates the tools command for managing project dock tools.

func NewURLCmd

func NewURLCmd() *cobra.Command

NewURLCmd creates the url command for parsing Basecamp URLs.

func NewUnassignCmd

func NewUnassignCmd() *cobra.Command

NewUnassignCmd creates the unassign command.

func NewUpgradeCmd added in v0.2.0

func NewUpgradeCmd() *cobra.Command

NewUpgradeCmd creates the upgrade command.

func NewUploadCmd added in v0.4.0

func NewUploadCmd() *cobra.Command

NewUploadCmd creates the top-level 'upload' shortcut command.

func NewUploadsCmd

func NewUploadsCmd() *cobra.Command

NewUploadsCmd creates the top-level uploads command.

func NewVaultsCmd

func NewVaultsCmd() *cobra.Command

NewVaultsCmd creates the vaults/folders command alias.

func NewVersionCmd added in v0.4.0

func NewVersionCmd() *cobra.Command

NewVersionCmd creates the version command.

func NewWebhooksCmd

func NewWebhooksCmd() *cobra.Command

NewWebhooksCmd creates the webhooks command group.

func RefreshSkillsIfVersionChanged added in v0.4.0

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 RunQuickStartDefault

func RunQuickStartDefault(cmd *cobra.Command, args []string) error

RunQuickStartDefault is called when basecamp is run with no args. If this is a first run (unauthenticated, interactive TTY, no BASECAMP_TOKEN), it runs the setup wizard. Non-interactive invocations (piped, non-TTY, or machine-output modes — whether flag-driven or config-driven) preserve the quick-start JSON envelope. Interactive TTY shows help.

Types

type AccountInfo

type AccountInfo struct {
	ID      int64  `json:"id"`
	Name    string `json:"name"`
	Href    string `json:"href"`
	AppHref string `json:"app_href"`
	Current bool   `json:"current,omitempty"`
}

AccountInfo represents an account in the me command output

type AuthInfo

type AuthInfo struct {
	Status  string `json:"status"`
	User    string `json:"user,omitempty"`
	Account string `json:"account,omitempty"`
}

AuthInfo describes the authentication status.

type BonfireLayout added in v0.3.0

type BonfireLayout struct {
	Panes             []BonfirePane `json:"panes"`
	MultiplexerLayout string        `json:"multiplexer_layout"`
}

BonfireLayout stores a saved multiplexer layout.

type BonfirePane added in v0.3.0

type BonfirePane struct {
	URL string `json:"url"`
}

BonfirePane represents a single pane in a layout.

type Check

type Check struct {
	Name    string `json:"name"`
	Status  string `json:"status"` // "pass", "fail", "skip", "warn"
	Message string `json:"message"`
	Hint    string `json:"hint,omitempty"`
}

Check represents a single diagnostic check result.

type CommandCategory

type CommandCategory struct {
	Name     string        `json:"name"`
	Commands []CommandInfo `json:"commands"`
}

CommandCategory groups commands by category.

func CommandCategories added in v0.3.0

func CommandCategories() []CommandCategory

CommandCategories returns all command categories for the catalog.

type CommandInfo

type CommandInfo struct {
	Name         string   `json:"name"`
	Category     string   `json:"category"`
	Description  string   `json:"description"`
	Actions      []string `json:"actions,omitempty"`
	Experimental bool     `json:"experimental,omitempty"`
}

CommandInfo describes a CLI command.

type CommandsInfo

type CommandsInfo struct {
	QuickStart []string `json:"quick_start"`
	Common     []string `json:"common"`
}

CommandsInfo lists suggested commands.

type ContextInfo

type ContextInfo struct {
	ProjectID   *int64  `json:"project_id,omitempty"`
	ProjectName *string `json:"project_name,omitempty"`
}

ContextInfo describes the current context.

type DockTool

type DockTool struct {
	Name    string `json:"name"`
	Title   string `json:"title"`
	ID      int64  `json:"id"`
	Enabled bool   `json:"enabled"`
}

DockTool represents a tool in a project's dock.

type DoctorResult

type DoctorResult struct {
	Checks  []Check `json:"checks"`
	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

Summary returns a human-readable summary of the results.

type MeOutput

type MeOutput struct {
	Identity basecamp.Identity `json:"identity"`
	Accounts []AccountInfo     `json:"accounts"`
}

MeOutput represents the output for the me command

type MigrateResult

type MigrateResult struct {
	KeyringMigrated int      `json:"keyring_migrated"`
	KeyringErrors   []string `json:"keyring_errors,omitempty"`
	CacheMoved      bool     `json:"cache_moved"`
	CacheMessage    string   `json:"cache_message,omitempty"`
	ThemeMoved      bool     `json:"theme_moved"`
	ThemeMessage    string   `json:"theme_message,omitempty"`
	AlreadyMigrated bool     `json:"already_migrated,omitempty"`
}

MigrateResult holds the migration outcome.

type ParsedURL

type ParsedURL struct {
	URL          string  `json:"url"`
	AccountID    *string `json:"account_id"`
	ProjectID    *string `json:"project_id"`
	Type         *string `json:"type"`
	TypeSingular *string `json:"type_singular"`
	RecordingID  *string `json:"recording_id"`
	CommentID    *string `json:"comment_id"`
}

ParsedURL represents components extracted from a Basecamp URL.

type QuickStartResponse

type QuickStartResponse struct {
	Version  string       `json:"version"`
	Auth     AuthInfo     `json:"auth"`
	Context  ContextInfo  `json:"context"`
	Commands CommandsInfo `json:"commands"`
}

QuickStartResponse is the JSON structure for the quick-start command.

type SweepResult

type SweepResult struct {
	DryRun         bool    `json:"dry_run,omitempty"`
	WouldSweep     []int64 `json:"would_sweep,omitempty"`
	Swept          []int64 `json:"swept,omitempty"`
	Commented      []int64 `json:"commented,omitempty"`
	Completed      []int64 `json:"completed,omitempty"`
	CommentFailed  []int64 `json:"comment_failed,omitempty"`
	CompleteFailed []int64 `json:"complete_failed,omitempty"`
	Count          int     `json:"count"`
	Comment        string  `json:"comment,omitempty"`
	CompleteAction bool    `json:"complete,omitempty"`
}

SweepResult contains the results of a sweep operation.

type WizardResult

type WizardResult struct {
	Version     string `json:"version"`
	Status      string `json:"status"` // "complete"
	AccountID   string `json:"account_id,omitempty"`
	AccountName string `json:"account_name,omitempty"`
	ProjectID   string `json:"project_id,omitempty"`
	ProjectName string `json:"project_name,omitempty"`
	ConfigScope string `json:"config_scope,omitempty"` // "global", "local", or "" if skipped
}

WizardResult holds the outcome of the first-run wizard.

Jump to

Keyboard shortcuts

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