Documentation
¶
Overview ¶
Package commands implements the CLI commands.
Package commands implements the CLI commands.
Index ¶
- func CatalogCommandNames() []string
- func CleanupUpgradeSidecars()
- func NewAPICmd() *cobra.Command
- func NewAccountsCmd() *cobra.Command
- func NewAgentHookCmd() *cobra.Command
- func NewAssignCmd() *cobra.Command
- func NewAssignmentsCmd() *cobra.Command
- func NewAttachCmd() *cobra.Command
- func NewAttachmentsCmd() *cobra.Command
- func NewAuthCmd() *cobra.Command
- func NewBonfireCmd() *cobra.Command
- func NewBookmarksCmd() *cobra.Command
- func NewBoostsCmd() *cobra.Command
- func NewCalendarsCmd() *cobra.Command
- func NewCardsCmd() *cobra.Command
- func NewChatCmd() *cobra.Command
- func NewCheckinsCmd() *cobra.Command
- func NewCommandsCmd() *cobra.Command
- func NewCommentsCmd() *cobra.Command
- func NewCompletionCmd() *cobra.Command
- func NewConfigCmd() *cobra.Command
- func NewDocsCmd() *cobra.Command
- func NewDoctorCmd() *cobra.Command
- func NewDraftsCmd() *cobra.Command
- func NewEventsCmd() *cobra.Command
- func NewFilesCmd() *cobra.Command
- func NewForwardsCmd() *cobra.Command
- func NewGaugesCmd() *cobra.Command
- func NewHillchartsCmd() *cobra.Command
- func NewLineupCmd() *cobra.Command
- func NewLoginCmd() *cobra.Command
- func NewLogoutCmd() *cobra.Command
- func NewMeCmd() *cobra.Command
- func NewMessageboardsCmd() *cobra.Command
- func NewMessagesCmd() *cobra.Command
- func NewMessagetypesCmd() *cobra.Command
- func NewMigrateCmd() *cobra.Command
- func NewNotesCmd() *cobra.Command
- func NewNotificationsCmd() *cobra.Command
- func NewPeopleCmd() *cobra.Command
- func NewProfileCmd() *cobra.Command
- func NewProjectsCmd() *cobra.Command
- func NewQuickStartCmd() *cobra.Command
- func NewRecordingsCmd() *cobra.Command
- func NewReportsCmd() *cobra.Command
- func NewScheduleCmd() *cobra.Command
- func NewSearchCmd() *cobra.Command
- func NewSetupCmd() *cobra.Command
- func NewShowCmd() *cobra.Command
- func NewSkillCmd() *cobra.Command
- func NewSubscriptionsCmd() *cobra.Command
- func NewTUICmd() *cobra.Command
- func NewTemplatesCmd() *cobra.Command
- func NewTimelineCmd() *cobra.Command
- func NewTimesheetCmd() *cobra.Command
- func NewTodolistgroupsCmd() *cobra.Command
- func NewTodolistsCmd() *cobra.Command
- func NewTodosCmd() *cobra.Command
- func NewTodosetsCmd() *cobra.Command
- func NewToolsCmd() *cobra.Command
- func NewURLCmd() *cobra.Command
- func NewUnassignCmd() *cobra.Command
- func NewUpgradeCmd() *cobra.Command
- func NewUploadCmd() *cobra.Command
- func NewUploadsCmd() *cobra.Command
- func NewVaultsCmd() *cobra.Command
- func NewVersionCmd() *cobra.Command
- func NewWebhooksCmd() *cobra.Command
- func RefreshSkillsIfVersionChanged() bool
- func RunQuickStartDefault(cmd *cobra.Command, args []string) error
- type AccountInfo
- type AuthInfo
- type BonfireLayout
- type BonfirePane
- type Check
- type CommandCategory
- type CommandInfo
- type CommandsInfo
- type ContextInfo
- type DockTool
- type DoctorResult
- type MeOutput
- type MigrateResult
- type ParsedURL
- type QuickStartResponse
- type SweepResult
- type TodosetEntry
- type UpdateCheck
- type WizardResult
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 CleanupUpgradeSidecars ¶ added in v0.9.0
func CleanupUpgradeSidecars()
CleanupUpgradeSidecars removes leftover self-update staging files (the `.basecamp-upgrade-*` namespace) next to the running executable. Runs on every ordinary CLI invocation so a crashed upgrade's staging files — and backups an upgrade explicitly marked safe to reap — don't linger.
func NewAccountsCmd ¶ added in v0.4.0
NewAccountsCmd creates the accounts command group.
func NewAgentHookCmd ¶ added in v0.8.0
NewAgentHookCmd creates the hidden command group used by the plugin hooks shared between Claude Code and Codex.
The group declares its own persistent lifecycle, which replaces the root command's for this subtree (Cobra runs only the innermost declaration). The root lifecycle validates config, resolves profiles, and enforces base_url HTTPS — any of which can fail with a nonzero exit, breaking the hooks' never-block contract. Hooks tolerate every config problem instead: they fall back to defaults, which still supports BASECAMP_TOKEN and stored-credential auth detection plus the cache-directory fallback.
func NewAssignmentsCmd ¶ added in v0.7.0
NewAssignmentsCmd creates the assignments command.
func NewAttachCmd ¶ added in v0.4.0
NewAttachCmd creates the 'attach' command — a staging primitive for uploading files.
func NewAttachmentsCmd ¶ added in v0.7.0
NewAttachmentsCmd creates the attachments command group.
func NewBonfireCmd ¶ added in v0.3.0
NewBonfireCmd creates the bonfire command group.
func NewBookmarksCmd ¶ added in v0.9.0
NewBookmarksCmd creates the bookmarks command for the current user's personal bookmarks.
Bookmarks are per-person: they are visible only to whoever created them, so there is no project to scope them to and no --project flag. Every leaf here addresses a recording by id or URL, since a bookmark is a link between the current user and one recording rather than a resource with an id of its own that anyone would paste.
func NewBoostsCmd ¶
NewBoostsCmd creates the boost command for managing boosts.
func NewCalendarsCmd ¶ added in v0.9.0
NewCalendarsCmd creates the calendars command.
There is no index endpoint, so this group cannot list calendars — the way a caller names one is by pasting its URL, which extractID turns into the id.
func NewChatCmd ¶ added in v0.7.0
NewChatCmd creates the chat command for real-time chat.
func NewCheckinsCmd ¶
NewCheckinsCmd creates the checkins command group.
func NewCommandsCmd ¶
NewCommandsCmd creates the commands listing command.
func NewCommentsCmd ¶
NewCommentsCmd creates the comments command group (list/show/update).
func NewCompletionCmd ¶
NewCompletionCmd creates the completion command group.
func NewConfigCmd ¶
NewConfigCmd creates the config command for managing configuration.
func NewDraftsCmd ¶ added in v0.9.0
NewDraftsCmd creates the drafts command for the current user's unpublished drafts.
Drafts are personal and cross-project, like bookmarks: only their author can see them, so there is no project to scope the listing to. The group has one leaf because the API has one endpoint — publishing a draft happens through the command for whatever the draft is (messages, docs, uploads).
func NewEventsCmd ¶
NewEventsCmd creates the events command for viewing recording event history.
func NewForwardsCmd ¶
NewForwardsCmd creates the forwards command for managing email forwards.
func NewGaugesCmd ¶ added in v0.7.0
NewGaugesCmd creates the gauges command group.
func NewHillchartsCmd ¶ added in v0.7.0
NewHillchartsCmd creates the hillcharts command group.
func NewLineupCmd ¶
NewLineupCmd creates the lineup command for managing lineup markers.
func NewLoginCmd ¶ added in v0.3.0
NewLoginCmd creates the top-level login shortcut.
func NewLogoutCmd ¶ added in v0.3.0
NewLogoutCmd creates the top-level logout shortcut.
func NewMessageboardsCmd ¶
NewMessageboardsCmd creates the messageboards command for viewing message board containers.
func NewMessagesCmd ¶
NewMessagesCmd creates the messages command group.
func NewMessagetypesCmd ¶
NewMessagetypesCmd creates the messagetypes command for managing message types.
func NewNotesCmd ¶ added in v0.9.0
NewNotesCmd creates the notes command for the current user's personal note.
This is a singleton, not a collection: one note per person, addressed by no id at all. Hence show/set rather than list/create/update — there is nothing to enumerate and nothing to choose between.
func NewNotificationsCmd ¶ added in v0.7.0
NewNotificationsCmd creates the notifications command.
func NewPeopleCmd ¶
func NewProfileCmd ¶
NewProfileCmd creates the profile command group.
func NewProjectsCmd ¶
NewProjectsCmd creates the projects command group.
func NewQuickStartCmd ¶
NewQuickStartCmd creates the quick-start command.
func NewRecordingsCmd ¶
NewRecordingsCmd creates the recordings command for cross-project browsing.
func NewReportsCmd ¶
NewReportsCmd creates the reports command for viewing various reports.
func NewScheduleCmd ¶
NewScheduleCmd creates the schedule command for managing schedules.
func NewSearchCmd ¶
NewSearchCmd creates the search command for full-text search.
func NewSetupCmd ¶
NewSetupCmd creates the setup command (explicit wizard invocation).
func NewShowCmd ¶
NewShowCmd creates the show command for viewing any recording.
func NewSkillCmd ¶ added in v0.2.0
NewSkillCmd creates the skill command.
func NewSubscriptionsCmd ¶
NewSubscriptionsCmd creates the subscriptions command for managing recording subscriptions.
func NewTemplatesCmd ¶
NewTemplatesCmd creates the templates command for managing project templates.
func NewTimelineCmd ¶
NewTimelineCmd creates the timeline command for viewing activity feeds.
func NewTimesheetCmd ¶
NewTimesheetCmd creates the timesheet command for managing time tracking.
func NewTodolistgroupsCmd ¶
NewTodolistgroupsCmd creates the todolistgroups command group.
func NewTodolistsCmd ¶
NewTodolistsCmd creates the todolists command group.
func NewTodosetsCmd ¶
NewTodosetsCmd creates the todosets command for managing todoset containers.
func NewToolsCmd ¶
NewToolsCmd creates the tools command for managing project dock tools.
func NewUnassignCmd ¶
NewUnassignCmd creates the unassign command.
func NewUpgradeCmd ¶ added in v0.2.0
NewUpgradeCmd creates the upgrade command.
func NewUploadCmd ¶ added in v0.4.0
NewUploadCmd creates the top-level 'upload' shortcut command.
func NewUploadsCmd ¶
NewUploadsCmd creates the top-level uploads command.
func NewVaultsCmd ¶
NewVaultsCmd creates the vaults/folders command alias.
func NewVersionCmd ¶ added in v0.4.0
NewVersionCmd creates the version command.
func NewWebhooksCmd ¶
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 ¶
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"`
DevOnly bool `json:"dev_only,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 TodosetEntry ¶ added in v0.7.0
type TodosetEntry struct {
ID int64 `json:"id"`
Name string `json:"name"`
Title string `json:"title"`
Enabled bool `json:"enabled"`
}
TodosetEntry represents a todoset in the list output.
type UpdateCheck ¶ added in v0.7.0
type UpdateCheck struct {
// contains filtered or unexported fields
}
UpdateCheck holds state for a non-blocking version check.
func StartUpdateCheck ¶ added in v0.7.0
func StartUpdateCheck() *UpdateCheck
StartUpdateCheck begins a background version check if the cache is stale. Returns nil if the check should be skipped (dev build, opted out, etc.).
func (*UpdateCheck) Notice ¶ added in v0.7.0
func (uc *UpdateCheck) Notice() string
Notice returns a formatted update notice, or "" if no update is available or the check hasn't completed. Never blocks.
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.
Source Files
¶
- accounts.go
- accountwide.go
- agent_hook.go
- api.go
- assign.go
- assignments.go
- attach.go
- attach_helpers.go
- attachments.go
- auth.go
- bonfire.go
- bookmarks.go
- boost.go
- calendars.go
- cards.go
- chat.go
- checkins.go
- commands.go
- comment.go
- comments_embed.go
- completion.go
- config.go
- dev_tag_stub.go
- doctor.go
- drafts.go
- events.go
- files.go
- forwards.go
- gauges.go
- helpers.go
- hillcharts.go
- lineup.go
- messageboards.go
- messages.go
- messagetypes.go
- migrate.go
- notes.go
- notifications.go
- people.go
- profile.go
- projects.go
- quickstart.go
- recordings.go
- reports.go
- schedule.go
- search.go
- show.go
- skill.go
- sort.go
- subscriptions.go
- templates.go
- timeline.go
- timesheet.go
- todolistgroups.go
- todolists.go
- todos.go
- todosets.go
- tools.go
- tui_stub.go
- update_notice.go
- upgrade.go
- upgrade_selfupdate.go
- url.go
- version.go
- version_compare.go
- webhooks.go
- wizard.go
- wizard_agents.go
- wizard_codex.go