cmd

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 63 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitSuccess    = 0
	ExitGeneral    = 1
	ExitUsage      = 2
	ExitAuth       = 3
	ExitAuthz      = 4
	ExitNotFound   = 5
	ExitValidation = 6
	ExitRateLimit  = 7
	ExitNetwork    = 8
)

Exit codes

Variables

This section is empty.

Functions

func BannerThemeNames

func BannerThemeNames() []string

BannerThemeNames returns the names of all available themes.

func DefaultBannerPalette

func DefaultBannerPalette() []string

DefaultBannerPalette returns the default (white) palette.

func DeleteStoredCredentials

func DeleteStoredCredentials(ctx context.Context) error

func Execute

func Execute(args []string) int

Execute runs the CLI with the given arguments and returns an exit code.

func GetAPIClient

func GetAPIClient(ctx context.Context) (*api.Client, error)

GetAPIClient creates an API client from context.

func GetAPIClientWithBaseURL

func GetAPIClientWithBaseURL(ctx context.Context, baseURL, site string) (*api.Client, error)

GetAPIClientWithBaseURL creates an API client with a specific base URL and site.

func GetAPIClientWithSite

func GetAPIClientWithSite(ctx context.Context, site string) (*api.Client, error)

GetAPIClientWithSite creates an API client with a specific site.

func IsProtectedEnvironment added in v0.3.3

func IsProtectedEnvironment(flags *RootFlags) bool

IsProtectedEnvironment reports protection for the selected project environment.

func RequireSite

func RequireSite(ctx context.Context, site string) (string, error)

RequireSite ensures a site is specified.

func ResolveAuthCredential

func ResolveAuthCredential(ctx context.Context) (auth.Credential, error)

func ResolveAuthToken

func ResolveAuthToken(ctx context.Context) (string, error)

ResolveAuthToken returns a usable bearer token for the session's API host. OAuth sessions are refreshed first when the access token is about to expire.

func ResolveAuthTokenForHost added in v0.2.3

func ResolveAuthTokenForHost(ctx context.Context, baseURL string) (string, error)

ResolveAuthTokenForHost resolves the token for the host of baseURL, so cross-host commands (--from-host/--to-host) authenticate against each API with its own stored credential instead of the session default's.

func VersionString

func VersionString() string

VersionString returns the version string.

Types

type APICmd

type APICmd struct {
	Get    APIGetCmd    `cmd:"" aliases:"GET" help:"Send a GET request"`
	Post   APIPostCmd   `cmd:"" aliases:"POST" help:"Send a POST request"`
	Put    APIPutCmd    `cmd:"" aliases:"PUT" help:"Send a PUT request"`
	Patch  APIPatchCmd  `cmd:"" aliases:"PATCH" help:"Send a PATCH request"`
	Delete APIDeleteCmd `cmd:"" aliases:"DELETE" help:"Send a DELETE request (requires --force)"`
	Legacy APILegacyCmd `cmd:"" default:"withargs" hidden:""`
}

APICmd provides raw API access. Verb-first commands are canonical; Legacy preserves the original --method/--path interface.

type APIDeleteCmd added in v0.3.0

type APIDeleteCmd struct {
	Path string `arg:"" required:"" help:"API path"`
	APIRequestFlags
}

func (*APIDeleteCmd) Run added in v0.3.0

func (c *APIDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

type APIGetCmd added in v0.3.0

type APIGetCmd struct {
	Path string `arg:"" required:"" help:"API path"`
	APIRequestFlags
}

func (*APIGetCmd) Run added in v0.3.0

func (c *APIGetCmd) Run(ctx context.Context, flags *RootFlags) error

type APILegacyCmd added in v0.3.0

type APILegacyCmd struct {
	Method string `required:"" help:"HTTP method (GET, POST, PUT, PATCH, DELETE)"`
	Path   string `required:"" help:"API path (e.g., /channels)"`
	APIRequestFlags
}

func (*APILegacyCmd) Run added in v0.3.0

func (c *APILegacyCmd) Run(ctx context.Context, flags *RootFlags) error

type APIPatchCmd added in v0.3.0

type APIPatchCmd struct {
	Path string `arg:"" required:"" help:"API path"`
	APIRequestFlags
}

func (*APIPatchCmd) Run added in v0.3.0

func (c *APIPatchCmd) Run(ctx context.Context, flags *RootFlags) error

type APIPostCmd added in v0.3.0

type APIPostCmd struct {
	Path string `arg:"" required:"" help:"API path"`
	APIRequestFlags
}

func (*APIPostCmd) Run added in v0.3.0

func (c *APIPostCmd) Run(ctx context.Context, flags *RootFlags) error

type APIPutCmd added in v0.3.0

type APIPutCmd struct {
	Path string `arg:"" required:"" help:"API path"`
	APIRequestFlags
}

func (*APIPutCmd) Run added in v0.3.0

func (c *APIPutCmd) Run(ctx context.Context, flags *RootFlags) error

type APIRequestFlags added in v0.3.0

type APIRequestFlags struct {
	Data   string `help:"Request JSON: inline, @file, or - for stdin" short:"d"`
	File   string `help:"Read request JSON from file (legacy; use --data @file)" type:"existingfile"`
	All    bool   `help:"Fetch every page of a JSON array response"`
	Output string `help:"Write an exact binary response to FILE or - for stdout"`
}

type AnnouncementsCmd added in v0.3.0

type AnnouncementsCmd struct {
	List   AnnouncementsListCmd   `cmd:"" help:"List announcements"`
	Get    AnnouncementsGetCmd    `cmd:"" help:"Get an announcement"`
	Create AnnouncementsCreateCmd `cmd:"" help:"Create an announcement"`
	Update AnnouncementsUpdateCmd `cmd:"" help:"Update an announcement"`
	Delete AnnouncementsDeleteCmd `cmd:"" help:"Delete an announcement (requires --force)"`
}

type AnnouncementsCreateCmd added in v0.3.0

type AnnouncementsCreateCmd struct {
	File        string   `help:"Read JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline announcement field assignments"`
}

func (*AnnouncementsCreateCmd) Run added in v0.3.0

type AnnouncementsDeleteCmd added in v0.3.0

type AnnouncementsDeleteCmd struct {
	ID string `required:"" help:"Announcement ID"`
}

func (*AnnouncementsDeleteCmd) Run added in v0.3.0

type AnnouncementsGetCmd added in v0.3.0

type AnnouncementsGetCmd struct {
	ID string `required:"" help:"Announcement ID"`
}

func (*AnnouncementsGetCmd) Run added in v0.3.0

type AnnouncementsListCmd added in v0.3.0

type AnnouncementsListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `default:"1" help:"Page number"`
	PerPage    int  `default:"25" help:"Items per page"`
}

func (*AnnouncementsListCmd) Run added in v0.3.0

type AnnouncementsUpdateCmd added in v0.3.0

type AnnouncementsUpdateCmd struct {
	ID          string   `required:"" help:"Announcement ID"`
	File        string   `help:"Read JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline announcement field assignments"`
}

func (*AnnouncementsUpdateCmd) Run added in v0.3.0

type AppsCmd

type AppsCmd struct {
	List   AppsListCmd   `cmd:"" help:"List apps"`
	Get    AppsGetCmd    `cmd:"" help:"Get app details"`
	Create AppsCreateCmd `cmd:"" help:"Create an app"`
	Update AppsUpdateCmd `cmd:"" help:"Update an app"`
	Config AppsConfigCmd `cmd:"" help:"Add an app to local project config"`
	Push   AppsPushCmd   `cmd:"" help:"Push configured local cloud-code files"`
	Logs   AppsLogsCmd   `cmd:"" help:"Read app cloud-code logs"`
	Code   AppsCodeCmd   `cmd:"" help:"Manage app cloud code files"`
}

AppsCmd manages OAuth apps.

type AppsCodeCmd

type AppsCodeCmd struct {
	List   AppsCodeListCmd   `cmd:"" help:"List app code files"`
	Get    AppsCodeGetCmd    `cmd:"" help:"Get an app code file"`
	Create AppsCodeCreateCmd `cmd:"" help:"Create app code file from JSON"`
	Update AppsCodeUpdateCmd `cmd:"" help:"Update an app code file"`
	Delete AppsCodeDeleteCmd `cmd:"" help:"Delete an app code file (requires --force)"`
	Pull   AppsCodePullCmd   `cmd:"" help:"Pull remote app code files"`
}

AppsCodeCmd manages app cloud code files.

type AppsCodeCreateCmd

type AppsCodeCreateCmd struct {
	App         string   `required:"" help:"Application ID"`
	File        string   `help:"Read code file JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=main.js, code=console.log(1))"`
}

AppsCodeCreateCmd creates an app code file.

func (*AppsCodeCreateCmd) Run

func (c *AppsCodeCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type AppsCodeDeleteCmd added in v0.3.0

type AppsCodeDeleteCmd struct {
	App      string `required:"" help:"Application ID"`
	Filename string `required:"" help:"Code filename"`
}

func (*AppsCodeDeleteCmd) Run added in v0.3.0

func (c *AppsCodeDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

type AppsCodeGetCmd added in v0.3.0

type AppsCodeGetCmd struct {
	App      string `required:"" help:"Application ID"`
	Filename string `required:"" help:"Code filename"`
}

func (*AppsCodeGetCmd) Run added in v0.3.0

func (c *AppsCodeGetCmd) Run(ctx context.Context) error

type AppsCodeListCmd

type AppsCodeListCmd struct {
	QueryFlags `embed:""`
	App        string `required:"" help:"Application ID"`
}

AppsCodeListCmd lists app code files.

func (*AppsCodeListCmd) Run

func (c *AppsCodeListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type AppsCodePullCmd added in v0.2.2

type AppsCodePullCmd struct {
	App   string   `help:"Configured local app name"`
	Files []string `help:"Remote or project-relative file subset; commas split multiple files" name:"only"`
}

AppsCodePullCmd pulls remote app code files into the configured local app directory.

func (*AppsCodePullCmd) Run added in v0.2.2

func (c *AppsCodePullCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes apps code pull.

type AppsCodeUpdateCmd added in v0.3.0

type AppsCodeUpdateCmd struct {
	App         string   `required:"" help:"Application ID"`
	Filename    string   `required:"" help:"Code filename"`
	File        string   `help:"Read JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments such as code=..."`
}

func (*AppsCodeUpdateCmd) Run added in v0.3.0

func (c *AppsCodeUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

type AppsConfigCmd

type AppsConfigCmd struct{}

AppsConfigCmd adds an app to the local project config.

func (*AppsConfigCmd) Run

func (c *AppsConfigCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the config command.

type AppsCreateCmd added in v0.2.6

type AppsCreateCmd struct {
	Name        string   `required:"" help:"App name"`
	Description string   `help:"App description"`
	Internal    bool     `` /* 128-byte string literal not displayed */
	Scopes      []string `help:"Install scopes (comma-separated, e.g. read_channels,write_channels); required for internal apps"`
	URL         string   `help:"App URL (external apps only)"`
	CallbackURL string   `name:"callback-url" help:"OAuth callback URL (external apps only)"`
	SDKVersion  string   `name:"sdk-version" help:"Cloud-code SDK version"`
	Install     *bool    `negatable:"" help:"Grant and register the app on the site in one step (default: true for internal apps)"`
	Configure   bool     `help:"After creating, add the app to the local nimbu.yml project config"`
}

AppsCreateCmd creates an OAuth / cloud-code app.

func (*AppsCreateCmd) Run added in v0.2.6

func (c *AppsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type AppsGetCmd

type AppsGetCmd struct {
	App string `required:"" help:"Application ID"`
}

AppsGetCmd gets an app by ID.

func (*AppsGetCmd) Run

func (c *AppsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type AppsListCmd

type AppsListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

AppsListCmd lists apps.

func (*AppsListCmd) Run

func (c *AppsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type AppsLogsCmd added in v0.2.5

type AppsLogsCmd struct {
	App   string `required:"" help:"Application local name or key"`
	Tail  bool   `help:"Poll for new logs until interrupted" short:"t"`
	Level string `help:"Minimum severity: debug, info, warn, error, fatal"`
	Query string `help:"Text search query" short:"q" name:"query"`
	Job   string `help:"Only logs from this background job name"`
	Since string `help:"Only logs after this value; raw epoch/ISO8601 or duration like 15m, 1h, 24h"`
	Limit int    `help:"Maximum logs to fetch" default:"100"`
}

AppsLogsCmd reads app cloud-code logs.

func (*AppsLogsCmd) Run added in v0.2.5

func (c *AppsLogsCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes apps logs.

type AppsPushCmd

type AppsPushCmd struct {
	App   string   `help:"Configured local app name"`
	Sync  bool     `help:"Delete remote files missing locally"`
	Files []string `help:"Project-relative file subset; commas split multiple files" name:"only"`
}

AppsPushCmd pushes configured local cloud code files.

func (*AppsPushCmd) Run

func (c *AppsPushCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the push command.

type AppsUpdateCmd added in v0.2.6

type AppsUpdateCmd struct {
	App         string   `required:"" help:"Application ID"`
	Name        *string  `help:"App name"`
	Description *string  `help:"App description"`
	Internal    *bool    `negatable:"" help:"Whether the app is internal (callback derived from scopes)"`
	Scopes      []string `help:"Install scopes (comma-separated, e.g. read_channels,write_channels)"`
	URL         *string  `help:"App URL (external apps only)"`
	CallbackURL *string  `name:"callback-url" help:"OAuth callback URL (external apps only)"`
	SDKVersion  *string  `name:"sdk-version" help:"Cloud-code SDK version"`
}

AppsUpdateCmd updates an existing app. Only the flags you provide are sent.

func (*AppsUpdateCmd) Run added in v0.2.6

func (c *AppsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type AuthCmd

type AuthCmd struct {
	Login   AuthLoginCmd   `cmd:"" help:"Log in to Nimbu"`
	Logout  AuthLogoutCmd  `cmd:"" help:"Log out and remove stored credentials"`
	Status  AuthStatusCmd  `cmd:"" help:"Show authentication status"`
	Whoami  AuthWhoamiCmd  `cmd:"" help:"Show current authenticated user"`
	Scopes  AuthScopesCmd  `cmd:"" help:"Show active token scopes"`
	Token   AuthTokenCmd   `cmd:"" help:"Print access token for scripts"`
	Keyring AuthKeyringCmd `cmd:"" help:"Manage keyring backend"`
}

AuthCmd handles authentication commands.

type AuthKeyringCmd

type AuthKeyringCmd struct {
	Show AuthKeyringShowCmd `cmd:"" default:"1" help:"Show current keyring backend"`
	Set  AuthKeyringSetCmd  `cmd:"" help:"Set keyring backend"`
}

AuthKeyringCmd manages keyring backend.

type AuthKeyringSetCmd

type AuthKeyringSetCmd struct {
	Backend string `required:"" help:"Backend to use: auto, keychain, file, secret-service, kwallet, wincred"`
}

AuthKeyringSetCmd sets the keyring backend.

func (*AuthKeyringSetCmd) Run

func (c *AuthKeyringSetCmd) Run(ctx context.Context) error

Run sets the keyring backend.

type AuthKeyringShowCmd

type AuthKeyringShowCmd struct{}

AuthKeyringShowCmd shows the current keyring backend.

func (*AuthKeyringShowCmd) Run

Run shows the current keyring backend.

type AuthLoginCmd

type AuthLoginCmd struct {
	Device bool   `help:"Log in with a one-time code entered in a browser on any device (SSH, containers)"`
	Scopes string `help:"Comma-separated OAuth scopes to request (default: full CLI access)"`
	// Deliberately not bound to NIMBU_TOKEN: an exported CI token must not
	// turn a login into storing that token.
	Token string `help:"Store an existing API token instead of logging in" short:"t"`

	// Deprecated email/password login, kept for scripts. Either flag selects it.
	Email     string `help:"Deprecated: log in with email and password" short:"e" hidden:""`
	Password  string `help:"Deprecated: password for --email login" short:"p" hidden:""`
	ExpiresIn int    `help:"Deprecated: token lifetime in seconds for --email login" short:"x" default:"7776000" hidden:""`
}

AuthLoginCmd logs in to Nimbu.

func (*AuthLoginCmd) Run

func (c *AuthLoginCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the login command.

type AuthLogoutCmd

type AuthLogoutCmd struct{}

AuthLogoutCmd logs out and removes stored credentials.

func (*AuthLogoutCmd) Run

func (c *AuthLogoutCmd) Run(ctx context.Context) error

Run executes the logout command.

type AuthScopesCmd

type AuthScopesCmd struct{}

AuthScopesCmd shows active scopes for the current token.

func (*AuthScopesCmd) Run

func (c *AuthScopesCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the scopes command.

type AuthStatusCmd

type AuthStatusCmd struct{}

AuthStatusCmd shows authentication status.

func (*AuthStatusCmd) Run

func (c *AuthStatusCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the status command.

type AuthTokenCmd

type AuthTokenCmd struct{}

AuthTokenCmd prints the access token.

func (*AuthTokenCmd) Run

func (c *AuthTokenCmd) Run(ctx context.Context) error

Run executes the token command.

type AuthWhoamiCmd

type AuthWhoamiCmd struct{}

AuthWhoamiCmd shows the current authenticated user.

func (*AuthWhoamiCmd) Run

func (c *AuthWhoamiCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the whoami command.

type BannerTheme

type BannerTheme struct {
	Name    string
	Label   string
	Palette []string // one hex color per banner line
}

BannerTheme holds a named color palette for the server banner.

func BannerThemeByName

func BannerThemeByName(name string) (BannerTheme, bool)

BannerThemeByName looks up a theme by name (case-insensitive).

func BannerThemes

func BannerThemes() []BannerTheme

BannerThemes returns the ordered list of available themes.

type BlogPostsCmd

type BlogPostsCmd struct {
	List   BlogPostsListCmd   `cmd:"" help:"List blog articles"`
	Get    BlogPostsGetCmd    `cmd:"" help:"Get blog article"`
	Create BlogPostsCreateCmd `cmd:"" help:"Create a blog article"`
	Update BlogPostsUpdateCmd `cmd:"" help:"Update a blog article"`
	Delete BlogPostsDeleteCmd `cmd:"" help:"Delete a blog article"`
	Count  BlogPostsCountCmd  `cmd:"" help:"Count blog articles"`
}

BlogPostsCmd manages blog posts (articles).

type BlogPostsCountCmd

type BlogPostsCountCmd struct {
	CountQueryFlags `embed:""`
	Blog            string `required:"" help:"Blog ID or handle"`
}

BlogPostsCountCmd gets count of articles for a blog.

func (*BlogPostsCountCmd) Run

func (c *BlogPostsCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type BlogPostsCreateCmd

type BlogPostsCreateCmd struct {
	Blog        string   `required:"" help:"Blog ID or handle"`
	Locale      string   `help:"Content locale for localized post fields"`
	File        string   `help:"Read post JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. title=Hello, status=published)"`
}

BlogPostsCreateCmd creates a blog article.

func (*BlogPostsCreateCmd) Run

func (c *BlogPostsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type BlogPostsDeleteCmd

type BlogPostsDeleteCmd struct {
	Blog string `required:"" help:"Blog ID or handle"`
	Post string `required:"" help:"Post ID or slug"`
}

BlogPostsDeleteCmd deletes a blog article.

func (*BlogPostsDeleteCmd) Run

func (c *BlogPostsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type BlogPostsGetCmd

type BlogPostsGetCmd struct {
	Blog   string `required:"" help:"Blog ID or handle"`
	Post   string `required:"" help:"Post ID or slug"`
	Locale string `help:"Content locale for localized post fields"`
}

BlogPostsGetCmd gets a blog article.

func (*BlogPostsGetCmd) Run

func (c *BlogPostsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type BlogPostsListCmd

type BlogPostsListCmd struct {
	QueryFlags `embed:""`
	Blog       string `required:"" help:"Blog ID or handle"`
	All        bool   `help:"Fetch all pages"`
	Page       int    `help:"Page number" default:"1"`
	PerPage    int    `help:"Items per page" default:"25"`
}

BlogPostsListCmd lists blog articles.

func (*BlogPostsListCmd) Run

func (c *BlogPostsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type BlogPostsUpdateCmd

type BlogPostsUpdateCmd struct {
	Blog        string   `required:"" help:"Blog ID or handle"`
	Post        string   `required:"" help:"Post ID or slug"`
	Locale      string   `help:"Content locale for localized post fields"`
	File        string   `help:"Read post JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. title=Hello, status=published)"`
}

BlogPostsUpdateCmd updates a blog article.

func (*BlogPostsUpdateCmd) Run

func (c *BlogPostsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type BlogsCmd

type BlogsCmd struct {
	List   BlogsListCmd   `cmd:"" help:"List blogs"`
	Get    BlogsGetCmd    `cmd:"" help:"Get blog details"`
	Create BlogsCreateCmd `cmd:"" help:"Create a blog"`
	Update BlogsUpdateCmd `cmd:"" help:"Update a blog"`
	Delete BlogsDeleteCmd `cmd:"" help:"Delete a blog"`
	Count  BlogsCountCmd  `cmd:"" help:"Count blogs"`
	Posts  BlogPostsCmd   `cmd:"" help:"Manage blog articles" aliases:"articles"`
	Copy   BlogsCopyCmd   `cmd:"" help:"Copy blogs and posts between sites"`
}

BlogsCmd manages blogs.

type BlogsCopyCmd

type BlogsCopyCmd struct {
	Handle   string `help:"Blog handle to copy" default:"*" name:"only"`
	From     string `help:"Source site" required:"" name:"from"`
	To       string `help:"Target site" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
}

BlogsCopyCmd copies blogs and their posts between sites.

func (*BlogsCopyCmd) Run

func (c *BlogsCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes blogs copy.

type BlogsCountCmd

type BlogsCountCmd struct {
	CountQueryFlags `embed:""`
}

BlogsCountCmd gets blog count.

func (*BlogsCountCmd) Run

func (c *BlogsCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type BlogsCreateCmd

type BlogsCreateCmd struct {
	Locale      string   `help:"Content locale for localized blog fields"`
	File        string   `help:"Read blog JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=Blog, slug=news)"`
}

BlogsCreateCmd creates a blog.

func (*BlogsCreateCmd) Run

func (c *BlogsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type BlogsDeleteCmd

type BlogsDeleteCmd struct {
	Blog string `required:"" help:"Blog ID or handle"`
}

BlogsDeleteCmd deletes a blog.

func (*BlogsDeleteCmd) Run

func (c *BlogsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type BlogsGetCmd

type BlogsGetCmd struct {
	Blog   string `required:"" help:"Blog ID or handle"`
	Locale string `help:"Content locale for localized blog fields"`
}

BlogsGetCmd gets blog details.

func (*BlogsGetCmd) Run

func (c *BlogsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type BlogsListCmd

type BlogsListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

BlogsListCmd lists blogs.

func (*BlogsListCmd) Run

func (c *BlogsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type BlogsUpdateCmd

type BlogsUpdateCmd struct {
	Blog        string   `required:"" help:"Blog ID or handle"`
	Locale      string   `help:"Content locale for localized blog fields"`
	File        string   `help:"Read blog JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=Blog, slug=news)"`
}

BlogsUpdateCmd updates a blog.

func (*BlogsUpdateCmd) Run

func (c *BlogsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type CLI

type CLI struct {
	RootFlags `embed:""`

	HelpAll             bool                   `help:"Show all flags including hidden" name:"help-all" hidden:""`
	Version             kong.VersionFlag       `help:"Print version and exit"`
	Auth                AuthCmd                `cmd:"" help:"Authentication and credentials"`
	Init                InitCmd                `cmd:"" help:"Bootstrap a local theme project"`
	Sites               SitesCmd               `cmd:"" help:"Manage sites"`
	Schema              SchemaCmd              `cmd:"" help:"Manage declarative schemas"`
	Release             ReleaseCmd             `cmd:"" help:"Release schema, cloud code and theme"`
	Releases            ReleasesCmd            `cmd:"" help:"List successful releases"`
	Channels            ChannelsCmd            `cmd:"" help:"Manage channels and entries"`
	Pages               PagesCmd               `cmd:"" help:"Manage pages"`
	Menus               MenusCmd               `cmd:"" help:"Manage navigation menus"`
	Products            ProductsCmd            `cmd:"" help:"Manage products"`
	ShippingRates       ShippingRatesCmd       `cmd:"" name:"shipping-rates" help:"Manage shipping rates"`
	Collections         CollectionsCmd         `cmd:"" help:"Manage collections"`
	Coupons             CouponsCmd             `cmd:"" help:"Manage coupons"`
	Domains             DomainsCmd             `cmd:"" help:"Manage custom domains"`
	Orders              OrdersCmd              `cmd:"" help:"Manage orders"`
	Customers           CustomersCmd           `cmd:"" help:"Manage customers"`
	Mails               MailsCmd               `cmd:"" aliases:"mail" help:"Sync notification templates to local files"`
	Announcements       AnnouncementsCmd       `cmd:"" help:"Manage platform announcements"`
	DomainRegistrations DomainRegistrationsCmd `cmd:"" name:"domain-registrations" help:"Manage domain registrations"`
	Settings            SettingsCmd            `cmd:"" help:"Manage site settings"`
	Events              EventsCmd              `cmd:"" help:"Track and ingest events"`
	Realtime            RealtimeCmd            `cmd:"" help:"Realtime grants and live queries"`
	Notifications       NotificationsCmd       `cmd:"" help:"Manage notifications"`
	Roles               RolesCmd               `cmd:"" help:"Manage roles"`
	Redirects           RedirectsCmd           `cmd:"" help:"Manage redirects"`
	Functions           FunctionsCmd           `cmd:"" help:"Execute cloud functions"`
	Jobs                JobsCmd                `cmd:"" help:"Execute cloud jobs"`
	Apps                AppsCmd                `cmd:"" help:"Manage OAuth apps"`
	Senders             SendersCmd             `cmd:"" help:"Manage email sender domains"`
	Themes              ThemesCmd              `cmd:"" help:"Manage themes"`
	Uploads             UploadsCmd             `cmd:"" help:"Manage uploads"`
	Blogs               BlogsCmd               `cmd:"" help:"Manage blogs"`
	Webhooks            WebhooksCmd            `cmd:"" help:"Manage webhooks"`
	Translations        TranslationsCmd        `cmd:"" help:"Manage translations"`
	Server              ServerCmd              `cmd:"" help:"Run local simulator proxy with child dev server"`
	Env                 EnvCmd                 `cmd:"" help:"Manage project environments"`
	Config              ConfigCmd              `cmd:"" help:"Manage configuration"`
	API                 APICmd                 `cmd:"" help:"Raw API access"`
	Commands            CommandsCmd            `cmd:"" help:"Export the machine-readable command contract"`
	Completion          CompletionCmd          `cmd:"" help:"Generate shell completions"`
	Complete            InternalCompleteCmd    `cmd:"" name:"__complete" hidden:""`
}

CLI is the root command structure.

type ChannelEntriesCmd

type ChannelEntriesCmd struct {
	List    ChannelEntriesListCmd    `cmd:"" help:"List channel entries"`
	Get     ChannelEntriesGetCmd     `cmd:"" help:"Get entry by ID or slug"`
	Create  ChannelEntriesCreateCmd  `cmd:"" help:"Create entry from JSON"`
	Update  ChannelEntriesUpdateCmd  `cmd:"" help:"Update entry"`
	Delete  ChannelEntriesDeleteCmd  `cmd:"" help:"Delete entry"`
	Count   ChannelEntriesCountCmd   `cmd:"" help:"Count entries"`
	Copy    ChannelEntriesCopyCmd    `cmd:"" help:"Copy channel entries between sites"`
	Gallery ChannelEntriesGalleryCmd `cmd:"" help:"Manage gallery fields on channel entries"`
	Watch   ChannelEntriesWatchCmd   `cmd:"" help:"Stream live entry events over the realtime socket"`
}

ChannelEntriesCmd manages channel entries.

type ChannelEntriesCopyCmd

type ChannelEntriesCopyCmd struct {
	From          string `help:"Source site/channel" required:"" name:"from"`
	To            string `help:"Target site/channel" required:"" name:"to"`
	FromHost      string `help:"Source API base URL or host" name:"from-host"`
	ToHost        string `help:"Target API base URL or host" name:"to-host"`
	Recursive     bool   `help:"Recursively copy referenced channel entries"`
	Only          string `help:"Comma-separated channel allowlist when using --recursive"`
	Query         string `help:"Raw query string to append to the source entry list"`
	Where         string `help:"Where expression for source entry selection"`
	PerPage       int    `help:"Items per page" name:"per-page"`
	Upsert        string `help:"Comma-separated upsert fields, optionally channel-scoped as channel:field"`
	CopyCustomers bool   `name:"copy-customers" help:"Copy related customers for owners and customer fields"`
	AllowErrors   bool   `name:"allow-errors" help:"Continue on item-level validation errors"`
	DryRun        bool   `name:"dry-run" help:"Reserved for parity; currently reports planned selection only"`
}

ChannelEntriesCopyCmd copies channel entries between sites.

func (*ChannelEntriesCopyCmd) Run

func (c *ChannelEntriesCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes entries copy.

type ChannelEntriesCountCmd

type ChannelEntriesCountCmd struct {
	CountQueryFlags `embed:""`
	Channel         string `required:"" help:"Channel ID or slug"`
}

ChannelEntriesCountCmd counts channel entries.

func (*ChannelEntriesCountCmd) Run

Run executes the count command.

type ChannelEntriesCreateCmd

type ChannelEntriesCreateCmd struct {
	Channel     string   `required:"" help:"Channel ID or slug"`
	Locale      string   `help:"Content locale for localized channel fields"`
	File        string   `help:"Read entry JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. title=Hello, fields.teaser=Text)"`
}

ChannelEntriesCreateCmd creates a channel entry.

func (*ChannelEntriesCreateCmd) Run

Run executes the create command.

type ChannelEntriesDeleteCmd

type ChannelEntriesDeleteCmd struct {
	Channel string `required:"" help:"Channel ID or slug"`
	Entry   string `required:"" help:"Entry ID or slug"`
}

ChannelEntriesDeleteCmd deletes a channel entry.

func (*ChannelEntriesDeleteCmd) Run

Run executes the delete command.

type ChannelEntriesGalleryAddCmd added in v0.2.2

type ChannelEntriesGalleryAddCmd struct {
	Channel   string   `required:"" help:"Channel ID or slug"`
	Entry     string   `required:"" help:"Entry ID or slug"`
	Field     string   `required:"" help:"Gallery field name"`
	Images    []string `name:"image" help:"Local image path (repeatable)"`
	Captions  []string `name:"caption" help:"Caption for each image, matched by order"`
	Positions []int    `name:"position" help:"Position for each image, matched by order"`
	Locale    string   `help:"Content locale for localized channel fields"`
	DryRun    bool     `name:"dry-run" help:"Print the payload without updating the entry"`
}

ChannelEntriesGalleryAddCmd appends gallery images.

func (*ChannelEntriesGalleryAddCmd) Run added in v0.2.2

type ChannelEntriesGalleryCmd added in v0.2.2

type ChannelEntriesGalleryCmd struct {
	List    ChannelEntriesGalleryListCmd    `cmd:"" help:"List gallery images"`
	Set     ChannelEntriesGallerySetCmd     `cmd:"" help:"Replace gallery images"`
	Add     ChannelEntriesGalleryAddCmd     `cmd:"" help:"Append gallery images"`
	Update  ChannelEntriesGalleryUpdateCmd  `cmd:"" help:"Update one gallery image"`
	Remove  ChannelEntriesGalleryRemoveCmd  `cmd:"" help:"Remove gallery images"`
	Reorder ChannelEntriesGalleryReorderCmd `cmd:"" help:"Reorder gallery images"`
}

ChannelEntriesGalleryCmd manages gallery fields on channel entries.

type ChannelEntriesGalleryListCmd added in v0.2.2

type ChannelEntriesGalleryListCmd struct {
	Channel string `required:"" help:"Channel ID or slug"`
	Entry   string `required:"" help:"Entry ID or slug"`
	Field   string `required:"" help:"Gallery field name"`
	Locale  string `help:"Content locale for localized channel fields"`
}

ChannelEntriesGalleryListCmd lists gallery images.

func (*ChannelEntriesGalleryListCmd) Run added in v0.2.2

type ChannelEntriesGalleryRemoveCmd added in v0.2.2

type ChannelEntriesGalleryRemoveCmd struct {
	Channel  string   `required:"" help:"Channel ID or slug"`
	Entry    string   `required:"" help:"Entry ID or slug"`
	Field    string   `required:"" help:"Gallery field name"`
	ImageIDs []string `name:"image-id" required:"" help:"Gallery image ID to remove (repeatable)"`
	Locale   string   `help:"Content locale for localized channel fields"`
	DryRun   bool     `name:"dry-run" help:"Print the payload without updating the entry"`
}

ChannelEntriesGalleryRemoveCmd removes gallery images.

func (*ChannelEntriesGalleryRemoveCmd) Run added in v0.2.2

type ChannelEntriesGalleryReorderCmd added in v0.2.2

type ChannelEntriesGalleryReorderCmd struct {
	Channel string `required:"" help:"Channel ID or slug"`
	Entry   string `required:"" help:"Entry ID or slug"`
	Field   string `required:"" help:"Gallery field name"`
	Order   string `required:"" help:"Comma-separated gallery image IDs in desired order"`
	Locale  string `help:"Content locale for localized channel fields"`
	DryRun  bool   `name:"dry-run" help:"Print the payload without updating the entry"`
}

ChannelEntriesGalleryReorderCmd reorders gallery images.

func (*ChannelEntriesGalleryReorderCmd) Run added in v0.2.2

type ChannelEntriesGallerySetCmd added in v0.2.2

type ChannelEntriesGallerySetCmd struct {
	Channel   string   `required:"" help:"Channel ID or slug"`
	Entry     string   `required:"" help:"Entry ID or slug"`
	Field     string   `required:"" help:"Gallery field name"`
	Images    []string `name:"image" help:"Local image path (repeatable)"`
	Captions  []string `name:"caption" help:"Caption for each image, matched by order"`
	Positions []int    `name:"position" help:"Position for each image, matched by order"`
	Locale    string   `help:"Content locale for localized channel fields"`
	DryRun    bool     `name:"dry-run" help:"Print the payload without updating the entry"`
}

ChannelEntriesGallerySetCmd replaces gallery images.

func (*ChannelEntriesGallerySetCmd) Run added in v0.2.2

type ChannelEntriesGalleryUpdateCmd added in v0.2.2

type ChannelEntriesGalleryUpdateCmd struct {
	Channel  string  `required:"" help:"Channel ID or slug"`
	Entry    string  `required:"" help:"Entry ID or slug"`
	Field    string  `required:"" help:"Gallery field name"`
	ImageID  string  `name:"image-id" required:"" help:"Gallery image ID"`
	Caption  *string `help:"Updated caption"`
	Position *int    `help:"Updated position"`
	Image    string  `name:"image" help:"Replacement local image path"`
	Locale   string  `help:"Content locale for localized channel fields"`
	DryRun   bool    `name:"dry-run" help:"Print the payload without updating the entry"`
}

ChannelEntriesGalleryUpdateCmd updates one gallery image.

func (*ChannelEntriesGalleryUpdateCmd) Run added in v0.2.2

type ChannelEntriesGetCmd

type ChannelEntriesGetCmd struct {
	QueryFlags `embed:""`
	Channel    string `required:"" help:"Channel ID or slug"`
	Entry      string `required:"" help:"Entry ID or slug"`
}

ChannelEntriesGetCmd gets an entry by ID or slug.

func (ChannelEntriesGetCmd) Help added in v0.3.1

func (*ChannelEntriesGetCmd) Run

func (c *ChannelEntriesGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type ChannelEntriesListCmd

type ChannelEntriesListCmd struct {
	QueryFlags `embed:""`
	Channel    string `required:"" help:"Channel ID or slug"`
	All        bool   `help:"Fetch all pages"`
	Page       int    `help:"Page number" default:"1"`
	PerPage    int    `help:"Items per page" default:"25"`
}

ChannelEntriesListCmd lists channel entries.

func (*ChannelEntriesListCmd) Run

func (c *ChannelEntriesListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type ChannelEntriesUpdateCmd

type ChannelEntriesUpdateCmd struct {
	Channel     string   `required:"" help:"Channel ID or slug"`
	Entry       string   `required:"" help:"Entry ID or slug"`
	Locale      string   `` /* 179-byte string literal not displayed */
	File        string   `help:"Read entry JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. title=Hello, fields.teaser=Text)"`
}

ChannelEntriesUpdateCmd updates a channel entry.

func (*ChannelEntriesUpdateCmd) Run

Run executes the update command.

type ChannelEntriesWatchCmd added in v0.3.3

type ChannelEntriesWatchCmd struct {
	Channel  string        `required:"" help:"Channel ID or slug" group:"Query"`
	Where    string        `help:"Filter expression (same syntax as --filters where=...)" group:"Query"`
	Filters  []string      `aliases:"filter" help:"Filter entries by key=value or key.op=value, repeatable" group:"Query"`
	Once     bool          `help:"Exit after the first event"`
	For      time.Duration `name:"for" help:"Stop watching after this duration, e.g. 30s"`
	Host     string        `help:"Override the site host used for the websocket (e.g. localhost:3000 for dev)"`
	Insecure bool          `help:"Skip TLS verification for the websocket (dev only)"`
}

ChannelEntriesWatchCmd streams live channel entry events over the realtime socket.

func (*ChannelEntriesWatchCmd) Run added in v0.3.3

Run executes the watch command.

type ChannelsCmd

type ChannelsCmd struct {
	List    ChannelsListCmd   `cmd:"" help:"List channels"`
	Get     ChannelsGetCmd    `cmd:"" help:"Get channel details"`
	Create  ChannelsCreateCmd `cmd:"" help:"Create a channel from JSON or inline assignments"`
	Info    ChannelsInfoCmd   `cmd:"" help:"Show rich channel info and TypeScript output"`
	Types   ChannelsTypesCmd  `cmd:"" help:"Generate one TypeScript module with the types of all channels"`
	Copy    ChannelsCopyCmd   `cmd:"" help:"Copy channel configuration between sites"`
	Diff    ChannelsDiffCmd   `cmd:"" help:"Diff channel configuration between sites"`
	Empty   ChannelsEmptyCmd  `cmd:"" help:"Empty a channel after strict confirmation"`
	Delete  ChannelsDeleteCmd `cmd:"" help:"Delete a channel (requires --force)"`
	Entries ChannelEntriesCmd `cmd:"" help:"Manage channel entries"`
	Fields  ChannelsFieldsCmd `cmd:"" help:"Manage channel fields"`
}

ChannelsCmd manages channels.

type ChannelsCopyCmd

type ChannelsCopyCmd struct {
	All      bool   `help:"Copy all channels from source to target"`
	From     string `help:"Source site/channel or site when using --all" required:"" name:"from"`
	To       string `help:"Target site/channel or site when using --all" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
}

ChannelsCopyCmd copies one or all channels between sites.

func (*ChannelsCopyCmd) Run

func (c *ChannelsCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes channel copy.

type ChannelsCreateCmd added in v0.2.3

type ChannelsCreateCmd struct {
	File        string   `help:"Read channel JSON from file (use - for stdin)"`
	Assignments []string `` /* 136-byte string literal not displayed */
}

ChannelsCreateCmd creates a channel.

func (*ChannelsCreateCmd) Run added in v0.2.3

func (c *ChannelsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type ChannelsDeleteCmd added in v0.2.3

type ChannelsDeleteCmd struct {
	Channel string `required:"" help:"Channel ID or slug"`
}

ChannelsDeleteCmd deletes a channel.

func (*ChannelsDeleteCmd) Run added in v0.2.3

func (c *ChannelsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type ChannelsDiffCmd

type ChannelsDiffCmd struct {
	From     string `help:"Source site/channel" required:"" name:"from"`
	To       string `help:"Target site/channel" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
}

ChannelsDiffCmd diffs two channels between sites.

func (*ChannelsDiffCmd) Run

func (c *ChannelsDiffCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes channel diff.

type ChannelsEmptyCmd added in v0.1.4

type ChannelsEmptyCmd struct {
	Channel string `required:"" help:"Channel ID or slug"`
	Confirm string `help:"Exact channel slug confirmation"`
}

func (*ChannelsEmptyCmd) Run added in v0.1.4

func (c *ChannelsEmptyCmd) Run(ctx context.Context, flags *RootFlags) error

type ChannelsFieldsAddCmd added in v0.1.14

type ChannelsFieldsAddCmd struct {
	Channel     string   `required:"" help:"Channel slug"`
	Name        string   `required:"" help:"Field name"`
	Assignments []string `arg:"" optional:"" help:"Field attributes (e.g. type=string label=Title)"`
}

ChannelsFieldsAddCmd adds a channel field.

func (*ChannelsFieldsAddCmd) Run added in v0.1.14

func (c *ChannelsFieldsAddCmd) Run(ctx context.Context, flags *RootFlags) error

type ChannelsFieldsApplyCmd added in v0.1.14

type ChannelsFieldsApplyCmd struct {
	Channel string `required:"" help:"Channel slug"`
	File    string `required:"" help:"Read field JSON array from file (use - for stdin)"`
}

ChannelsFieldsApplyCmd applies channel fields.

func (*ChannelsFieldsApplyCmd) Run added in v0.1.14

type ChannelsFieldsCmd

type ChannelsFieldsCmd struct {
	List    ChannelsFieldsListCmd    `cmd:"" help:"List channel fields"`
	Add     ChannelsFieldsAddCmd     `cmd:"" help:"Add a channel field"`
	Update  ChannelsFieldsUpdateCmd  `cmd:"" help:"Update a channel field"`
	Delete  ChannelsFieldsDeleteCmd  `cmd:"" help:"Delete a channel field"`
	Apply   ChannelsFieldsApplyCmd   `cmd:"" help:"Apply channel fields from JSON"`
	Replace ChannelsFieldsReplaceCmd `cmd:"" help:"Replace channel fields from JSON"`
	Diff    ChannelsFieldsDiffCmd    `cmd:"" help:"Diff channel fields against JSON"`
}

ChannelsFieldsCmd manages channel fields.

type ChannelsFieldsDeleteCmd added in v0.1.14

type ChannelsFieldsDeleteCmd struct {
	Channel string `required:"" help:"Channel slug"`
	Field   string `required:"" help:"Field ID or name"`
}

ChannelsFieldsDeleteCmd deletes a channel field.

func (*ChannelsFieldsDeleteCmd) Run added in v0.1.14

type ChannelsFieldsDiffCmd added in v0.1.14

type ChannelsFieldsDiffCmd struct {
	Channel string `required:"" help:"Channel slug"`
	File    string `required:"" help:"Read field JSON array from file (use - for stdin)"`
}

ChannelsFieldsDiffCmd diffs channel fields.

func (*ChannelsFieldsDiffCmd) Run added in v0.1.14

func (c *ChannelsFieldsDiffCmd) Run(ctx context.Context, flags *RootFlags) error

type ChannelsFieldsListCmd added in v0.1.14

type ChannelsFieldsListCmd struct {
	Channel string `required:"" help:"Channel slug"`
}

ChannelsFieldsListCmd lists channel fields.

func (*ChannelsFieldsListCmd) Run added in v0.1.14

func (c *ChannelsFieldsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list fields command.

type ChannelsFieldsReplaceCmd added in v0.1.14

type ChannelsFieldsReplaceCmd struct {
	Channel string `required:"" help:"Channel slug"`
	File    string `required:"" help:"Read field JSON array from file (use - for stdin)"`
}

ChannelsFieldsReplaceCmd replaces channel fields.

func (*ChannelsFieldsReplaceCmd) Run added in v0.1.14

type ChannelsFieldsUpdateCmd added in v0.1.14

type ChannelsFieldsUpdateCmd struct {
	Channel     string   `required:"" help:"Channel slug"`
	Field       string   `required:"" help:"Field ID or name"`
	Assignments []string `arg:"" optional:"" help:"Field attributes to update (e.g. label=Headline required:=true)"`
}

ChannelsFieldsUpdateCmd updates a channel field.

func (*ChannelsFieldsUpdateCmd) Run added in v0.1.14

type ChannelsGetCmd

type ChannelsGetCmd struct {
	Channel string `required:"" help:"Channel slug"`
}

ChannelsGetCmd gets channel details.

func (*ChannelsGetCmd) Run

func (c *ChannelsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type ChannelsInfoCmd

type ChannelsInfoCmd struct {
	Channel    string `required:"" help:"Channel slug or site/channel"`
	TypeScript bool   `name:"typescript" help:"Render a TypeScript type instead of the rich summary"`
}

ChannelsInfoCmd shows rich channel info.

func (*ChannelsInfoCmd) Run

func (c *ChannelsInfoCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes channel info.

type ChannelsListCmd

type ChannelsListCmd struct {
	QueryFlags     `embed:""`
	All            bool `help:"Fetch all pages"`
	Page           int  `help:"Page number" default:"1"`
	PerPage        int  `help:"Items per page" default:"25"`
	WithEntryCount bool `name:"with-entry-count" help:"Fetch entry count for each channel" default:"true"`
	NoEntryCount   bool `name:"no-entry-count" help:"Skip fetching entry count for each channel"`
}

ChannelsListCmd lists channels.

func (*ChannelsListCmd) Run

func (c *ChannelsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type ChannelsTypesCmd added in v0.4.1

type ChannelsTypesCmd struct {
	Channel []string `help:"Only include these channels (slug or ID; repeatable or comma-separated)"`
	Output  string   `help:"Write the module to this path instead of stdout (- for stdout)" short:"o"`
}

ChannelsTypesCmd generates one TypeScript module with the types of all channels.

func (*ChannelsTypesCmd) Run added in v0.4.1

func (c *ChannelsTypesCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the types command.

type CollectionsCmd

type CollectionsCmd struct {
	List   CollectionsListCmd   `cmd:"" help:"List collections"`
	Get    CollectionsGetCmd    `cmd:"" help:"Get collection details"`
	Create CollectionsCreateCmd `cmd:"" help:"Create collection from JSON"`
	Update CollectionsUpdateCmd `cmd:"" help:"Update collection"`
	Delete CollectionsDeleteCmd `cmd:"" help:"Delete collection"`
	Count  CollectionsCountCmd  `cmd:"" help:"Count collections"`
	Copy   CollectionsCopyCmd   `cmd:"" help:"Copy collections between sites"`
}

CollectionsCmd manages collections.

type CollectionsCopyCmd

type CollectionsCopyCmd struct {
	From        string `help:"Source site" required:"" name:"from"`
	To          string `help:"Target site" required:"" name:"to"`
	FromHost    string `help:"Source API base URL or host" name:"from-host"`
	ToHost      string `help:"Target API base URL or host" name:"to-host"`
	AllowErrors bool   `name:"allow-errors" help:"Continue on item-level validation errors"`
}

CollectionsCopyCmd copies collections between sites.

func (*CollectionsCopyCmd) Run

func (c *CollectionsCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes collections copy.

type CollectionsCountCmd

type CollectionsCountCmd struct {
	CountQueryFlags `embed:""`
}

CollectionsCountCmd gets count of collections.

func (*CollectionsCountCmd) Run

func (c *CollectionsCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type CollectionsCreateCmd

type CollectionsCreateCmd struct {
	Locale      string   `help:"Content locale for localized collection fields"`
	File        string   `help:"Read collection JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=Summer, slug=summer)"`
}

CollectionsCreateCmd creates a collection.

func (*CollectionsCreateCmd) Run

func (c *CollectionsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type CollectionsDeleteCmd

type CollectionsDeleteCmd struct {
	Collection string `required:"" help:"Collection ID or slug"`
}

CollectionsDeleteCmd deletes a collection.

func (*CollectionsDeleteCmd) Run

func (c *CollectionsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type CollectionsGetCmd

type CollectionsGetCmd struct {
	Collection string `required:"" help:"Collection ID or slug"`
	Locale     string `help:"Content locale for localized collection fields"`
}

CollectionsGetCmd gets a collection by ID or slug.

func (*CollectionsGetCmd) Run

func (c *CollectionsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type CollectionsListCmd

type CollectionsListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

CollectionsListCmd lists collections.

func (*CollectionsListCmd) Run

func (c *CollectionsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type CollectionsUpdateCmd

type CollectionsUpdateCmd struct {
	Collection  string   `required:"" help:"Collection ID or slug"`
	Locale      string   `help:"Content locale for localized collection fields"`
	File        string   `help:"Read collection JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=Summer, slug=summer)"`
}

CollectionsUpdateCmd updates a collection.

func (*CollectionsUpdateCmd) Run

func (c *CollectionsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type CommandContract added in v0.3.0

type CommandContract struct {
	SchemaVersion int                      `json:"schema_version"`
	CLI           string                   `json:"cli"`
	GlobalFlags   []CommandContractFlag    `json:"global_flags,omitempty"`
	Commands      []CommandContractCommand `json:"commands"`
}

type CommandContractArgument added in v0.3.0

type CommandContractArgument struct {
	Name     string `json:"name"`
	Required bool   `json:"required"`
	Help     string `json:"help,omitempty"`
}

type CommandContractCommand added in v0.3.0

type CommandContractCommand struct {
	Path      string                    `json:"path"`
	Help      string                    `json:"help,omitempty"`
	Aliases   []string                  `json:"aliases,omitempty"`
	Arguments []CommandContractArgument `json:"arguments,omitempty"`
	Flags     []CommandContractFlag     `json:"flags,omitempty"`
}

type CommandContractFlag added in v0.3.0

type CommandContractFlag struct {
	Name     string   `json:"name"`
	Short    string   `json:"short,omitempty"`
	Required bool     `json:"required"`
	Default  string   `json:"default,omitempty"`
	Help     string   `json:"help,omitempty"`
	Aliases  []string `json:"aliases,omitempty"`
}

type CommandsCmd added in v0.3.0

type CommandsCmd struct{}

CommandsCmd exports the machine-readable CLI contract used by docs and skills.

func (*CommandsCmd) Run added in v0.3.0

func (c *CommandsCmd) Run(ctx context.Context) error

type CompletionCmd

type CompletionCmd struct {
	Shell string `help:"Shell to generate completions for (bash, zsh, fish)" default:"bash"`
}

CompletionCmd generates shell completions.

func (*CompletionCmd) Run

func (c *CompletionCmd) Run(ctx context.Context) error

type ConfigBannerCmd

type ConfigBannerCmd struct{}

ConfigBannerCmd lets users pick a banner theme interactively.

func (*ConfigBannerCmd) Run

func (c *ConfigBannerCmd) Run(ctx context.Context) error

type ConfigCmd

type ConfigCmd struct {
	List   ConfigListCmd   `cmd:"" help:"List all config values"`
	Get    ConfigGetCmd    `cmd:"" help:"Get a config value"`
	Set    ConfigSetCmd    `cmd:"" help:"Set a config value"`
	Unset  ConfigUnsetCmd  `cmd:"" help:"Unset a config value"`
	Path   ConfigPathCmd   `cmd:"" help:"Print config file path"`
	Banner ConfigBannerCmd `cmd:"" help:"Pick a banner theme interactively"`
}

ConfigCmd manages CLI configuration.

type ConfigGetCmd

type ConfigGetCmd struct {
	Key string `required:"" help:"Config key to get"`
}

ConfigGetCmd gets a config value.

func (*ConfigGetCmd) Run

func (c *ConfigGetCmd) Run(ctx context.Context) error

type ConfigListCmd

type ConfigListCmd struct{}

ConfigListCmd lists all config values.

func (*ConfigListCmd) Run

func (c *ConfigListCmd) Run(ctx context.Context) error

type ConfigPathCmd

type ConfigPathCmd struct{}

ConfigPathCmd prints the config file path.

func (*ConfigPathCmd) Run

func (c *ConfigPathCmd) Run(ctx context.Context) error

type ConfigSetCmd

type ConfigSetCmd struct {
	Key   string `required:"" help:"Config key to set"`
	Value string `required:"" help:"Value to set"`
}

ConfigSetCmd sets a config value.

func (*ConfigSetCmd) Run

func (c *ConfigSetCmd) Run(ctx context.Context) error

type ConfigUnsetCmd

type ConfigUnsetCmd struct {
	Key string `required:"" help:"Config key to unset"`
}

ConfigUnsetCmd unsets a config value.

func (*ConfigUnsetCmd) Run

func (c *ConfigUnsetCmd) Run(ctx context.Context) error

type CountQueryFlags added in v0.3.0

type CountQueryFlags struct {
	Locale  string   `help:"Locale filter; localized resources use it as content locale" group:"Query"`
	Filters []string `help:"Filter by key=value, repeatable" group:"Query"`
}

CountQueryFlags contains query parameters that count endpoints can honor.

type CouponsCmd

type CouponsCmd struct {
	List   CouponsListCmd   `cmd:"" help:"List coupons"`
	Get    CouponsGetCmd    `cmd:"" help:"Get coupon details"`
	Create CouponsCreateCmd `cmd:"" help:"Create coupon from JSON"`
	Update CouponsUpdateCmd `cmd:"" help:"Update coupon"`
	Delete CouponsDeleteCmd `cmd:"" help:"Delete coupon"`
	Count  CouponsCountCmd  `cmd:"" help:"Count coupons"`
}

CouponsCmd manages coupons.

type CouponsCountCmd

type CouponsCountCmd struct {
	CountQueryFlags `embed:""`
}

CouponsCountCmd gets count of coupons.

func (*CouponsCountCmd) Run

func (c *CouponsCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type CouponsCreateCmd

type CouponsCreateCmd struct {
	File        string   `help:"Read coupon JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=Promo, code=SPRING)"`
}

CouponsCreateCmd creates a coupon.

func (*CouponsCreateCmd) Run

func (c *CouponsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type CouponsDeleteCmd

type CouponsDeleteCmd struct {
	Coupon string `required:"" help:"Coupon ID"`
}

CouponsDeleteCmd deletes a coupon.

func (*CouponsDeleteCmd) Run

func (c *CouponsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type CouponsGetCmd

type CouponsGetCmd struct {
	Coupon string `required:"" help:"Coupon ID"`
}

CouponsGetCmd gets a coupon by ID.

func (*CouponsGetCmd) Run

func (c *CouponsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type CouponsListCmd

type CouponsListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

CouponsListCmd lists coupons.

func (*CouponsListCmd) Run

func (c *CouponsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type CouponsUpdateCmd

type CouponsUpdateCmd struct {
	Coupon      string   `required:"" help:"Coupon ID"`
	File        string   `help:"Read coupon JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=Promo, code=SPRING)"`
}

CouponsUpdateCmd updates a coupon.

func (*CouponsUpdateCmd) Run

func (c *CouponsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type CustomerRolesAddCmd added in v0.3.0

type CustomerRolesAddCmd struct {
	Customer string   `required:"" help:"Customer ID, slug, or email"`
	Roles    []string `required:"" name:"role" help:"Role ID or name, repeatable"`
}

func (*CustomerRolesAddCmd) Run added in v0.3.0

func (c *CustomerRolesAddCmd) Run(ctx context.Context, flags *RootFlags) error

type CustomerRolesCmd added in v0.3.0

type CustomerRolesCmd struct {
	List   CustomerRolesListCmd   `cmd:"" help:"List directly assigned customer roles"`
	Set    CustomerRolesSetCmd    `cmd:"" help:"Replace directly assigned customer roles"`
	Add    CustomerRolesAddCmd    `cmd:"" help:"Add directly assigned customer roles"`
	Remove CustomerRolesRemoveCmd `cmd:"" help:"Remove directly assigned customer roles"`
}

type CustomerRolesListCmd added in v0.3.0

type CustomerRolesListCmd struct {
	Customer string `required:"" help:"Customer ID, slug, or email"`
}

func (*CustomerRolesListCmd) Run added in v0.3.0

type CustomerRolesRemoveCmd added in v0.3.0

type CustomerRolesRemoveCmd struct {
	Customer string   `required:"" help:"Customer ID, slug, or email"`
	Roles    []string `required:"" name:"role" help:"Role ID or name, repeatable"`
}

func (*CustomerRolesRemoveCmd) Run added in v0.3.0

type CustomerRolesSetCmd added in v0.3.0

type CustomerRolesSetCmd struct {
	Customer string   `required:"" help:"Customer ID, slug, or email"`
	Roles    []string `required:"" name:"role" help:"Role ID or name, repeatable"`
}

func (*CustomerRolesSetCmd) Run added in v0.3.0

func (c *CustomerRolesSetCmd) Run(ctx context.Context, flags *RootFlags) error

type CustomersCmd

type CustomersCmd struct {
	List               CustomersListCmd               `cmd:"" help:"List customers"`
	Get                CustomersGetCmd                `cmd:"" help:"Get customer by ID or email"`
	Create             CustomersCreateCmd             `cmd:"" help:"Create a customer"`
	Update             CustomersUpdateCmd             `cmd:"" help:"Update a customer"`
	Delete             CustomersDeleteCmd             `cmd:"" help:"Delete a customer"`
	Count              CustomersCountCmd              `cmd:"" help:"Count customers"`
	Copy               CustomersCopyCmd               `cmd:"" help:"Copy customers between sites"`
	Fields             CustomersFieldsCmd             `cmd:"" help:"Show customer field schema"`
	Config             CustomersConfigCmd             `cmd:"" help:"Copy or diff customer customizations"`
	ResetPassword      CustomersResetPasswordCmd      `cmd:"reset-password" help:"Send password reset instructions"`
	ResendConfirmation CustomersResendConfirmationCmd `cmd:"resend-confirmation" help:"Resend confirmation instructions"`
	Roles              CustomerRolesCmd               `cmd:"" help:"Manage customer roles"`
}

CustomersCmd manages customers.

type CustomersConfigCmd

type CustomersConfigCmd struct {
	Copy   CustomersConfigCopyCmd `cmd:"" help:"Copy customer customizations between sites"`
	Diff   CustomersConfigDiffCmd `cmd:"" help:"Diff customer customizations between sites"`
	Fields CustomersFieldsCmd     `cmd:"" help:"Alias for customers fields" hidden:""`
}

CustomersConfigCmd manages customer customizations.

type CustomersConfigCopyCmd

type CustomersConfigCopyCmd struct {
	From     string `help:"Source site" required:"" name:"from"`
	To       string `help:"Target site" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
}

CustomersConfigCopyCmd copies customer customizations.

func (*CustomersConfigCopyCmd) Run

type CustomersConfigDiffCmd

type CustomersConfigDiffCmd struct {
	From     string `help:"Source site" required:"" name:"from"`
	To       string `help:"Target site" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
}

CustomersConfigDiffCmd diffs customer customizations.

func (*CustomersConfigDiffCmd) Run

type CustomersCopyCmd

type CustomersCopyCmd struct {
	From           string `help:"Source site" required:"" name:"from"`
	To             string `help:"Target site" required:"" name:"to"`
	FromHost       string `help:"Source API base URL or host" name:"from-host"`
	ToHost         string `help:"Target API base URL or host" name:"to-host"`
	Query          string `help:"Raw query string to append to the source customer list"`
	Where          string `help:"Where expression for source customer selection"`
	PerPage        int    `help:"Items per page" name:"per-page"`
	Upsert         string `help:"Comma-separated upsert fields" default:"email"`
	PasswordLength int    `help:"Generated password length for newly created customers" name:"password-length" default:"12"`
	AllowErrors    bool   `name:"allow-errors" help:"Continue on item-level validation errors"`
}

CustomersCopyCmd copies customers between sites.

func (*CustomersCopyCmd) Run

func (c *CustomersCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes customers copy.

type CustomersCountCmd

type CustomersCountCmd struct {
	CountQueryFlags `embed:""`
}

CustomersCountCmd gets customer count.

func (*CustomersCountCmd) Run

func (c *CustomersCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type CustomersCreateCmd

type CustomersCreateCmd struct {
	File        string   `help:"Read customer JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. email=a@b.com, first_name=Ana)"`
}

CustomersCreateCmd creates a customer.

func (*CustomersCreateCmd) Run

func (c *CustomersCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type CustomersDeleteCmd

type CustomersDeleteCmd struct {
	Customer string `required:"" help:"Customer ID or email"`
}

CustomersDeleteCmd deletes a customer.

func (*CustomersDeleteCmd) Run

func (c *CustomersDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type CustomersFieldsCmd

type CustomersFieldsCmd struct{}

CustomersFieldsCmd shows the customer field schema.

func (*CustomersFieldsCmd) Run

func (c *CustomersFieldsCmd) Run(ctx context.Context, flags *RootFlags) error

type CustomersGetCmd

type CustomersGetCmd struct {
	Customer string `required:"" help:"Customer ID or email"`
}

CustomersGetCmd gets a customer by ID or email.

func (*CustomersGetCmd) Run

func (c *CustomersGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type CustomersListCmd

type CustomersListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

CustomersListCmd lists customers.

func (*CustomersListCmd) Run

func (c *CustomersListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type CustomersResendConfirmationCmd added in v0.1.4

type CustomersResendConfirmationCmd struct {
	Customer string `required:"" help:"Customer ID or email"`
}

func (*CustomersResendConfirmationCmd) Run added in v0.1.4

type CustomersResetPasswordCmd added in v0.1.4

type CustomersResetPasswordCmd struct {
	Customer string `required:"" help:"Customer ID or email"`
}

func (*CustomersResetPasswordCmd) Run added in v0.1.4

type CustomersUpdateCmd

type CustomersUpdateCmd struct {
	Customer    string   `required:"" help:"Customer ID or email"`
	File        string   `help:"Read customer JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. first_name=Ana, phone=+32...)"`
}

CustomersUpdateCmd updates a customer.

func (*CustomersUpdateCmd) Run

func (c *CustomersUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type DomainRegistrationsCmd added in v0.3.0

type DomainRegistrationsCmd struct {
	List   DomainRegistrationsListCmd   `cmd:"" help:"List domain registrations"`
	Get    DomainRegistrationsGetCmd    `cmd:"" help:"Get a domain registration"`
	Count  DomainRegistrationsCountCmd  `cmd:"" help:"Count domain registrations"`
	Upsert DomainRegistrationsUpsertCmd `cmd:"" help:"Upsert registrar-managed facts by domain"`
	Update DomainRegistrationsUpdateCmd `cmd:"" help:"Update commercial fields by domain"`
}

type DomainRegistrationsCountCmd added in v0.3.0

type DomainRegistrationsCountCmd struct {
	CountQueryFlags `embed:""`
}

func (*DomainRegistrationsCountCmd) Run added in v0.3.0

type DomainRegistrationsGetCmd added in v0.3.0

type DomainRegistrationsGetCmd struct {
	ID string `required:"" help:"Domain registration short ID"`
}

func (*DomainRegistrationsGetCmd) Run added in v0.3.0

type DomainRegistrationsListCmd added in v0.3.0

type DomainRegistrationsListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `default:"1" help:"Page number"`
	PerPage    int  `default:"25" help:"Items per page"`
}

func (*DomainRegistrationsListCmd) Run added in v0.3.0

type DomainRegistrationsUpdateCmd added in v0.3.0

type DomainRegistrationsUpdateCmd struct {
	File        string   `help:"Read JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline commercial field assignments"`
}

func (*DomainRegistrationsUpdateCmd) Run added in v0.3.0

type DomainRegistrationsUpsertCmd added in v0.3.0

type DomainRegistrationsUpsertCmd struct {
	File        string   `help:"Read JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline registrar fact assignments"`
}

func (*DomainRegistrationsUpsertCmd) Run added in v0.3.0

type DomainsCmd added in v0.1.4

type DomainsCmd struct {
	List        DomainsListCmd        `cmd:"" help:"List domains"`
	Get         DomainsGetCmd         `cmd:"" help:"Get domain details"`
	Create      DomainsCreateCmd      `cmd:"" help:"Create a domain"`
	Update      DomainsUpdateCmd      `cmd:"" help:"Update a domain"`
	Delete      DomainsDeleteCmd      `cmd:"" help:"Delete a domain"`
	MakePrimary DomainsMakePrimaryCmd `cmd:"" help:"Make a domain primary"`
}

DomainsCmd manages custom domains.

type DomainsCreateCmd added in v0.1.4

type DomainsCreateCmd struct {
	Domain      string   `required:"" help:"Hostname"`
	File        string   `help:"Read domain JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. redirect_domain=www.example.com, default_locale=nl)"`
}

func (*DomainsCreateCmd) Run added in v0.1.4

func (c *DomainsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type DomainsDeleteCmd added in v0.1.4

type DomainsDeleteCmd struct {
	Domain string `required:"" help:"Domain ID or hostname"`
}

func (*DomainsDeleteCmd) Run added in v0.1.4

func (c *DomainsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

type DomainsGetCmd added in v0.1.4

type DomainsGetCmd struct {
	Domain string `required:"" help:"Domain ID or hostname"`
}

func (*DomainsGetCmd) Run added in v0.1.4

func (c *DomainsGetCmd) Run(ctx context.Context, flags *RootFlags) error

type DomainsListCmd added in v0.1.4

type DomainsListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

func (*DomainsListCmd) Run added in v0.1.4

func (c *DomainsListCmd) Run(ctx context.Context, flags *RootFlags) error

type DomainsMakePrimaryCmd added in v0.1.4

type DomainsMakePrimaryCmd struct {
	Domain string `required:"" help:"Domain ID or hostname"`
}

func (*DomainsMakePrimaryCmd) Run added in v0.1.4

func (c *DomainsMakePrimaryCmd) Run(ctx context.Context, flags *RootFlags) error

type DomainsUpdateCmd added in v0.1.4

type DomainsUpdateCmd struct {
	Domain      string   `required:"" help:"Domain ID or hostname"`
	File        string   `help:"Read domain JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. redirect_domain=www.example.com, default_locale=nl)"`
}

func (*DomainsUpdateCmd) Run added in v0.1.4

func (c *DomainsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

type EnvAddCmd added in v0.3.3

type EnvAddCmd struct {
	Name      string `arg:"" required:"" help:"Environment name"`
	Host      string `required:"" help:"API host"`
	Protected bool   `help:"Require confirmation for schema apply and release"`
}

func (*EnvAddCmd) Run added in v0.3.3

func (c *EnvAddCmd) Run(ctx context.Context, flags *RootFlags) error

type EnvCmd added in v0.3.3

type EnvCmd struct {
	List   EnvListCmd   `cmd:"" help:"List project environments"`
	Add    EnvAddCmd    `cmd:"" help:"Add a project environment"`
	Remove EnvRemoveCmd `cmd:"" help:"Remove a project environment"`
}

type EnvListCmd added in v0.3.3

type EnvListCmd struct{}

func (*EnvListCmd) Run added in v0.3.3

func (c *EnvListCmd) Run(ctx context.Context) error

type EnvRemoveCmd added in v0.3.3

type EnvRemoveCmd struct {
	Name string `arg:"" required:"" help:"Environment name"`
}

func (*EnvRemoveCmd) Run added in v0.3.3

func (c *EnvRemoveCmd) Run(ctx context.Context, flags *RootFlags) error

type EventsCmd added in v0.3.0

type EventsCmd struct {
	Track  EventsTrackCmd  `cmd:"" help:"Track a single named event"`
	Ingest EventsIngestCmd `cmd:"" help:"Ingest Count.ly-compatible events and metrics"`
}

type EventsIngestCmd added in v0.3.0

type EventsIngestCmd struct {
	DeviceID        string `required:"" name:"device-id" help:"Analytics device identifier"`
	Events          string `help:"JSON array of events"`
	Metrics         string `help:"JSON metrics object"`
	Timestamp       string `help:"Unix timestamp"`
	BeginSession    bool   `name:"begin-session" help:"Mark the beginning of a session"`
	EndSession      bool   `name:"end-session" help:"Mark the end of a session"`
	SessionDuration string `name:"session-duration" help:"Session duration in seconds"`
}

func (*EventsIngestCmd) Run added in v0.3.0

func (c *EventsIngestCmd) Run(ctx context.Context) error

type EventsTrackCmd added in v0.3.0

type EventsTrackCmd struct {
	Event       string   `required:"" help:"Event name"`
	File        string   `help:"Read JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline event payload assignments"`
}

func (*EventsTrackCmd) Run added in v0.3.0

func (c *EventsTrackCmd) Run(ctx context.Context, flags *RootFlags) error

type ExitError

type ExitError struct {
	Code int
	Err  error
}

ExitError represents an error with a specific exit code.

func MapAPIError

func MapAPIError(err error) *ExitError

MapAPIError maps API errors to exit codes.

func (*ExitError) Error

func (e *ExitError) Error() string

func (*ExitError) Unwrap

func (e *ExitError) Unwrap() error

type FunctionsCmd

type FunctionsCmd struct {
	Run FunctionsRunCmd `cmd:"" help:"Execute cloud function"`
}

FunctionsCmd executes cloud functions.

type FunctionsRunCmd

type FunctionsRunCmd struct {
	Function    string   `help:"Function identifier"`
	File        string   `help:"Read function params JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. foo=bar, amount:=2)"`
}

FunctionsRunCmd executes a cloud function.

func (*FunctionsRunCmd) Run

func (c *FunctionsRunCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the run command.

type InitCmd

type InitCmd struct {
	Directory string `` /* 169-byte string literal not displayed */
	Repo      string `help:"GitHub repo shorthand for the starterskit" default:"zenjoy/theme-starterskit"`
	Branch    string `help:"Branch to bootstrap from" default:"main"`
	Dir       string `help:"Use a local starterskit directory instead of cloning"`
	OutputDir string `help:"Parent directory for the new project"`
}

func (*InitCmd) Run

func (c *InitCmd) Run(ctx context.Context, flags *RootFlags) error

type InternalCompleteCmd added in v0.1.14

type InternalCompleteCmd struct {
	Shell        string   `help:"Shell requesting completions" default:"bash"`
	Current      string   `help:"Current token being completed"`
	FlagNames    bool     `help:"Complete flag names" hidden:""`
	CommandNames bool     `help:"Complete command names" hidden:""`
	Words        []string `arg:"" optional:"" passthrough:""`
}

func (*InternalCompleteCmd) Run added in v0.1.14

type JobsCmd

type JobsCmd struct {
	Run  JobsRunCmd  `cmd:"" help:"Schedule cloud job"`
	List JobsListCmd `cmd:"" help:"List jobs registered on the server"`
}

JobsCmd executes cloud jobs.

type JobsListCmd added in v0.2.6

type JobsListCmd struct {
	App string `help:"Only jobs from this app (key or name)"`
}

JobsListCmd lists the cloud jobs the server knows about, across all apps.

func (*JobsListCmd) Run added in v0.2.6

func (c *JobsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type JobsRunCmd

type JobsRunCmd struct {
	Job         string   `help:"Job identifier"`
	File        string   `help:"Read job params JSON from file (use - for stdin)"`
	Wait        bool     `help:"After scheduling, tail the job's cloud-code logs until interrupted"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. foo=bar, retry:=true)"`
}

JobsRunCmd schedules a cloud job.

func (*JobsRunCmd) Run

func (c *JobsRunCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the run command.

type MailsCmd

type MailsCmd struct {
	Pull NotificationsPullCmd `cmd:"" help:"Download notification templates"`
	Push NotificationsPushCmd `cmd:"" help:"Upload notification templates"`
}

MailsCmd exposes legacy mail workflow aliases.

type MenusCmd struct {
	List   MenusListCmd   `cmd:"" help:"List menus"`
	Get    MenusGetCmd    `cmd:"" help:"Get menu details"`
	Create MenusCreateCmd `cmd:"" help:"Create menu from JSON"`
	Update MenusUpdateCmd `cmd:"" help:"Update menu"`
	Delete MenusDeleteCmd `cmd:"" help:"Delete menu"`
	Count  MenusCountCmd  `cmd:"" help:"Count menus"`
	Copy   MenusCopyCmd   `cmd:"" help:"Copy menus between sites"`
}

MenusCmd manages navigation menus.

type MenusCopyCmd struct {
	Slug     string `help:"Menu slug to copy" default:"*" name:"only"`
	From     string `help:"Source site" required:"" name:"from"`
	To       string `help:"Target site" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
}

MenusCopyCmd copies menus between sites.

func (c *MenusCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes menus copy.

type MenusCountCmd struct {
	CountQueryFlags `embed:""`
}

MenusCountCmd gets menu count.

func (c *MenusCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type MenusCreateCmd struct {
	Locale      string   `help:"Content locale for localized menu fields"`
	File        string   `help:"Read menu JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=Main, handle=main)"`
}

MenusCreateCmd creates a menu.

func (c *MenusCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type MenusDeleteCmd struct {
	Menu string `required:"" help:"Menu ID or handle"`
}

MenusDeleteCmd deletes a menu.

func (c *MenusDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type MenusGetCmd struct {
	Menu   string `required:"" help:"Menu slug or handle"`
	Locale string `help:"Content locale for localized menu fields"`
}

MenusGetCmd gets menu details.

func (c *MenusGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type MenusListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

MenusListCmd lists menus.

func (c *MenusListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type MenusUpdateCmd struct {
	Menu        string   `required:"" help:"Menu slug or handle"`
	Locale      string   `help:"Content locale for localized menu fields"`
	File        string   `help:"Read menu JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=Main, handle=main)"`
}

MenusUpdateCmd updates a menu.

func (c *MenusUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type NotificationsCmd

type NotificationsCmd struct {
	List   NotificationsListCmd   `cmd:"" help:"List notifications"`
	Get    NotificationsGetCmd    `cmd:"" help:"Get notification details"`
	Pull   NotificationsPullCmd   `cmd:"" help:"Download notification templates"`
	Push   NotificationsPushCmd   `cmd:"" help:"Upload notification templates"`
	Create NotificationsCreateCmd `cmd:"" help:"Create notification from JSON"`
	Update NotificationsUpdateCmd `cmd:"" help:"Update notification"`
	Delete NotificationsDeleteCmd `cmd:"" help:"Delete notification"`
	Count  NotificationsCountCmd  `cmd:"" help:"Count notifications"`
	Copy   NotificationsCopyCmd   `cmd:"" help:"Copy notifications between sites"`
}

NotificationsCmd manages notifications.

type NotificationsCopyCmd

type NotificationsCopyCmd struct {
	Slug     string `help:"Notification slug to copy" default:"*" name:"only"`
	From     string `help:"Source site" required:"" name:"from"`
	To       string `help:"Target site" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
}

NotificationsCopyCmd copies notifications between sites.

func (*NotificationsCopyCmd) Run

func (c *NotificationsCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes notifications copy.

type NotificationsCountCmd

type NotificationsCountCmd struct {
	CountQueryFlags `embed:""`
}

NotificationsCountCmd gets count of notifications.

func (*NotificationsCountCmd) Run

func (c *NotificationsCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type NotificationsCreateCmd

type NotificationsCreateCmd struct {
	Locale      string   `help:"Content locale for localized notification fields"`
	File        string   `help:"Read notification JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. slug=order_created, subject=Hello)"`
}

NotificationsCreateCmd creates a notification.

func (*NotificationsCreateCmd) Run

Run executes the create command.

type NotificationsDeleteCmd

type NotificationsDeleteCmd struct {
	Notification string `required:"" help:"Notification slug or identifier"`
}

NotificationsDeleteCmd deletes a notification.

func (*NotificationsDeleteCmd) Run

Run executes the delete command.

type NotificationsGetCmd

type NotificationsGetCmd struct {
	Notification string `required:"" help:"Notification slug or identifier"`
	Locale       string `help:"Content locale for localized notification fields"`
}

NotificationsGetCmd gets a notification by slug.

func (*NotificationsGetCmd) Run

func (c *NotificationsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type NotificationsListCmd

type NotificationsListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

NotificationsListCmd lists notifications.

func (*NotificationsListCmd) Run

func (c *NotificationsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type NotificationsPullCmd

type NotificationsPullCmd struct {
	Only []string `help:"Only these notification slugs" name:"only"`
}

NotificationsPullCmd downloads notifications into content/notifications.

func (*NotificationsPullCmd) Run

func (c *NotificationsPullCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes notifications pull.

type NotificationsPushCmd

type NotificationsPushCmd struct {
	Only []string `help:"Notification slugs to push" short:"o"`
}

NotificationsPushCmd uploads local notifications from disk.

func (*NotificationsPushCmd) Run

func (c *NotificationsPushCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes notifications push.

type NotificationsUpdateCmd

type NotificationsUpdateCmd struct {
	Notification string   `required:"" help:"Notification slug or identifier"`
	Locale       string   `help:"Content locale for localized notification fields"`
	File         string   `help:"Read notification JSON from file (use - for stdin)"`
	Assignments  []string `arg:"" optional:"" help:"Inline assignments (e.g. subject=Hello, html_enabled:=true)"`
}

NotificationsUpdateCmd updates a notification.

func (*NotificationsUpdateCmd) Run

Run executes the update command.

type OrdersArchiveCmd added in v0.1.4

type OrdersArchiveCmd struct {
	Order string `required:"" help:"Order ID or number"`
}

func (*OrdersArchiveCmd) Run added in v0.1.4

func (c *OrdersArchiveCmd) Run(ctx context.Context, flags *RootFlags) error

type OrdersCancelCmd added in v0.1.4

type OrdersCancelCmd struct {
	Order        string `required:"" help:"Order ID or number"`
	Notify       bool   `help:"Send notification" default:"true"`
	CancelReason string `name:"reason" help:"Cancel reason"`
}

func (*OrdersCancelCmd) Run added in v0.1.4

func (c *OrdersCancelCmd) Run(ctx context.Context, flags *RootFlags) error

type OrdersCmd

type OrdersCmd struct {
	List    OrdersListCmd    `cmd:"" help:"List orders"`
	Get     OrdersGetCmd     `cmd:"" help:"Get order by ID or number"`
	Update  OrdersUpdateCmd  `cmd:"" help:"Update order (status changes)"`
	Count   OrdersCountCmd   `cmd:"" help:"Count orders"`
	Pay     OrdersPayCmd     `cmd:"" help:"Record manual payment for an order"`
	Finish  OrdersFinishCmd  `cmd:"" help:"Finish a paid order"`
	Cancel  OrdersCancelCmd  `cmd:"" help:"Cancel a completed order"`
	Reopen  OrdersReopenCmd  `cmd:"" help:"Reopen a done or canceled order"`
	Archive OrdersArchiveCmd `cmd:"" help:"Archive a done or canceled order"`
}

OrdersCmd manages orders.

type OrdersCountCmd

type OrdersCountCmd struct {
	CountQueryFlags `embed:""`
	Status          string `help:"Filter by status"`
}

OrdersCountCmd counts orders.

func (*OrdersCountCmd) Run

func (c *OrdersCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type OrdersFinishCmd added in v0.1.4

type OrdersFinishCmd struct {
	Order  string `required:"" help:"Order ID or number"`
	Notify bool   `help:"Send notification" default:"true"`
}

func (*OrdersFinishCmd) Run added in v0.1.4

func (c *OrdersFinishCmd) Run(ctx context.Context, flags *RootFlags) error

type OrdersGetCmd

type OrdersGetCmd struct {
	Order string `required:"" help:"Order ID or number"`
}

OrdersGetCmd gets an order by ID or number.

func (*OrdersGetCmd) Run

func (c *OrdersGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type OrdersListCmd

type OrdersListCmd struct {
	QueryFlags `embed:""`
	Status     string `help:"Filter by status"`
	All        bool   `help:"Fetch all pages"`
	Page       int    `help:"Page number" default:"1"`
	PerPage    int    `help:"Items per page" default:"25"`
}

OrdersListCmd lists orders.

func (*OrdersListCmd) Run

func (c *OrdersListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type OrdersPayCmd added in v0.1.4

type OrdersPayCmd struct {
	Order string `required:"" help:"Order ID or number"`
}

func (*OrdersPayCmd) Run added in v0.1.4

func (c *OrdersPayCmd) Run(ctx context.Context, flags *RootFlags) error

type OrdersReopenCmd added in v0.1.4

type OrdersReopenCmd struct {
	Order string `required:"" help:"Order ID or number"`
}

func (*OrdersReopenCmd) Run added in v0.1.4

func (c *OrdersReopenCmd) Run(ctx context.Context, flags *RootFlags) error

type OrdersUpdateCmd

type OrdersUpdateCmd struct {
	Order       string   `required:"" help:"Order ID or number"`
	Status      string   `help:"Set order status"`
	File        string   `help:"Read order JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. status=paid, note=Done)"`
}

OrdersUpdateCmd updates an order.

func (*OrdersUpdateCmd) Run

func (c *OrdersUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type PageVersionsCmd added in v0.3.0

type PageVersionsCmd struct {
	List    PageVersionsListCmd    `cmd:"" help:"List page versions"`
	Get     PageVersionsGetCmd     `cmd:"" help:"Get a page version"`
	Restore PageVersionsRestoreCmd `cmd:"" help:"Restore a page version"`
}

type PageVersionsGetCmd added in v0.3.0

type PageVersionsGetCmd struct {
	Page    string `required:"" help:"Page ID or path"`
	Version string `required:"" name:"page-version" help:"Page version ID"`
}

func (*PageVersionsGetCmd) Run added in v0.3.0

type PageVersionsListCmd added in v0.3.0

type PageVersionsListCmd struct {
	Page string `required:"" help:"Page ID or path"`
}

func (*PageVersionsListCmd) Run added in v0.3.0

type PageVersionsRestoreCmd added in v0.3.0

type PageVersionsRestoreCmd struct {
	Page    string `required:"" help:"Page ID or path"`
	Version string `required:"" name:"page-version" help:"Page version ID"`
}

func (*PageVersionsRestoreCmd) Run added in v0.3.0

type PagesBatchCmd added in v0.3.1

type PagesBatchCmd struct {
	Page   string `required:"" help:"Page fullpath or id"`
	File   string `required:"" help:"JSON operations object or array"`
	Atomic bool   `default:"true" negatable:"" help:"Fail the whole batch if any operation fails"`
	Locale string `help:"Content locale for localized fields"`
	Diff   bool   `help:"Show a unified diff of each changed subtree"`
	DryRun bool   `help:"Resolve paths and print the operations without writing"`
	Draft  bool   `help:"Write to the page draft instead of the live page"`
}

PagesBatchCmd applies multiple page operations from a file.

func (*PagesBatchCmd) Help added in v0.3.2

func (c *PagesBatchCmd) Help() string

func (*PagesBatchCmd) Run added in v0.3.1

func (c *PagesBatchCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes pages batch.

type PagesCmd

type PagesCmd struct {
	List        PagesListCmd        `cmd:"" help:"List pages"`
	Get         PagesGetCmd         `cmd:"" help:"Get page details"`
	Create      PagesCreateCmd      `cmd:"" help:"Create page from JSON"`
	Update      PagesUpdateCmd      `cmd:"" help:"Update page"`
	Delete      PagesDeleteCmd      `cmd:"" help:"Delete page"`
	Set         PagesSetCmd         `cmd:"" help:"Set one page field or editable by path"`
	Insert      PagesInsertCmd      `cmd:"" help:"Insert a repeatable into a canvas"`
	DeleteBlock PagesDeleteBlockCmd `cmd:"" name:"delete-block" help:"Delete a repeatable block"`
	Move        PagesMoveCmd        `cmd:"" help:"Move a repeatable within its canvas"`
	Batch       PagesBatchCmd       `cmd:"" help:"Apply multiple page operations from a file"`
	Draft       PagesDraftCmd       `cmd:"" help:"Work on page drafts (edit and preview without publishing)"`
	Items       PagesItemsCmd       `cmd:"" help:"Get a resolved items subtree"`
	Schema      PagesSchemaCmd      `cmd:"" help:"Show the page template schema"`
	Count       PagesCountCmd       `cmd:"" help:"Count pages"`
	Copy        PagesCopyCmd        `cmd:"" help:"Copy pages between sites"`
	Versions    PageVersionsCmd     `cmd:"" help:"Manage page versions"`
}

PagesCmd manages pages.

type PagesCopyCmd

type PagesCopyCmd struct {
	Fullpath    string `help:"Page fullpath or prefix* to copy" default:"*" name:"only"`
	From        string `help:"Source site" required:"" name:"from"`
	To          string `help:"Target site" required:"" name:"to"`
	FromHost    string `help:"Source API base URL or host" name:"from-host"`
	ToHost      string `help:"Target API base URL or host" name:"to-host"`
	AllowErrors bool   `help:"Continue on page-level errors" name:"allow-errors"`
}

PagesCopyCmd copies pages between sites.

func (*PagesCopyCmd) Run

func (c *PagesCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes pages copy.

type PagesCountCmd

type PagesCountCmd struct {
	CountQueryFlags `embed:""`
}

PagesCountCmd gets page count.

func (*PagesCountCmd) Run

func (c *PagesCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type PagesCreateCmd

type PagesCreateCmd struct {
	Locale      string   `help:"Content locale for localized page fields"`
	File        string   `help:"Read page JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. slug=about, title=About)"`
}

PagesCreateCmd creates a page.

func (*PagesCreateCmd) Help added in v0.3.1

func (c *PagesCreateCmd) Help() string

func (*PagesCreateCmd) Run

func (c *PagesCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type PagesDeleteBlockCmd added in v0.3.1

type PagesDeleteBlockCmd struct {
	Page   string `required:"" help:"Page fullpath or id"`
	Path   string `required:"" help:"Repeatable path to delete"`
	Diff   bool   `help:"Show a unified diff of the canvas repeatables"`
	DryRun bool   `help:"Resolve paths and print the operations without writing"`
	Draft  bool   `help:"Write to the page draft instead of the live page"`
}

PagesDeleteBlockCmd deletes a repeatable block.

func (*PagesDeleteBlockCmd) Run added in v0.3.1

func (c *PagesDeleteBlockCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes pages delete-block.

type PagesDeleteCmd

type PagesDeleteCmd struct {
	Page string `required:"" help:"Page ID or slug"`
}

PagesDeleteCmd deletes a page.

func (*PagesDeleteCmd) Run

func (c *PagesDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type PagesDraftBatchCmd added in v0.3.1

type PagesDraftBatchCmd struct {
	Page   string `required:"" help:"Page fullpath or id"`
	File   string `required:"" help:"JSON operations object or array"`
	Locale string `help:"Content locale for localized fields"`
	Diff   bool   `help:"Show a unified diff of each changed subtree"`
	DryRun bool   `help:"Resolve paths and print the operations without writing"`
}

PagesDraftBatchCmd is an alias for pages batch --draft.

func (*PagesDraftBatchCmd) Run added in v0.3.1

func (c *PagesDraftBatchCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes pages draft batch.

type PagesDraftCmd added in v0.3.1

type PagesDraftCmd struct {
	Get        PagesDraftGetCmd        `cmd:"" help:"Get the current page draft"`
	Save       PagesDraftSaveCmd       `cmd:"" help:"Save a whole page draft from a file"`
	Batch      PagesDraftBatchCmd      `cmd:"" help:"Apply operations to the page draft"`
	Publish    PagesDraftPublishCmd    `cmd:"" help:"Publish a page draft to the live page"`
	Discard    PagesDraftDiscardCmd    `cmd:"" help:"Discard a page draft"`
	PreviewURL PagesDraftPreviewURLCmd `cmd:"" name:"preview-url" help:"Print a preview URL for the page draft"`
}

PagesDraftCmd groups page draft subcommands.

type PagesDraftDiscardCmd added in v0.3.1

type PagesDraftDiscardCmd struct {
	Page string `required:"" help:"Page fullpath or id"`
}

PagesDraftDiscardCmd deletes the current page draft.

func (*PagesDraftDiscardCmd) Run added in v0.3.1

func (c *PagesDraftDiscardCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes pages draft discard.

type PagesDraftGetCmd added in v0.3.1

type PagesDraftGetCmd struct {
	Page   string `required:"" help:"Page fullpath or id"`
	Locale string `help:"Content locale for localized fields"`
	Shape  bool   `help:"Emit canvas/repeatable skeleton instead of content"`
	Raw    bool   `help:"Emit the raw draft envelope (content.page_items) instead of the page document"`
}

PagesDraftGetCmd fetches GET /pages/{id}/draft.

func (*PagesDraftGetCmd) Run added in v0.3.1

func (c *PagesDraftGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes pages draft get.

type PagesDraftPreviewURLCmd added in v0.3.1

type PagesDraftPreviewURLCmd struct {
	Page string `required:"" help:"Page fullpath or id"`
	Open bool   `help:"Open the preview URL in the browser"`
}

PagesDraftPreviewURLCmd prints an absolute draft preview URL.

func (*PagesDraftPreviewURLCmd) Run added in v0.3.1

Run executes pages draft preview-url.

type PagesDraftPublishCmd added in v0.3.1

type PagesDraftPublishCmd struct {
	Page    string `required:"" help:"Page fullpath or id"`
	Confirm bool   `help:"Replace live content when the live page changed after this draft was based on it"`
}

PagesDraftPublishCmd publishes a draft to the live page.

func (*PagesDraftPublishCmd) Run added in v0.3.1

func (c *PagesDraftPublishCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes pages draft publish.

type PagesDraftSaveCmd added in v0.3.1

type PagesDraftSaveCmd struct {
	Page   string `required:"" help:"Page fullpath or id"`
	File   string `required:"" help:"Draft JSON file (use - for stdin)"`
	Locale string `help:"Content locale for localized fields"`
}

PagesDraftSaveCmd posts a page-like body to /pages/{id}/draft.

func (*PagesDraftSaveCmd) Run added in v0.3.1

func (c *PagesDraftSaveCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes pages draft save.

type PagesGetCmd

type PagesGetCmd struct {
	QueryFlags     `embed:""`
	DownloadAssets string `help:"Download page file editables into DIR and rewrite JSON to attachment_path refs"`
	Shape          bool   `help:"Emit canvas/repeatable skeleton instead of content"`
	Outline        bool   `help:"Emit one compact line per editable (paths usable with pages set --path)"`
	Compact        bool   `help:"JSON only: drop editable timestamps/slug/type, redundant translations, and file noise"`
	Draft          bool   `help:"Read the page draft instead of the live page (works with --shape, --outline, --compact)"`
	Page           string `required:"" help:"Page fullpath"`
}

PagesGetCmd gets page details.

func (*PagesGetCmd) Run

func (c *PagesGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type PagesInsertCmd added in v0.3.1

type PagesInsertCmd struct {
	Page     string `required:"" help:"Page fullpath or id"`
	Path     string `required:"" help:"Canvas path (Blokken, /items/Blokken, or /items/Blokken/repeatables)"`
	Slug     string `help:"Repeatable slug to insert"`
	After    string `help:"Place after this sibling id or 0-based index" xor:"insert-at"`
	Position *int   `help:"0-based insert index" xor:"insert-at"`
	File     string `help:"JSON items map, or {slug, items} object"`
	Locale   string `help:"Content locale for localized fields"`
	Diff     bool   `help:"Show a unified diff of the canvas repeatables"`
	DryRun   bool   `help:"Resolve paths and print the operations without writing"`
	Draft    bool   `help:"Write to the page draft instead of the live page"`
}

PagesInsertCmd inserts a repeatable into a canvas.

func (*PagesInsertCmd) Run added in v0.3.1

func (c *PagesInsertCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes pages insert.

type PagesItemsCmd added in v0.3.1

type PagesItemsCmd struct {
	Page   string `required:"" help:"Page fullpath or id"`
	Path   string `required:"" help:"Human or raw path under /items"`
	Locale string `help:"Content locale; overlays translations for display"`
}

PagesItemsCmd gets a resolved items subtree.

func (*PagesItemsCmd) Run added in v0.3.1

func (c *PagesItemsCmd) Run(ctx context.Context) error

Run executes pages items.

type PagesListCmd

type PagesListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

PagesListCmd lists pages.

func (*PagesListCmd) Run

func (c *PagesListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type PagesMoveCmd added in v0.3.1

type PagesMoveCmd struct {
	Page     string `required:"" help:"Page fullpath or id"`
	Path     string `required:"" help:"Repeatable path to move"`
	After    string `help:"Place after this sibling id or 0-based index" xor:"move-at"`
	Position *int   `help:"0-based target index" xor:"move-at"`
	Diff     bool   `help:"Show a unified diff of the canvas repeatables"`
	DryRun   bool   `help:"Resolve paths and print the operations without writing"`
	Draft    bool   `help:"Write to the page draft instead of the live page"`
}

PagesMoveCmd moves a repeatable within its canvas.

func (*PagesMoveCmd) Run added in v0.3.1

func (c *PagesMoveCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes pages move.

type PagesSchemaCmd added in v0.3.1

type PagesSchemaCmd struct {
	Page string `required:"" help:"Page fullpath or id"`
}

PagesSchemaCmd shows the page template schema.

func (*PagesSchemaCmd) Run added in v0.3.1

func (c *PagesSchemaCmd) Run(ctx context.Context) error

Run executes pages schema.

type PagesSetCmd added in v0.3.1

type PagesSetCmd struct {
	Page     string `required:"" help:"Page fullpath or id"`
	Path     string `required:"" help:"Human or raw path to the field or editable"`
	Value    string `arg:"" optional:"" xor:"set-source" help:"Literal value to set"`
	File     string `help:"JSON value from file (use - for stdin)" xor:"set-source"`
	FromFile string `name:"from-file" help:"Local file to upload as a file editable" xor:"set-source"`
	Locale   string `help:"Content locale for localized fields"`
	Diff     bool   `help:"Show a unified diff of the changed subtree"`
	DryRun   bool   `help:"Resolve paths and print the operations without writing"`
	Draft    bool   `help:"Write to the page draft instead of the live page"`
}

PagesSetCmd sets one page field or editable by path.

func (*PagesSetCmd) Run added in v0.3.1

func (c *PagesSetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes pages set.

type PagesUpdateCmd

type PagesUpdateCmd struct {
	QueryFlags       `embed:""`
	Page             string   `required:"" help:"Page fullpath"`
	File             string   `help:"Read page JSON from file (use - for stdin)"`
	Replace          bool     `help:"Replace canvases entirely (destructive rebuild)"`
	AllowEmptyCanvas bool     `help:"Allow emptying a canvas"`
	AllowEmptyFile   bool     `help:"Allow file editables with no attachment or URL to clear assets"`
	DryRun           bool     `name:"dry-run" help:"Fetch, merge, and print the PATCH body without sending it"`
	Assignments      []string `arg:"" optional:"" help:"Inline assignments (e.g. title=About, published:=true)"`
}

PagesUpdateCmd updates a page.

func (*PagesUpdateCmd) Help added in v0.3.1

func (c *PagesUpdateCmd) Help() string

func (*PagesUpdateCmd) Run

func (c *PagesUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type ProductAttachmentsCmd added in v0.3.0

type ProductAttachmentsCmd struct {
	List     ProductAttachmentsListCmd     `cmd:"" help:"List product attachments"`
	Get      ProductAttachmentsGetCmd      `cmd:"" help:"Get a product attachment"`
	Create   ProductAttachmentsCreateCmd   `cmd:"" help:"Create a product attachment"`
	Update   ProductAttachmentsUpdateCmd   `cmd:"" help:"Update a product attachment"`
	Delete   ProductAttachmentsDeleteCmd   `cmd:"" help:"Delete a product attachment (requires --force)"`
	Download ProductAttachmentsDownloadCmd `cmd:"" help:"Download a product attachment"`
}

type ProductAttachmentsCreateCmd added in v0.3.0

type ProductAttachmentsCreateCmd struct {
	Product     string   `required:"" help:"Product ID or slug"`
	File        string   `help:"Read JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline attachment field assignments"`
}

func (*ProductAttachmentsCreateCmd) Run added in v0.3.0

type ProductAttachmentsDeleteCmd added in v0.3.0

type ProductAttachmentsDeleteCmd struct {
	Product    string `required:"" help:"Product ID or slug"`
	Attachment string `required:"" help:"Attachment ID"`
}

func (*ProductAttachmentsDeleteCmd) Run added in v0.3.0

type ProductAttachmentsDownloadCmd added in v0.3.0

type ProductAttachmentsDownloadCmd struct {
	Product    string `required:"" help:"Product ID or slug"`
	Attachment string `required:"" help:"Attachment ID"`
	Output     string `help:"Write the file to this path, or - for stdout" required:""`
}

func (*ProductAttachmentsDownloadCmd) Run added in v0.3.0

type ProductAttachmentsGetCmd added in v0.3.0

type ProductAttachmentsGetCmd struct {
	Product    string `required:"" help:"Product ID or slug"`
	Attachment string `required:"" help:"Attachment ID"`
}

func (*ProductAttachmentsGetCmd) Run added in v0.3.0

type ProductAttachmentsListCmd added in v0.3.0

type ProductAttachmentsListCmd struct {
	QueryFlags `embed:""`
	Product    string `required:"" help:"Product ID or slug"`
}

func (*ProductAttachmentsListCmd) Run added in v0.3.0

type ProductAttachmentsUpdateCmd added in v0.3.0

type ProductAttachmentsUpdateCmd struct {
	Product     string   `required:"" help:"Product ID or slug"`
	Attachment  string   `required:"" help:"Attachment ID"`
	File        string   `help:"Read JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline attachment field assignments"`
}

func (*ProductAttachmentsUpdateCmd) Run added in v0.3.0

type ProductsCmd

type ProductsCmd struct {
	List        ProductsListCmd       `cmd:"" help:"List products"`
	Get         ProductsGetCmd        `cmd:"" help:"Get product by ID or slug"`
	Create      ProductsCreateCmd     `cmd:"" help:"Create a product"`
	Update      ProductsUpdateCmd     `cmd:"" help:"Update a product"`
	Delete      ProductsDeleteCmd     `cmd:"" help:"Delete a product"`
	Count       ProductsCountCmd      `cmd:"" help:"Count products"`
	Fields      ProductsFieldsCmd     `cmd:"" help:"Show product field schema"`
	Config      ProductsConfigCmd     `cmd:"" help:"Copy or diff product customizations"`
	Copy        ProductsCopyCmd       `cmd:"" help:"Copy products between sites"`
	Attachments ProductAttachmentsCmd `cmd:"" help:"Manage product attachments"`
}

ProductsCmd manages products.

type ProductsConfigCmd

type ProductsConfigCmd struct {
	Copy   ProductsConfigCopyCmd `cmd:"" help:"Copy product customizations between sites"`
	Diff   ProductsConfigDiffCmd `cmd:"" help:"Diff product customizations between sites"`
	Fields ProductsFieldsCmd     `cmd:"" help:"Alias for products fields" hidden:""`
}

ProductsConfigCmd manages product customizations.

type ProductsConfigCopyCmd

type ProductsConfigCopyCmd struct {
	From     string `help:"Source site" required:"" name:"from"`
	To       string `help:"Target site" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
}

ProductsConfigCopyCmd copies product customizations.

func (*ProductsConfigCopyCmd) Run

func (c *ProductsConfigCopyCmd) Run(ctx context.Context, flags *RootFlags) error

type ProductsConfigDiffCmd

type ProductsConfigDiffCmd struct {
	From     string `help:"Source site" required:"" name:"from"`
	To       string `help:"Target site" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
}

ProductsConfigDiffCmd diffs product customizations.

func (*ProductsConfigDiffCmd) Run

func (c *ProductsConfigDiffCmd) Run(ctx context.Context, flags *RootFlags) error

type ProductsCopyCmd

type ProductsCopyCmd struct {
	From        string `help:"Source site" required:"" name:"from"`
	To          string `help:"Target site" required:"" name:"to"`
	FromHost    string `help:"Source API base URL or host" name:"from-host"`
	ToHost      string `help:"Target API base URL or host" name:"to-host"`
	AllowErrors bool   `name:"allow-errors" help:"Continue on item-level validation errors"`
}

ProductsCopyCmd copies products between sites.

func (*ProductsCopyCmd) Run

func (c *ProductsCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes products copy.

type ProductsCountCmd

type ProductsCountCmd struct {
	CountQueryFlags `embed:""`
}

ProductsCountCmd gets count of products.

func (*ProductsCountCmd) Run

func (c *ProductsCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type ProductsCreateCmd

type ProductsCreateCmd struct {
	Locale      string   `help:"Content locale for localized product fields"`
	File        string   `help:"Read product JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=Wine, price:=19.9)"`
}

ProductsCreateCmd creates a product.

func (*ProductsCreateCmd) Run

func (c *ProductsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type ProductsDeleteCmd

type ProductsDeleteCmd struct {
	Product string `required:"" help:"Product ID or slug"`
}

ProductsDeleteCmd deletes a product.

func (*ProductsDeleteCmd) Run

func (c *ProductsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type ProductsFieldsCmd

type ProductsFieldsCmd struct{}

ProductsFieldsCmd shows the product field schema.

func (*ProductsFieldsCmd) Run

func (c *ProductsFieldsCmd) Run(ctx context.Context, flags *RootFlags) error

type ProductsGetCmd

type ProductsGetCmd struct {
	Product string `required:"" help:"Product ID or slug"`
	Locale  string `help:"Content locale for localized product fields"`
}

ProductsGetCmd gets a product by ID or slug.

func (*ProductsGetCmd) Run

func (c *ProductsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type ProductsListCmd

type ProductsListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

ProductsListCmd lists products.

func (*ProductsListCmd) Run

func (c *ProductsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type ProductsUpdateCmd

type ProductsUpdateCmd struct {
	Product     string   `required:"" help:"Product ID or slug"`
	Locale      string   `help:"Content locale for localized product fields"`
	File        string   `help:"Read product JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=Wine, price:=19.9)"`
}

ProductsUpdateCmd updates a product.

func (*ProductsUpdateCmd) Run

func (c *ProductsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type QueryFlags added in v0.1.5

type QueryFlags struct {
	Fields  string   `help:"Comma-separated fields to return" group:"Query"`
	Locale  string   `help:"Locale filter; localized resources use it as content locale" group:"Query"`
	Include string   `help:"Include related resources" group:"Query"`
	Sort    string   `help:"Sort by field, e.g. field or field:desc" group:"Query"`
	Filters []string `help:"Filter by key=value, repeatable" group:"Query"`
}

QueryFlags contains flags for filtering/sorting API list responses. Embedded by commands that support query parameters.

type RealtimeCmd added in v0.3.3

type RealtimeCmd struct {
	Grant RealtimeGrantCmd `cmd:"" help:"Mint a single-use realtime grant"`
}

RealtimeCmd groups realtime (websocket) helpers.

type RealtimeGrantCmd added in v0.3.3

type RealtimeGrantCmd struct{}

RealtimeGrantCmd mints a single-use realtime grant.

func (*RealtimeGrantCmd) Run added in v0.3.3

func (c *RealtimeGrantCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the grant command.

type RedirectsCmd

type RedirectsCmd struct {
	List   RedirectsListCmd   `cmd:"" help:"List redirects"`
	Get    RedirectsGetCmd    `cmd:"" help:"Get redirect details"`
	Create RedirectsCreateCmd `cmd:"" help:"Create redirect from JSON"`
	Update RedirectsUpdateCmd `cmd:"" help:"Update redirect"`
	Delete RedirectsDeleteCmd `cmd:"" help:"Delete redirect"`
	Copy   RedirectsCopyCmd   `cmd:"" help:"Copy redirects between sites"`
}

RedirectsCmd manages redirects.

type RedirectsCopyCmd

type RedirectsCopyCmd struct {
	From     string `help:"Source site" required:"" name:"from"`
	To       string `help:"Target site" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
}

RedirectsCopyCmd copies redirects between sites.

func (*RedirectsCopyCmd) Run

func (c *RedirectsCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes redirects copy.

type RedirectsCreateCmd

type RedirectsCreateCmd struct {
	File        string   `help:"Read redirect JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. source=/old, target=/new)"`
}

RedirectsCreateCmd creates a redirect.

func (*RedirectsCreateCmd) Run

func (c *RedirectsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type RedirectsDeleteCmd

type RedirectsDeleteCmd struct {
	Redirect string `required:"" help:"Redirect ID"`
}

RedirectsDeleteCmd deletes a redirect.

func (*RedirectsDeleteCmd) Run

func (c *RedirectsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type RedirectsGetCmd

type RedirectsGetCmd struct {
	Redirect string `required:"" help:"Redirect ID"`
}

RedirectsGetCmd gets a redirect by ID.

func (*RedirectsGetCmd) Run

func (c *RedirectsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type RedirectsListCmd

type RedirectsListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

RedirectsListCmd lists redirects.

func (*RedirectsListCmd) Run

func (c *RedirectsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type RedirectsUpdateCmd

type RedirectsUpdateCmd struct {
	Redirect    string   `required:"" help:"Redirect ID"`
	File        string   `help:"Read redirect JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. source=/old, target=/new)"`
}

RedirectsUpdateCmd updates a redirect.

func (*RedirectsUpdateCmd) Run

func (c *RedirectsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type ReleaseCmd added in v0.3.3

type ReleaseCmd struct {
	Only       []string `help:"Release stages: schema,code,theme" name:"only"`
	DryRun     bool     `help:"Plan each selected stage without deploying" name:"dry-run"`
	AllowDirty bool     `help:"Allow uncommitted changes; mark the release dirty" name:"allow-dirty"`
	Yes        bool     `help:"Confirm protected environment deployment"`
}

ReleaseCmd deploys the checked-out project and records successful releases.

func (*ReleaseCmd) Run added in v0.3.3

func (c *ReleaseCmd) Run(ctx context.Context, flags *RootFlags) error

type ReleasesCmd added in v0.3.3

type ReleasesCmd struct{}

ReleasesCmd lists successful releases for the selected site.

func (*ReleasesCmd) Run added in v0.3.3

func (c *ReleasesCmd) Run(ctx context.Context, flags *RootFlags) error

type RolesCmd

type RolesCmd struct {
	List      RolesListCmd      `cmd:"" help:"List roles"`
	Get       RolesGetCmd       `cmd:"" help:"Get role details"`
	Create    RolesCreateCmd    `cmd:"" help:"Create role from JSON"`
	Update    RolesUpdateCmd    `` /* 133-byte string literal not displayed */
	Delete    RolesDeleteCmd    `cmd:"" help:"Delete role"`
	Copy      RolesCopyCmd      `cmd:"" help:"Copy roles between sites"`
	Customers RolesCustomersCmd `cmd:"" help:"Add, remove, or replace customers on a role"`
}

RolesCmd manages roles.

type RolesCopyCmd

type RolesCopyCmd struct {
	From     string `help:"Source site" required:"" name:"from"`
	To       string `help:"Target site" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
}

RolesCopyCmd copies customer roles between sites.

func (*RolesCopyCmd) Run

func (c *RolesCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes roles copy.

type RolesCreateCmd

type RolesCreateCmd struct {
	File        string   `help:"Read role JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=VIP)"`
}

RolesCreateCmd creates a role.

func (*RolesCreateCmd) Run

func (c *RolesCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type RolesCustomersAddCmd added in v0.3.1

type RolesCustomersAddCmd struct {
	Role      string   `required:"" help:"Role ID"`
	Customers []string `required:"" name:"customer" help:"Customer ID to add, repeatable"`
}

RolesCustomersAddCmd adds customers to a role.

func (*RolesCustomersAddCmd) Run added in v0.3.1

func (c *RolesCustomersAddCmd) Run(ctx context.Context, flags *RootFlags) error

type RolesCustomersCmd added in v0.3.1

type RolesCustomersCmd struct {
	Add    RolesCustomersAddCmd    `cmd:"" help:"Add customers to a role"`
	Remove RolesCustomersRemoveCmd `cmd:"" help:"Remove customers from a role"`
	Set    RolesCustomersSetCmd    `cmd:"" help:"Replace a role's customer list"`
}

RolesCustomersCmd edits the customers relation on a role.

type RolesCustomersRemoveCmd added in v0.3.1

type RolesCustomersRemoveCmd struct {
	Role      string   `required:"" help:"Role ID"`
	Customers []string `required:"" name:"customer" help:"Customer ID to remove, repeatable"`
}

RolesCustomersRemoveCmd removes customers from a role.

func (*RolesCustomersRemoveCmd) Run added in v0.3.1

type RolesCustomersSetCmd added in v0.3.1

type RolesCustomersSetCmd struct {
	Role      string   `required:"" help:"Role ID"`
	Customers []string `required:"" name:"customer" help:"Customer ID that should remain, repeatable"`
}

RolesCustomersSetCmd replaces the customers on a role.

func (*RolesCustomersSetCmd) Run added in v0.3.1

func (c *RolesCustomersSetCmd) Run(ctx context.Context, flags *RootFlags) error

type RolesDeleteCmd

type RolesDeleteCmd struct {
	Role string `required:"" help:"Role ID"`
}

RolesDeleteCmd deletes a role.

func (*RolesDeleteCmd) Run

func (c *RolesDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type RolesGetCmd

type RolesGetCmd struct {
	Role string `required:"" help:"Role ID"`
}

RolesGetCmd gets a role by ID.

func (*RolesGetCmd) Run

func (c *RolesGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type RolesListCmd

type RolesListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

RolesListCmd lists roles.

func (*RolesListCmd) Run

func (c *RolesListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type RolesUpdateCmd

type RolesUpdateCmd struct {
	Role        string   `required:"" help:"Role ID"`
	File        string   `help:"Read role JSON from file (use - for stdin)"`
	DryRun      bool     `name:"dry-run" help:"Print the request body and relation diff without writing"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=VIP)"`
}

RolesUpdateCmd updates a role.

Array fields (customers, children, parents) replace the whole relation. Server-side __op envelopes (AddReference/RemoveReference/Batch, plus AddRelation/RemoveRelation aliases) are sent verbatim.

func (*RolesUpdateCmd) Run

func (c *RolesUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type RootFlags

type RootFlags struct {
	Environment                  string `name:"env" help:"Named project environment (overrides site and API URL)"`
	SelectedEnvironmentProtected bool   `kong:"-"`
	// Essential (ungrouped — always visible in help)
	Site    string `help:"Site ID or subdomain, else nimbu.yml site" env:"NIMBU_SITE"`
	JSON    bool   `help:"Output JSON to stdout" default:"${json}" env:"NIMBU_JSON"`
	Plain   bool   `help:"Output stable TSV to stdout" default:"${plain}" env:"NIMBU_PLAIN"`
	Verbose bool   `help:"Enable verbose logging"`
	Debug   bool   `help:"Enable debug logging (HTTP traces)"`

	// Output (suppressed in default help)
	Color      string `help:"Color output: auto|always|never" default:"${color}" env:"NIMBU_COLOR" group:"Output"`
	NoProgress bool   `help:"Disable live progress UI" env:"NIMBU_NO_PROGRESS" group:"Output"`

	// Agent/CI (suppressed in default help)
	Force          bool   `help:"Skip confirmations for destructive operations" group:"Agent/CI"`
	NoInput        bool   `help:"Never prompt; fail instead (for CI)" env:"NIMBU_NO_INPUT" group:"Agent/CI"`
	Readonly       bool   `help:"Disable all write operations" env:"NIMBU_READONLY" group:"Agent/CI"`
	EnableCommands string `help:"Comma-separated allowlist of commands" env:"NIMBU_ENABLE_COMMANDS" group:"Agent/CI"`

	// Connection (suppressed in default help)
	APIURL  string        `help:"API base URL" default:"https://api.nimbu.io" env:"NIMBU_API_URL" group:"Connection"`
	Timeout time.Duration `help:"Request timeout" default:"30s" env:"NIMBU_TIMEOUT" group:"Connection"`
}

RootFlags contains global flags available to all commands.

type SchemaApplyCmd added in v0.3.3

type SchemaApplyCmd struct {
	DisableRenamePrompts bool         `kong:"-"`
	Plans                []schemaPlan `kong:"-"`
	Prune                bool         `help:"Remove fields and options absent from supplied arrays"`
	Yes                  bool         `help:"Confirm schema changes, including destructive changes"`
}

func (*SchemaApplyCmd) Run added in v0.3.3

func (c *SchemaApplyCmd) Run(ctx context.Context, flags *RootFlags) error

type SchemaCmd added in v0.3.3

type SchemaCmd struct {
	Pull  SchemaPullCmd  `cmd:"" help:"Pull live schemas into local files"`
	Plan  SchemaPlanCmd  `cmd:"" help:"Preview declarative schema changes"`
	Apply SchemaApplyCmd `cmd:"" help:"Apply declarative schema changes"`
}

type SchemaPlanCmd added in v0.3.3

type SchemaPlanCmd struct {
	Plans []schemaPlan `kong:"-"`
	Prune bool         `help:"Remove fields and options absent from supplied arrays"`
}

func (*SchemaPlanCmd) Run added in v0.3.3

func (c *SchemaPlanCmd) Run(ctx context.Context, flags *RootFlags) error

type SchemaPullCmd added in v0.3.3

type SchemaPullCmd struct {
	Only []string `name:"only" help:"Targets to pull, e.g. channels/events,products"`
}

SchemaPullCmd exports the site's declarative schemas.

func (*SchemaPullCmd) Run added in v0.3.3

func (c *SchemaPullCmd) Run(ctx context.Context, flags *RootFlags) error

type SendersCmd added in v0.1.4

type SendersCmd struct {
	List            SendersListCmd            `cmd:"" help:"List sender domains"`
	Get             SendersGetCmd             `cmd:"" help:"Get sender domain details"`
	Create          SendersCreateCmd          `cmd:"" help:"Create a sender domain"`
	VerifyOwnership SendersVerifyOwnershipCmd `cmd:"verify-ownership" help:"Verify sender domain ownership"`
	Verify          SendersVerifyCmd          `cmd:"" help:"Verify sender domain DNS"`
}

SendersCmd manages email sender domains.

type SendersCreateCmd added in v0.1.4

type SendersCreateCmd struct {
	Domain string `required:"" help:"Sender domain"`
}

func (*SendersCreateCmd) Run added in v0.1.4

func (c *SendersCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type SendersGetCmd added in v0.1.4

type SendersGetCmd struct {
	Sender string `required:"" help:"Sender ID or domain"`
}

func (*SendersGetCmd) Run added in v0.1.4

func (c *SendersGetCmd) Run(ctx context.Context, flags *RootFlags) error

type SendersListCmd added in v0.1.4

type SendersListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

func (*SendersListCmd) Run added in v0.1.4

func (c *SendersListCmd) Run(ctx context.Context, flags *RootFlags) error

type SendersVerifyCmd added in v0.1.4

type SendersVerifyCmd struct {
	Sender string `required:"" help:"Sender ID or domain"`
}

func (*SendersVerifyCmd) Run added in v0.1.4

func (c *SendersVerifyCmd) Run(ctx context.Context, flags *RootFlags) error

type SendersVerifyOwnershipCmd added in v0.1.4

type SendersVerifyOwnershipCmd struct {
	Sender string `required:"" help:"Sender ID or domain"`
}

func (*SendersVerifyOwnershipCmd) Run added in v0.1.4

type ServerCmd

type ServerCmd struct {
	Arg               []string      `help:"Child dev server arguments (repeatable)" name:"arg"`
	CMD               string        `help:"Override child dev server executable" name:"cmd"`
	CWD               string        `help:"Override child working directory"`
	Draft             []string      `` /* 221-byte string literal not displayed */
	EventsJSON        bool          `help:"Emit structured runtime events as JSON lines"`
	MaxBodyMB         int           `help:"Max request body size in MB for simulator proxy" default:"0"`
	NoWatch           bool          `help:"Disable filesystem watcher invalidation"`
	ProxyHost         string        `help:"Proxy host" default:""`
	ProxyPort         int           `help:"Proxy port" default:"0"`
	QuietRequests     bool          `help:"Disable per-request proxy log lines"`
	ReadyTimeout      time.Duration `help:"Child readiness timeout" default:"0s"`
	ReadyURL          string        `help:"Override child readiness URL"`
	TemplateRoot      string        `help:"Override template root directory"`
	WatchScanInterval time.Duration `help:"Fallback template scan interval" default:"0s"`
}

ServerCmd starts the local simulator proxy and child dev server.

func (*ServerCmd) Run

func (c *ServerCmd) Run(ctx context.Context, flags *RootFlags) error

type SettingsCmd added in v0.3.0

type SettingsCmd struct {
	Get     SettingsGetCmd     `cmd:"" help:"Get a settings section"`
	Update  SettingsUpdateCmd  `cmd:"" help:"Update a settings section"`
	Consent SettingsConsentCmd `cmd:"" help:"Manage consent resources"`
}

type SettingsConsentCmd added in v0.3.0

type SettingsConsentCmd struct {
	Config SettingsConsentConfigCmd `cmd:"" help:"Manage the complete consent configuration"`
	List   SettingsConsentListCmd   `cmd:"" help:"List consent resources"`
	Get    SettingsConsentGetCmd    `cmd:"" help:"Get a consent resource"`
	Create SettingsConsentCreateCmd `cmd:"" help:"Create a consent resource"`
	Update SettingsConsentUpdateCmd `cmd:"" help:"Update a consent resource"`
	Delete SettingsConsentDeleteCmd `cmd:"" help:"Delete a consent resource (requires --force)"`
}

type SettingsConsentConfigCmd added in v0.3.0

type SettingsConsentConfigCmd struct {
	Get     SettingsConsentConfigGetCmd     `cmd:"" help:"Get the complete consent configuration"`
	Update  SettingsConsentConfigUpdateCmd  `cmd:"" help:"Update consent configuration fields"`
	Replace SettingsConsentConfigReplaceCmd `cmd:"" help:"Replace the complete consent configuration (requires --force)"`
	Copy    SettingsConsentConfigCopyCmd    `cmd:"" help:"Copy the complete consent configuration between sites"`
}

SettingsConsentConfigCmd manages the whole consent configuration.

type SettingsConsentConfigCopyCmd added in v0.3.0

type SettingsConsentConfigCopyCmd struct {
	From     string `help:"Source site" required:"" name:"from"`
	To       string `help:"Target site" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
	DryRun   bool   `name:"dry-run" help:"Resolve and report changes without writing the target"`
}

SettingsConsentConfigCopyCmd copies the complete consent configuration.

func (*SettingsConsentConfigCopyCmd) Run added in v0.3.0

type SettingsConsentConfigGetCmd added in v0.3.0

type SettingsConsentConfigGetCmd struct{}

func (*SettingsConsentConfigGetCmd) Run added in v0.3.0

type SettingsConsentConfigReplaceCmd added in v0.3.0

type SettingsConsentConfigReplaceCmd struct {
	File string `help:"Read complete JSON configuration from file (use - for stdin)" required:""`
}

func (*SettingsConsentConfigReplaceCmd) Run added in v0.3.0

type SettingsConsentConfigUpdateCmd added in v0.3.0

type SettingsConsentConfigUpdateCmd struct {
	File        string   `help:"Read JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline consent configuration assignments"`
}

func (*SettingsConsentConfigUpdateCmd) Run added in v0.3.0

type SettingsConsentCreateCmd added in v0.3.0

type SettingsConsentCreateCmd struct {
	Kind        string   `required:"" enum:"purposes,cookies,applications" help:"Consent resource kind"`
	File        string   `help:"Read JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline consent resource assignments"`
}

func (*SettingsConsentCreateCmd) Run added in v0.3.0

type SettingsConsentDeleteCmd added in v0.3.0

type SettingsConsentDeleteCmd struct {
	Kind string `required:"" enum:"purposes,cookies,applications" help:"Consent resource kind"`
	Key  string `required:"" help:"Purpose/application key or cookie ID"`
}

func (*SettingsConsentDeleteCmd) Run added in v0.3.0

type SettingsConsentGetCmd added in v0.3.0

type SettingsConsentGetCmd struct {
	Kind string `required:"" enum:"purposes,cookies,applications" help:"Consent resource kind"`
	Key  string `required:"" help:"Purpose/application key or cookie ID"`
}

func (*SettingsConsentGetCmd) Run added in v0.3.0

type SettingsConsentListCmd added in v0.3.0

type SettingsConsentListCmd struct {
	Kind string `required:"" enum:"purposes,cookies,applications" help:"Consent resource kind"`
}

func (*SettingsConsentListCmd) Run added in v0.3.0

type SettingsConsentUpdateCmd added in v0.3.0

type SettingsConsentUpdateCmd struct {
	Kind        string   `required:"" enum:"purposes,cookies,applications" help:"Consent resource kind"`
	Key         string   `required:"" help:"Purpose/application key or cookie ID"`
	File        string   `help:"Read JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline consent resource assignments"`
}

func (*SettingsConsentUpdateCmd) Run added in v0.3.0

type SettingsGetCmd added in v0.3.0

type SettingsGetCmd struct {
	Section string `required:"" enum:"checkout,notifications,taxes,shipping,shop,email" help:"Settings section"`
}

func (*SettingsGetCmd) Run added in v0.3.0

func (c *SettingsGetCmd) Run(ctx context.Context) error

type SettingsUpdateCmd added in v0.3.0

type SettingsUpdateCmd struct {
	Section     string   `required:"" enum:"checkout,notifications,taxes,shipping,shop" help:"Settings section"`
	File        string   `help:"Read JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline settings assignments"`
}

func (*SettingsUpdateCmd) Run added in v0.3.0

func (c *SettingsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

type ShippingRatesCmd added in v0.3.0

type ShippingRatesCmd struct {
	List   ShippingRatesListCmd   `cmd:"" help:"List shipping rates"`
	Get    ShippingRatesGetCmd    `cmd:"" help:"Get shipping rate details"`
	Create ShippingRatesCreateCmd `cmd:"" help:"Create a shipping rate"`
	Update ShippingRatesUpdateCmd `cmd:"" help:"Update a shipping rate"`
	Delete ShippingRatesDeleteCmd `cmd:"" help:"Delete a shipping rate"`
}

ShippingRatesCmd manages shipping rates.

type ShippingRatesCreateCmd added in v0.3.0

type ShippingRatesCreateCmd struct {
	Locale      string   `help:"Content locale for localized shipping rate fields"`
	File        string   `help:"Read shipping rate JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=Express, price:=12.5)"`
}

ShippingRatesCreateCmd creates a shipping rate.

func (*ShippingRatesCreateCmd) Run added in v0.3.0

Run executes the create command.

type ShippingRatesDeleteCmd added in v0.3.0

type ShippingRatesDeleteCmd struct {
	Rate string `required:"" help:"Shipping rate ID"`
}

ShippingRatesDeleteCmd deletes a shipping rate.

func (*ShippingRatesDeleteCmd) Run added in v0.3.0

Run executes the delete command.

type ShippingRatesGetCmd added in v0.3.0

type ShippingRatesGetCmd struct {
	Rate   string `required:"" help:"Shipping rate ID"`
	Locale string `help:"Content locale for localized shipping rate fields"`
}

ShippingRatesGetCmd gets a shipping rate by ID.

func (*ShippingRatesGetCmd) Run added in v0.3.0

Run executes the get command.

type ShippingRatesListCmd added in v0.3.0

type ShippingRatesListCmd struct {
	QueryFlags `embed:""`
}

ShippingRatesListCmd lists shipping rates without pagination.

func (*ShippingRatesListCmd) Run added in v0.3.0

Run executes the list command.

type ShippingRatesUpdateCmd added in v0.3.0

type ShippingRatesUpdateCmd struct {
	Rate        string   `required:"" help:"Shipping rate ID"`
	Locale      string   `help:"Content locale for localized shipping rate fields"`
	File        string   `help:"Read shipping rate JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=Express, price:=12.5)"`
}

ShippingRatesUpdateCmd updates a shipping rate.

func (*ShippingRatesUpdateCmd) Run added in v0.3.0

Run executes the update command.

type SitesCmd

type SitesCmd struct {
	List     SitesListCmd     `cmd:"" help:"List accessible sites"`
	Get      SitesGetCmd      `cmd:"" help:"Get site details"`
	Current  SitesCurrentCmd  `cmd:"" help:"Show current site context"`
	Count    SitesCountCmd    `cmd:"" help:"Count accessible sites"`
	Settings SitesSettingsCmd `cmd:"" help:"Get site settings"`
	Copy     SitesCopyCmd     `cmd:"" help:"Copy site configuration and content between sites"`
}

SitesCmd manages sites.

type SitesCopyCmd

type SitesCopyCmd struct {
	From          string `help:"Source site" required:"" name:"from"`
	To            string `help:"Target site" required:"" name:"to"`
	FromHost      string `help:"Source API base URL or host" name:"from-host"`
	ToHost        string `help:"Target API base URL or host" name:"to-host"`
	EntryChannels string `help:"Comma-separated channels whose entries should also be copied" name:"entry-channels"`
	Only          string `help:"Comma-separated channel allowlist when using --recursive"`
	Recursive     bool   `help:"Recursively copy dependent channel entries"`
	Upsert        string `help:"Comma-separated upsert fields for entry-copy stage"`
	CopyCustomers bool   `name:"copy-customers" help:"Copy related customers when copying channel entries"`
	AllowErrors   bool   `name:"allow-errors" help:"Continue on item-level validation errors during record copy"`
	DryRun        bool   `name:"dry-run" help:"Show what would be copied without writing to target site"`
	SkipCloudCode bool   `name:"skip-cloud-code" help:"Skip copying cloud code app files"`
}

SitesCopyCmd copies major site resources between sites.

func (*SitesCopyCmd) Run

func (c *SitesCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes sites copy.

type SitesCountCmd

type SitesCountCmd struct {
	CountQueryFlags `embed:""`
}

SitesCountCmd gets site count.

func (*SitesCountCmd) Run

func (c *SitesCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type SitesCurrentCmd

type SitesCurrentCmd struct{}

SitesCurrentCmd shows the current site context.

func (*SitesCurrentCmd) Run

func (c *SitesCurrentCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the current command.

type SitesGetCmd

type SitesGetCmd struct{}

SitesGetCmd gets site details.

func (*SitesGetCmd) Run

func (c *SitesGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type SitesListCmd

type SitesListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

SitesListCmd lists accessible sites.

func (*SitesListCmd) Run

func (c *SitesListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type SitesSettingsCmd

type SitesSettingsCmd struct{}

SitesSettingsCmd fetches site settings.

func (*SitesSettingsCmd) Run

func (c *SitesSettingsCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the settings command.

type ThemeAssetsCmd

type ThemeAssetsCmd struct {
	List   ThemeAssetsListCmd   `cmd:"" help:"List assets"`
	Get    ThemeAssetsGetCmd    `cmd:"" help:"Get an asset"`
	Create ThemeAssetsCreateCmd `cmd:"" help:"Create or update an asset"`
	Delete ThemeAssetsDeleteCmd `cmd:"" help:"Delete an asset"`
}

ThemeAssetsCmd manages theme assets.

type ThemeAssetsCreateCmd

type ThemeAssetsCreateCmd struct {
	Theme       string   `required:"" help:"Theme ID"`
	Name        string   `required:"" help:"Asset name or path"`
	File        string   `help:"Read asset content from file" short:"f"`
	ContentType string   `help:"Asset content type"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. source.content_type=text/css)"`
}

ThemeAssetsCreateCmd creates or updates an asset.

func (*ThemeAssetsCreateCmd) Run

func (c *ThemeAssetsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type ThemeAssetsDeleteCmd

type ThemeAssetsDeleteCmd struct {
	Theme string `required:"" help:"Theme ID"`
	Path  string `required:"" help:"Asset path"`
}

ThemeAssetsDeleteCmd deletes an asset.

func (*ThemeAssetsDeleteCmd) Run

func (c *ThemeAssetsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type ThemeAssetsGetCmd

type ThemeAssetsGetCmd struct {
	Theme string `required:"" help:"Theme ID"`
	Path  string `required:"" aliases:"asset" help:"Asset path"`
}

ThemeAssetsGetCmd gets an asset.

func (*ThemeAssetsGetCmd) Run

func (c *ThemeAssetsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type ThemeAssetsListCmd

type ThemeAssetsListCmd struct {
	QueryFlags `embed:""`
	Theme      string `required:"" help:"Theme ID"`
	All        bool   `help:"Fetch all pages"`
	Page       int    `help:"Page number" default:"1"`
	PerPage    int    `help:"Items per page" default:"25"`
}

ThemeAssetsListCmd lists theme assets.

func (*ThemeAssetsListCmd) Run

func (c *ThemeAssetsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type ThemeCopyCmd

type ThemeCopyCmd struct {
	From       string `help:"Source site[/theme]" required:"" name:"from"`
	To         string `help:"Target site[/theme]" required:"" name:"to"`
	FromHost   string `help:"Source API base URL or host" name:"from-host"`
	ToHost     string `help:"Target API base URL or host" name:"to-host"`
	LiquidOnly bool   `help:"Only copy liquid resources" name:"liquid-only"`
}

ThemeCopyCmd copies a theme between sites/themes.

func (*ThemeCopyCmd) Run

func (c *ThemeCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes themes copy.

type ThemeDiffCmd

type ThemeDiffCmd struct {
	Theme   string `help:"Override theme from nimbu.yml"`
	Content bool   `help:"Show line-by-line changes for each file, like git diff"`
}

ThemeDiffCmd compares local liquid files with the remote theme.

func (*ThemeDiffCmd) Run

func (c *ThemeDiffCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the diff command.

type ThemeFilesCmd

type ThemeFilesCmd struct {
	List   ThemeFilesListCmd   `cmd:"" help:"List theme files"`
	Get    ThemeFilesGetCmd    `cmd:"" help:"Get/download theme file content"`
	Put    ThemeFilesPutCmd    `cmd:"" help:"Upload/update theme file"`
	Delete ThemeFilesDeleteCmd `cmd:"" help:"Delete theme file"`
}

ThemeFilesCmd manages theme files.

type ThemeFilesDeleteCmd

type ThemeFilesDeleteCmd struct {
	Theme string `required:"" help:"Theme ID"`
	Path  string `required:"" help:"File path within theme"`
}

ThemeFilesDeleteCmd deletes a theme file.

func (*ThemeFilesDeleteCmd) Run

func (c *ThemeFilesDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type ThemeFilesGetCmd

type ThemeFilesGetCmd struct {
	Theme  string `required:"" help:"Theme ID"`
	Path   string `required:"" help:"File path within theme"`
	Output string `help:"Write file to path instead of stdout" short:"o"`
}

ThemeFilesGetCmd gets/downloads a theme file.

func (*ThemeFilesGetCmd) Run

func (c *ThemeFilesGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type ThemeFilesListCmd

type ThemeFilesListCmd struct {
	QueryFlags `embed:""`
	Theme      string `required:"" help:"Theme ID"`
	All        bool   `help:"Fetch all pages"`
	Page       int    `help:"Page number" default:"1"`
	PerPage    int    `help:"Items per page" default:"25"`
}

ThemeFilesListCmd lists theme files.

func (*ThemeFilesListCmd) Run

func (c *ThemeFilesListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type ThemeFilesPutCmd

type ThemeFilesPutCmd struct {
	Theme   string `required:"" help:"Theme ID"`
	Path    string `required:"" help:"File path within theme"`
	File    string `help:"Read content from file path" short:"f"`
	Content string `help:"File content (base64 for binary)" short:"c"`
}

ThemeFilesPutCmd uploads/updates a theme file.

func (*ThemeFilesPutCmd) Run

func (c *ThemeFilesPutCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the put command.

type ThemeLayoutsCmd

type ThemeLayoutsCmd struct {
	List   ThemeLayoutsListCmd   `cmd:"" help:"List layouts"`
	Get    ThemeLayoutsGetCmd    `cmd:"" help:"Get a layout"`
	Create ThemeLayoutsCreateCmd `cmd:"" help:"Create or update a layout"`
	Delete ThemeLayoutsDeleteCmd `cmd:"" help:"Delete a layout"`
}

ThemeLayoutsCmd manages theme layouts.

type ThemeLayoutsCreateCmd

type ThemeLayoutsCreateCmd struct {
	Theme       string   `required:"" help:"Theme ID"`
	Name        string   `required:"" help:"Layout name including extension"`
	File        string   `help:"Read layout code from file" short:"f"`
	Code        string   `help:"Layout code (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. folder=default)"`
}

ThemeLayoutsCreateCmd creates or updates a layout.

func (*ThemeLayoutsCreateCmd) Run

func (c *ThemeLayoutsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type ThemeLayoutsDeleteCmd

type ThemeLayoutsDeleteCmd struct {
	Theme string `required:"" help:"Theme ID"`
	Name  string `required:"" help:"Layout name including extension"`
}

ThemeLayoutsDeleteCmd deletes a layout.

func (*ThemeLayoutsDeleteCmd) Run

func (c *ThemeLayoutsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type ThemeLayoutsGetCmd

type ThemeLayoutsGetCmd struct {
	Theme string `required:"" help:"Theme ID"`
	Name  string `required:"" aliases:"layout" help:"Layout name including extension"`
}

ThemeLayoutsGetCmd gets a layout.

func (*ThemeLayoutsGetCmd) Run

func (c *ThemeLayoutsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type ThemeLayoutsListCmd

type ThemeLayoutsListCmd struct {
	QueryFlags `embed:""`
	Theme      string `required:"" help:"Theme ID"`
	All        bool   `help:"Fetch all pages"`
	Page       int    `help:"Page number" default:"1"`
	PerPage    int    `help:"Items per page" default:"25"`
}

ThemeLayoutsListCmd lists theme layouts.

func (*ThemeLayoutsListCmd) Run

func (c *ThemeLayoutsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type ThemePullCmd

type ThemePullCmd struct {
	Theme      string `help:"Override theme from nimbu.yml"`
	LiquidOnly bool   `help:"Only download liquid resources" name:"liquid-only"`
}

ThemePullCmd downloads managed remote theme files.

func (*ThemePullCmd) Run

func (c *ThemePullCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the pull command.

type ThemePushCmd

type ThemePushCmd struct {
	All        bool     `help:"Upload all managed theme files"`
	Build      bool     `help:"Run sync.build before collecting files"`
	DryRun     bool     `help:"Print planned uploads without changing remote state" name:"dry-run"`
	Since      string   `help:"Compare against this git ref instead of HEAD (e.g. origin/main)"`
	Theme      string   `help:"Override theme from nimbu.yml"`
	Only       []string `help:"Only upload these file, directory, or glob selectors; commas split multiple selectors" name:"only"`
	LiquidOnly bool     `help:"Only upload liquid resources" name:"liquid-only"`
	CSSOnly    bool     `help:"Only upload stylesheet assets" name:"css-only"`
	JSOnly     bool     `help:"Only upload JavaScript assets" name:"js-only"`
	ImagesOnly bool     `help:"Only upload image assets" name:"images-only"`
	FontsOnly  bool     `help:"Only upload font assets" name:"fonts-only"`
	NoImages   bool     `help:"Exclude image assets" name:"no-images"`
	NoDeps     bool     `help:"Do not auto-add Liquid snippet/layout dependencies of --only files" name:"no-deps"`
}

ThemePushCmd uploads managed local theme files without deleting remote files.

func (*ThemePushCmd) Run

func (c *ThemePushCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the push command.

type ThemeSnippetsCmd

type ThemeSnippetsCmd struct {
	List   ThemeSnippetsListCmd   `cmd:"" help:"List snippets"`
	Get    ThemeSnippetsGetCmd    `cmd:"" help:"Get a snippet"`
	Create ThemeSnippetsCreateCmd `cmd:"" help:"Create or update a snippet"`
	Delete ThemeSnippetsDeleteCmd `cmd:"" help:"Delete a snippet"`
}

ThemeSnippetsCmd manages theme snippets.

type ThemeSnippetsCreateCmd

type ThemeSnippetsCreateCmd struct {
	Theme       string   `required:"" help:"Theme ID"`
	Name        string   `required:"" help:"Snippet name including extension"`
	File        string   `help:"Read snippet code from file" short:"f"`
	Code        string   `help:"Snippet code (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. folder=shared)"`
}

ThemeSnippetsCreateCmd creates or updates a snippet.

func (*ThemeSnippetsCreateCmd) Run

Run executes the create command.

type ThemeSnippetsDeleteCmd

type ThemeSnippetsDeleteCmd struct {
	Theme string `required:"" help:"Theme ID"`
	Name  string `required:"" help:"Snippet name including extension"`
}

ThemeSnippetsDeleteCmd deletes a snippet.

func (*ThemeSnippetsDeleteCmd) Run

Run executes the delete command.

type ThemeSnippetsGetCmd

type ThemeSnippetsGetCmd struct {
	Theme string `required:"" help:"Theme ID"`
	Name  string `required:"" aliases:"snippet" help:"Snippet name including extension"`
}

ThemeSnippetsGetCmd gets a snippet.

func (*ThemeSnippetsGetCmd) Run

func (c *ThemeSnippetsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type ThemeSnippetsListCmd

type ThemeSnippetsListCmd struct {
	QueryFlags `embed:""`
	Theme      string `required:"" help:"Theme ID"`
	All        bool   `help:"Fetch all pages"`
	Page       int    `help:"Page number" default:"1"`
	PerPage    int    `help:"Items per page" default:"25"`
}

ThemeSnippetsListCmd lists theme snippets.

func (*ThemeSnippetsListCmd) Run

func (c *ThemeSnippetsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type ThemeSyncCmd

type ThemeSyncCmd struct {
	All        bool     `help:"Upload all managed theme files"`
	Build      bool     `help:"Run sync.build before collecting files"`
	DryRun     bool     `help:"Print planned uploads/deletes without changing remote state" name:"dry-run"`
	Prune      bool     `help:"Delete managed remote theme files missing locally"`
	Since      string   `help:"Compare against this git ref instead of HEAD (e.g. origin/main)"`
	Theme      string   `help:"Override theme from nimbu.yml"`
	Only       []string `help:"Only sync these file, directory, or glob selectors; commas split multiple selectors" name:"only"`
	LiquidOnly bool     `help:"Only sync liquid resources" name:"liquid-only"`
	CSSOnly    bool     `help:"Only sync stylesheet assets" name:"css-only"`
	JSOnly     bool     `help:"Only sync JavaScript assets" name:"js-only"`
	ImagesOnly bool     `help:"Only sync image assets" name:"images-only"`
	FontsOnly  bool     `help:"Only sync font assets" name:"fonts-only"`
	NoImages   bool     `help:"Exclude image assets" name:"no-images"`
	NoDeps     bool     `help:"Do not auto-add Liquid snippet/layout dependencies of --only files" name:"no-deps"`
}

ThemeSyncCmd uploads managed local theme files and optionally deletes remote files.

func (*ThemeSyncCmd) Run

func (c *ThemeSyncCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the sync command.

type ThemeTemplatesCmd

type ThemeTemplatesCmd struct {
	List   ThemeTemplatesListCmd   `cmd:"" help:"List templates"`
	Get    ThemeTemplatesGetCmd    `cmd:"" help:"Get a template"`
	Create ThemeTemplatesCreateCmd `cmd:"" help:"Create or update a template"`
	Delete ThemeTemplatesDeleteCmd `cmd:"" help:"Delete a template"`
}

ThemeTemplatesCmd manages theme templates.

type ThemeTemplatesCreateCmd

type ThemeTemplatesCreateCmd struct {
	Theme       string   `required:"" help:"Theme ID"`
	Name        string   `required:"" help:"Template name including extension"`
	File        string   `help:"Read template code from file" short:"f"`
	Code        string   `help:"Template code (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. folder=emails)"`
}

ThemeTemplatesCreateCmd creates or updates a template.

func (*ThemeTemplatesCreateCmd) Run

Run executes the create command.

type ThemeTemplatesDeleteCmd

type ThemeTemplatesDeleteCmd struct {
	Theme string `required:"" help:"Theme ID"`
	Name  string `required:"" help:"Template name including extension"`
}

ThemeTemplatesDeleteCmd deletes a template.

func (*ThemeTemplatesDeleteCmd) Run

Run executes the delete command.

type ThemeTemplatesGetCmd

type ThemeTemplatesGetCmd struct {
	Theme string `required:"" help:"Theme ID"`
	Name  string `required:"" aliases:"template" help:"Template name including extension"`
}

ThemeTemplatesGetCmd gets a template.

func (*ThemeTemplatesGetCmd) Run

func (c *ThemeTemplatesGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type ThemeTemplatesListCmd

type ThemeTemplatesListCmd struct {
	QueryFlags `embed:""`
	Theme      string `required:"" help:"Theme ID"`
	All        bool   `help:"Fetch all pages"`
	Page       int    `help:"Page number" default:"1"`
	PerPage    int    `help:"Items per page" default:"25"`
}

ThemeTemplatesListCmd lists theme templates.

func (*ThemeTemplatesListCmd) Run

func (c *ThemeTemplatesListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type ThemesCDNRootCmd

type ThemesCDNRootCmd struct {
	Theme string `help:"Override theme from nimbu.yml"`
}

ThemesCDNRootCmd prints the resolved CDN root for the configured theme.

func (*ThemesCDNRootCmd) Run

func (c *ThemesCDNRootCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the cdn-root command.

type ThemesCmd

type ThemesCmd struct {
	List      ThemesListCmd     `cmd:"" help:"List themes"`
	Get       ThemesGetCmd      `cmd:"" help:"Get theme details"`
	CDNRoot   ThemesCDNRootCmd  `cmd:"" name:"cdn-root" help:"Print the resolved theme CDN root"`
	Pull      ThemePullCmd      `cmd:"" help:"Download managed remote theme files"`
	Diff      ThemeDiffCmd      `cmd:"" help:"Compare remote liquid theme files to local files"`
	Copy      ThemeCopyCmd      `cmd:"" help:"Copy a theme between sites/themes"`
	Push      ThemePushCmd      `cmd:"" help:"Upload managed local theme files"`
	Sync      ThemeSyncCmd      `cmd:"" help:"Upload and reconcile managed local theme files"`
	Layouts   ThemeLayoutsCmd   `cmd:"" help:"Manage layouts"`
	Templates ThemeTemplatesCmd `cmd:"" help:"Manage templates"`
	Snippets  ThemeSnippetsCmd  `cmd:"" help:"Manage snippets"`
	Assets    ThemeAssetsCmd    `cmd:"" help:"Manage assets"`
	Files     ThemeFilesCmd     `cmd:"" help:"Manage theme files (undocumented in API overview)"`
}

ThemesCmd manages themes.

type ThemesGetCmd

type ThemesGetCmd struct {
	Theme string `required:"" help:"Theme ID"`
}

ThemesGetCmd gets theme details.

func (*ThemesGetCmd) Run

func (c *ThemesGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type ThemesListCmd

type ThemesListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

ThemesListCmd lists themes.

func (*ThemesListCmd) Run

func (c *ThemesListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type TranslationsCmd

type TranslationsCmd struct {
	List   TranslationsListCmd   `cmd:"" help:"List translations"`
	Get    TranslationsGetCmd    `cmd:"" help:"Get translation by key"`
	Create TranslationsCreateCmd `cmd:"" help:"Create a translation"`
	Update TranslationsUpdateCmd `cmd:"" help:"Update a translation"`
	Delete TranslationsDeleteCmd `cmd:"" help:"Delete a translation"`
	Count  TranslationsCountCmd  `cmd:"" help:"Count translations"`
	Copy   TranslationsCopyCmd   `cmd:"" help:"Copy translations between sites"`
}

TranslationsCmd manages translations.

type TranslationsCopyCmd

type TranslationsCopyCmd struct {
	Query    string `help:"Translation key, prefix*, or *" default:"*" name:"only"`
	From     string `help:"Source site" required:"" name:"from"`
	To       string `help:"Target site" required:"" name:"to"`
	FromHost string `help:"Source API base URL or host" name:"from-host"`
	ToHost   string `help:"Target API base URL or host" name:"to-host"`
	Since    string `help:"Only copy translations updated since RFC3339 or relative duration like 1d"`
	DryRun   bool   `name:"dry-run" help:"Show what would be copied without writing target state"`
}

TranslationsCopyCmd copies translations between sites.

func (*TranslationsCopyCmd) Run

func (c *TranslationsCopyCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes translations copy.

type TranslationsCountCmd

type TranslationsCountCmd struct {
	CountQueryFlags `embed:""`
}

TranslationsCountCmd gets translation count.

func (*TranslationsCountCmd) Run

func (c *TranslationsCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type TranslationsCreateCmd

type TranslationsCreateCmd struct {
	File        string   `help:"Read translation JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. key=home.title, nl=Welkom, values.fr=Bienvenue)"`
}

TranslationsCreateCmd creates a translation.

func (*TranslationsCreateCmd) Run

func (c *TranslationsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type TranslationsDeleteCmd

type TranslationsDeleteCmd struct {
	Key string `required:"" help:"Translation key"`
}

TranslationsDeleteCmd deletes a translation.

func (*TranslationsDeleteCmd) Run

func (c *TranslationsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type TranslationsGetCmd

type TranslationsGetCmd struct {
	Key string `required:"" help:"Translation key"`
}

TranslationsGetCmd gets a translation.

func (*TranslationsGetCmd) Run

func (c *TranslationsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type TranslationsListCmd

type TranslationsListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

TranslationsListCmd lists translations.

func (*TranslationsListCmd) Run

func (c *TranslationsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type TranslationsUpdateCmd

type TranslationsUpdateCmd struct {
	Key         string   `required:"" help:"Translation key"`
	File        string   `help:"Read translation JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. nl=Achternaam, values.fr=Nom)"`
}

TranslationsUpdateCmd updates a translation.

func (*TranslationsUpdateCmd) Run

func (c *TranslationsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

type UploadsCmd

type UploadsCmd struct {
	List     UploadsListCmd     `cmd:"" help:"List uploads"`
	Get      UploadsGetCmd      `cmd:"" help:"Get upload details"`
	Create   UploadsCreateCmd   `cmd:"" help:"Upload a file"`
	Download UploadsDownloadCmd `cmd:"" help:"Download an upload"`
	Delete   UploadsDeleteCmd   `cmd:"" help:"Delete an upload"`
	Count    UploadsCountCmd    `cmd:"" help:"Count uploads"`
}

UploadsCmd manages uploads.

type UploadsCountCmd

type UploadsCountCmd struct {
	CountQueryFlags `embed:""`
}

UploadsCountCmd gets upload count.

func (*UploadsCountCmd) Run

func (c *UploadsCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type UploadsCreateCmd

type UploadsCreateCmd struct {
	Source      string   `optional:"" help:"Path to file to upload" name:"source"`
	File        string   `name:"file" short:"f" help:"Path to file to upload"`
	FileRef     string   `name:"file-ref" help:"Nimbu FileRef URI to copy (e.g. nimbu://site/uploads/id)"`
	Name        string   `help:"Override filename" short:"n"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=custom.jpg)"`
}

UploadsCreateCmd uploads a file.

func (*UploadsCreateCmd) Run

func (c *UploadsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type UploadsDeleteCmd

type UploadsDeleteCmd struct {
	ID string `required:"" help:"Upload ID"`
}

UploadsDeleteCmd deletes an upload.

func (*UploadsDeleteCmd) Run

func (c *UploadsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type UploadsDownloadCmd added in v0.3.0

type UploadsDownloadCmd struct {
	ID     string `required:"" help:"Upload ID"`
	Output string `help:"Write the file to this path, or - for stdout" required:""`
}

func (*UploadsDownloadCmd) Run added in v0.3.0

func (c *UploadsDownloadCmd) Run(ctx context.Context, flags *RootFlags) error

type UploadsGetCmd

type UploadsGetCmd struct {
	ID string `required:"" help:"Upload ID"`
}

UploadsGetCmd gets upload details.

func (*UploadsGetCmd) Run

func (c *UploadsGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type UploadsListCmd

type UploadsListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

UploadsListCmd lists uploads.

func (*UploadsListCmd) Run

func (c *UploadsListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type WebhooksCmd

type WebhooksCmd struct {
	List   WebhooksListCmd   `cmd:"" help:"List webhooks"`
	Get    WebhooksGetCmd    `cmd:"" help:"Get webhook details"`
	Delete WebhooksDeleteCmd `cmd:"" help:"Delete a webhook"`
}

WebhooksCmd manages webhooks.

type WebhooksCountCmd

type WebhooksCountCmd struct {
	CountQueryFlags `embed:""`
}

WebhooksCountCmd gets webhook count.

func (*WebhooksCountCmd) Run

func (c *WebhooksCountCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the count command.

type WebhooksCreateCmd

type WebhooksCreateCmd struct {
	File        string   `help:"Read webhook data from file (use - for stdin)" short:"f"`
	URL         string   `help:"Webhook URL"`
	Events      string   `help:"Comma-separated event types"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. url=https://example.com, events:=[\"order.created\"])"`
}

WebhooksCreateCmd creates a webhook.

func (*WebhooksCreateCmd) Run

func (c *WebhooksCreateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the create command.

type WebhooksDeleteCmd

type WebhooksDeleteCmd struct {
	ID string `required:"" help:"Webhook ID"`
}

WebhooksDeleteCmd deletes a webhook.

func (*WebhooksDeleteCmd) Run

func (c *WebhooksDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the delete command.

type WebhooksGetCmd

type WebhooksGetCmd struct {
	ID string `required:"" help:"Webhook ID"`
}

WebhooksGetCmd gets webhook details.

func (*WebhooksGetCmd) Run

func (c *WebhooksGetCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the get command.

type WebhooksListCmd

type WebhooksListCmd struct {
	QueryFlags `embed:""`
	All        bool `help:"Fetch all pages"`
	Page       int  `help:"Page number" default:"1"`
	PerPage    int  `help:"Items per page" default:"25"`
}

WebhooksListCmd lists webhooks.

func (*WebhooksListCmd) Run

func (c *WebhooksListCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the list command.

type WebhooksUpdateCmd

type WebhooksUpdateCmd struct {
	ID          string   `required:"" help:"Webhook ID"`
	File        string   `help:"Read webhook data from file (use - for stdin)" short:"f"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. url=https://example.com, active:=true)"`
}

WebhooksUpdateCmd updates a webhook.

func (*WebhooksUpdateCmd) Run

func (c *WebhooksUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

Run executes the update command.

Source Files

Jump to

Keyboard shortcuts

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