commands

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 40 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 NewAssignCmd

func NewAssignCmd() *cobra.Command

NewAssignCmd creates the assign command.

func NewAuthCmd

func NewAuthCmd() *cobra.Command

NewAuthCmd creates the auth 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 emoji reactions.

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 command (shortcut for creating comments).

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 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 NewUploadsCmd

func NewUploadsCmd() *cobra.Command

NewUploadsCmd creates the uploads command alias.

func NewVaultsCmd

func NewVaultsCmd() *cobra.Command

NewVaultsCmd creates the vaults/folders command alias.

func NewWebhooksCmd

func NewWebhooksCmd() *cobra.Command

NewWebhooksCmd creates the webhooks command group.

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. Otherwise, it falls through to the quick-start output.

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 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.

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 FilesListResult

type FilesListResult struct {
	VaultID    int64               `json:"vault_id"`
	VaultTitle string              `json:"vault_title"`
	Folders    []basecamp.Vault    `json:"folders"`
	Files      []basecamp.Upload   `json:"files"`
	Documents  []basecamp.Document `json:"documents"`
}

FilesListResult represents the combined contents of a vault.

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