cmd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 54 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 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)

func VersionString

func VersionString() string

VersionString returns the version string.

Types

type APICmd

type APICmd struct {
	Method string `required:"" help:"HTTP method (GET, POST, PUT, PATCH, DELETE)"`
	Path   string `required:"" help:"API path (e.g., /channels)"`
	Data   string `help:"Request body (JSON string)" short:"d"`
	File   string `help:"Read request body from file" type:"existingfile"`
}

APICmd provides raw API access.

func (*APICmd) Run

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

Run executes the raw API command.

type AccountsCmd

type AccountsCmd struct {
	List  AccountsListCmd  `cmd:"" help:"List accounts"`
	Count AccountsCountCmd `cmd:"" help:"Count accounts"`
}

AccountsCmd manages accounts.

type AccountsCountCmd

type AccountsCountCmd struct{}

AccountsCountCmd gets count of accounts.

func (*AccountsCountCmd) Run

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

Run executes the count command.

type AccountsListCmd

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

AccountsListCmd lists accounts.

func (*AccountsListCmd) Run

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

Run executes the list command.

type AppsCmd

type AppsCmd struct {
	List   AppsListCmd   `cmd:"" help:"List apps"`
	Get    AppsGetCmd    `cmd:"" help:"Get app details"`
	Config AppsConfigCmd `cmd:"" help:"Add an app to local project config"`
	Push   AppsPushCmd   `cmd:"" help:"Push configured local cloud-code files"`
	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"`
	Create AppsCodeCreateCmd `cmd:"" help:"Create app code file from JSON"`
}

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 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 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 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 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 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 {
	Email     string `help:"Email address" short:"e"`
	Password  string `help:"Password (use stdin for security)" short:"p"`
	Token     string `help:"Use existing token instead of login" short:"t" env:"NIMBU_TOKEN"`
	ExpiresIn int    `help:"Token lifetime in seconds" short:"x" default:"31536000"`
}

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 {
	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"`
	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"`
}

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"`
	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{}

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 {
	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"`
}

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"`
	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"`
	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"`
	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"`
	Accounts      AccountsCmd         `cmd:"" help:"Manage accounts"`
	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"`
	Config        ConfigCmd           `cmd:"" help:"Manage configuration"`
	API           APICmd              `cmd:"" help:"Raw API access"`
	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"`
}

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 {
	QueryFlags `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"`
	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 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) 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   `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)"`
}

ChannelEntriesUpdateCmd updates a channel entry.

func (*ChannelEntriesUpdateCmd) Run

Run executes the update command.

type ChannelsCmd

type ChannelsCmd struct {
	List    ChannelsListCmd   `cmd:"" help:"List channels"`
	Get     ChannelsGetCmd    `cmd:"" help:"Get channel details"`
	Info    ChannelsInfoCmd   `cmd:"" help:"Show rich channel info and TypeScript output"`
	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"`
	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 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 interface 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 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{}

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 {
	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"`
}

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"`
	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 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 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{}

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 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"`
}

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{}

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 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 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   `required:"" 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 {
	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"`
}

JobsCmd executes cloud jobs.

type JobsRunCmd

type JobsRunCmd struct {
	Job         string   `required:"" help:"Job identifier"`
	File        string   `help:"Read job params JSON from file (use - for stdin)"`
	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{}

MenusCountCmd gets menu count.

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

Run executes the count command.

type MenusCreateCmd struct {
	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"`
}

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"`
	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{}

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 {
	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"`
}

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"`
	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 {
	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 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"`
	Count  PagesCountCmd  `cmd:"" help:"Count pages"`
	Copy   PagesCopyCmd   `cmd:"" help:"Copy pages between sites"`
}

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"`
}

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{}

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 {
	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) Run

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

Run executes the create command.

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 PagesGetCmd

type PagesGetCmd struct {
	QueryFlags     `embed:""`
	DownloadAssets string `help:"Download page file editables into DIR and rewrite JSON to attachment_path refs"`
	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 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 PagesUpdateCmd

type PagesUpdateCmd struct {
	QueryFlags  `embed:""`
	Page        string   `required:"" help:"Page fullpath"`
	File        string   `help:"Read page JSON from file (use - for stdin)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. title=About, published:=true)"`
}

PagesUpdateCmd updates a page.

func (*PagesUpdateCmd) Run

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

Run executes the update command.

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"`
}

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{}

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 {
	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"`
}

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"`
	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:"Filter by 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 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 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 `cmd:"" help:"Update role"`
	Delete RolesDeleteCmd `cmd:"" help:"Delete role"`
	Copy   RolesCopyCmd   `cmd:"" help:"Copy roles between sites"`
}

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 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)"`
	Assignments []string `arg:"" optional:"" help:"Inline assignments (e.g. name=VIP)"`
}

RolesUpdateCmd updates a role.

func (*RolesUpdateCmd) Run

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

Run executes the update command.

type RootFlags

type RootFlags struct {
	// Essential (ungrouped — always visible in help)
	Site    string `help:"Site ID or subdomain" 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 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"`
	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 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"`
}

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{}

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:"" 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"`
}

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:"" 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"`
}

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:"" 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"`
}

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:"" 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{}

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"`
	Delete UploadsDeleteCmd `cmd:"" help:"Delete an upload"`
	Count  UploadsCountCmd  `cmd:"" help:"Count uploads"`
}

UploadsCmd manages uploads.

type UploadsCountCmd

type UploadsCountCmd struct{}

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   `required:"" help:"Path to file to upload" name:"source"`
	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 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{}

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