commands

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPICmd

func NewAPICmd(app *App) *cobra.Command

NewAPICmd creates the 'api' command for raw API access.

This is the CLI's escape hatch for endpoints not yet covered by purpose-built subcommands. After Phase 3 the typed Freelo client covers the whole OpenAPI spec, but `api get/post/put/delete` is still useful for calling internal / undocumented endpoints or for quick debugging.

All four subcommands route through the SDK's Do, so they get the same auth + User-Agent + rate-limit + retry as the typed commands.

func NewAPICmdLazy

func NewAPICmdLazy(getApp AppGetter) *cobra.Command

func NewAuthCmd

func NewAuthCmd(app *App) *cobra.Command

NewAuthCmd creates the 'auth' command group.

func NewAuthCmdLazy

func NewAuthCmdLazy(getApp AppGetter) *cobra.Command

func NewCommentsCmd

func NewCommentsCmd(app *App) *cobra.Command

NewCommentsCmd creates the 'comments' command group.

Same dead-command situation as subtasks: the pre-v1.0.0 CLI exposed `delete` calling DELETE /comment/{id}, but the server returns 404 for that verb — probed live and the spec only documents POST /comment/{id} (edit). The Freelo API has no comment deletion. Dropped before v1.0.0 to avoid shipping a command that can never succeed.

func NewCommentsCmdLazy

func NewCommentsCmdLazy(getApp AppGetter) *cobra.Command

func NewCustomFieldsCmd

func NewCustomFieldsCmd(app *App) *cobra.Command

func NewCustomFieldsCmdLazy

func NewCustomFieldsCmdLazy(getApp AppGetter) *cobra.Command

func NewEventsCmd

func NewEventsCmd(app *App) *cobra.Command

NewEventsCmd creates the 'events' command group.

Phase 3 migration: single read-only listing endpoint (/events) via app.FreeloClient.GetAllEvents with typed filter params.

func NewEventsCmdLazy

func NewEventsCmdLazy(getApp AppGetter) *cobra.Command

func NewFilesCmd

func NewFilesCmd(app *App) *cobra.Command

func NewFilesCmdLazy

func NewFilesCmdLazy(getApp AppGetter) *cobra.Command

func NewInvoicesCmd

func NewInvoicesCmd(app *App) *cobra.Command

func NewInvoicesCmdLazy

func NewInvoicesCmdLazy(getApp AppGetter) *cobra.Command

func NewLabelsCmd

func NewLabelsCmd(app *App) *cobra.Command

NewLabelsCmd creates the 'labels' command group.

Phase 3 migration: the two task-label mutation endpoints use oneOf request schemas (TaskLabelAddInput / TaskLabelRemoveInput), so the body is built via the From* helpers on the generated union types. Project- label operations are straightforward typed bodies.

func NewLabelsCmdLazy

func NewLabelsCmdLazy(getApp AppGetter) *cobra.Command

func NewNotesCmd

func NewNotesCmd(app *App) *cobra.Command

func NewNotesCmdLazy

func NewNotesCmdLazy(getApp AppGetter) *cobra.Command

func NewNotificationsCmd

func NewNotificationsCmd(app *App) *cobra.Command

NewNotificationsCmd creates the 'notifications' command group.

Phase 3 migration: uses app.FreeloClient.

func NewNotificationsCmdLazy

func NewNotificationsCmdLazy(getApp AppGetter) *cobra.Command

func NewOutOfOfficeCmd

func NewOutOfOfficeCmd(app *App) *cobra.Command

func NewOutOfOfficeCmdLazy

func NewOutOfOfficeCmdLazy(getApp AppGetter) *cobra.Command

func NewPinnedCmd

func NewPinnedCmd(app *App) *cobra.Command

func NewPinnedCmdLazy

func NewPinnedCmdLazy(getApp AppGetter) *cobra.Command

func NewProjectsCmd

func NewProjectsCmd(app *App) *cobra.Command

NewProjectsCmd creates the 'projects' command group.

Phase 3 migration: subcommands use app.FreeloClient. See tasks.go for the overall approach (raw *http.Response methods, not *WithResponse).

func NewProjectsCmdLazy

func NewProjectsCmdLazy(getApp AppGetter) *cobra.Command

func NewReportsCmd

func NewReportsCmd(app *App) *cobra.Command

NewReportsCmd creates the 'reports' command group (work reports).

func NewReportsCmdLazy

func NewReportsCmdLazy(getApp AppGetter) *cobra.Command

func NewSearchCmd

func NewSearchCmd(app *App) *cobra.Command

NewSearchCmd creates the 'search' command.

Phase 3 migration: POST /search via app.FreeloClient.

func NewSearchCmdLazy

func NewSearchCmdLazy(getApp AppGetter) *cobra.Command

func NewSkillCmd

func NewSkillCmd(app *App) *cobra.Command

NewSkillCmd creates the 'skill' command for agent skill management.

func NewSkillCmdLazy

func NewSkillCmdLazy(getApp AppGetter) *cobra.Command

func NewSubtasksCmd

func NewSubtasksCmd(app *App) *cobra.Command

NewSubtasksCmd creates the 'subtasks' command group.

The Freelo API only supports listing and creating subtasks (endpoints /task/{id}/subtasks). The pre-v1.0.0 CLI exposed `show`, `finish`, `activate`, and `delete` subcommands calling /subtask/{id}{/finish,...}, but every one of those paths returns 404 from the server — even with a real subtask ID. They never worked. Dropped in Phase 3 to match the actual API surface documented in the OpenAPI spec.

func NewSubtasksCmdLazy

func NewSubtasksCmdLazy(getApp AppGetter) *cobra.Command

func NewTasklistsCmd

func NewTasklistsCmd(app *App) *cobra.Command

NewTasklistsCmd creates the 'tasklists' command group.

Phase 3 migration: all subcommands use app.FreeloClient via the raw *http.Response methods.

func NewTasklistsCmdLazy

func NewTasklistsCmdLazy(getApp AppGetter) *cobra.Command

func NewTasksCmd

func NewTasksCmd(app *App) *cobra.Command

NewTasksCmd creates the 'tasks' command group.

Phase 3 migration: all subcommands call the oapi-codegen-generated typed client via app.FreeloClient. We deliberately use the raw *http.Response methods (not the *WithResponse typed ones) and decode the body ourselves — see readRawBody in helpers.go for the rationale.

func NewTasksCmdLazy

func NewTasksCmdLazy(getApp AppGetter) *cobra.Command

func NewTemplatesCmd

func NewTemplatesCmd(app *App) *cobra.Command

func NewTemplatesCmdLazy

func NewTemplatesCmdLazy(getApp AppGetter) *cobra.Command

func NewTrackingCmd

func NewTrackingCmd(app *App) *cobra.Command

NewTrackingCmd creates the 'tracking' command group.

func NewTrackingCmdLazy

func NewTrackingCmdLazy(getApp AppGetter) *cobra.Command

func NewUsersCmd

func NewUsersCmd(app *App) *cobra.Command

NewUsersCmd creates the 'users' command group.

Phase 3 migration: uses app.FreeloClient.

func NewUsersCmdLazy

func NewUsersCmdLazy(getApp AppGetter) *cobra.Command

func NewVersionCmd

func NewVersionCmd(app *App) *cobra.Command

NewVersionCmd creates the 'version' command.

func NewVersionCmdLazy

func NewVersionCmdLazy(getApp AppGetter) *cobra.Command

func NewWorkersCmd

func NewWorkersCmd(app *App) *cobra.Command

func NewWorkersCmdLazy

func NewWorkersCmdLazy(getApp AppGetter) *cobra.Command

Types

type App

type App struct {
	Config       *config.Config
	Auth         *credstore.Store
	FreeloClient *freeloapi.ClientWithResponses
	SDK          *freelosdk.Client
	Output       func() *output.Writer
	Version      string
}

App is the shared dependency container passed to all commands.

type AppGetter

type AppGetter func() *App

AppGetter is a function that returns the App (resolved lazily after PersistentPreRun).

type PaginatedResult

type PaginatedResult struct {
	Total int
	Count int
	Page  int
}

PaginatedResult holds parsed paginated API response metadata.

Jump to

Keyboard shortcuts

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