cmd

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run() int

Types

type AnalyticsActiveCmd

type AnalyticsActiveCmd struct {
	WebsiteID string `arg:"" name:"website-id" help:"Website ID"`
}

func (*AnalyticsActiveCmd) Run

func (c *AnalyticsActiveCmd) Run(ctx *Context) error

type AnalyticsCmd

type AnalyticsCmd struct {
	Active          AnalyticsActiveCmd          `cmd:"" help:"Active users"`
	EventsSeries    AnalyticsEventsSeriesCmd    `cmd:"" help:"Event series"`
	Metrics         AnalyticsMetricsCmd         `cmd:"" help:"Metrics"`
	MetricsExpanded AnalyticsMetricsExpandedCmd `cmd:"" help:"Expanded metrics"`
	Pageviews       AnalyticsPageviewsCmd       `cmd:"" help:"Pageviews"`
	Stats           AnalyticsStatsCmd           `cmd:"" help:"Summary stats"`
}

type AnalyticsEventsSeriesCmd

type AnalyticsEventsSeriesCmd struct {
	WebsiteID string `arg:"" name:"website-id" help:"Website ID"`
	TimeRange
	Unit     string `help:"Time unit (year|month|day|hour|minute)"`
	Timezone string `help:"Timezone (e.g. America/Los_Angeles)"`
	Filters
}

func (*AnalyticsEventsSeriesCmd) Run

func (c *AnalyticsEventsSeriesCmd) Run(ctx *Context) error

type AnalyticsMetricsCmd

type AnalyticsMetricsCmd struct {
	WebsiteID string `arg:"" name:"website-id" help:"Website ID"`
	TimeRange
	Type   string `` /* 156-byte string literal not displayed */
	Limit  int    `help:"Number of rows returned (default 500)"`
	Offset int    `help:"Number of rows to skip (default 0)"`
	Filters
}

func (*AnalyticsMetricsCmd) Run

func (c *AnalyticsMetricsCmd) Run(ctx *Context) error

type AnalyticsMetricsExpandedCmd

type AnalyticsMetricsExpandedCmd struct {
	WebsiteID string `arg:"" name:"website-id" help:"Website ID"`
	TimeRange
	Type   string `` /* 156-byte string literal not displayed */
	Limit  int    `help:"Number of rows returned (default 500)"`
	Offset int    `help:"Number of rows to skip (default 0)"`
	Filters
}

func (*AnalyticsMetricsExpandedCmd) Run

type AnalyticsPageviewsCmd

type AnalyticsPageviewsCmd struct {
	WebsiteID string `arg:"" name:"website-id" help:"Website ID"`
	TimeRange
	Unit     string `help:"Time unit (year|month|day|hour|minute)"`
	Timezone string `help:"Timezone (e.g. America/Los_Angeles)"`
	Compare  string `help:"Comparison value (prev|yoy)"`
	Filters
}

func (*AnalyticsPageviewsCmd) Run

func (c *AnalyticsPageviewsCmd) Run(ctx *Context) error

type AnalyticsStatsCmd

type AnalyticsStatsCmd struct {
	WebsiteID string `arg:"" name:"website-id" help:"Website ID"`
	TimeRange
	Filters
}

func (*AnalyticsStatsCmd) Run

func (c *AnalyticsStatsCmd) Run(ctx *Context) error

type AuthCmd

type AuthCmd struct {
	Login  AuthLoginCmd  `cmd:"" help:"Login with username and password"`
	Verify AuthVerifyCmd `cmd:"" help:"Verify stored token"`
}

type AuthLoginCmd

type AuthLoginCmd struct {
	Username string `help:"Umami username" env:"UMAMI_USERNAME"`
	Password string `help:"Umami password" env:"UMAMI_PASSWORD"`
}

func (*AuthLoginCmd) Run

func (c *AuthLoginCmd) Run(ctx *Context) error

type AuthVerifyCmd

type AuthVerifyCmd struct{}

func (*AuthVerifyCmd) Run

func (c *AuthVerifyCmd) Run(ctx *Context) error

type CLI

type CLI struct {
	Globals

	Auth      AuthCmd      `cmd:"" help:"Authenticate and manage tokens"`
	Analytics AnalyticsCmd `cmd:"" help:"Analytics operations"`
	Teams     TeamsCmd     `cmd:"" help:"Team operations"`
	Websites  WebsitesCmd  `cmd:"" help:"Website operations"`
	Version   VersionCmd   `cmd:"" help:"Print version"`
}

type Context

type Context struct {
	Config *config.Config
	JSON   bool
}

type Filters

type Filters struct {
	Path       string `help:"Filter by URL path"`
	Referrer   string `help:"Filter by referrer"`
	Title      string `help:"Filter by page title"`
	Query      string `help:"Filter by query parameter"`
	Browser    string `help:"Filter by browser"`
	OS         string `help:"Filter by operating system"`
	Device     string `help:"Filter by device"`
	Country    string `help:"Filter by country"`
	Region     string `help:"Filter by region"`
	City       string `help:"Filter by city"`
	Hostname   string `help:"Filter by hostname"`
	Tag        string `help:"Filter by tag"`
	DistinctID string `help:"Filter by distinct ID"`
	Segment    string `help:"Filter by segment UUID"`
	Cohort     string `help:"Filter by cohort UUID"`
}

type Globals

type Globals struct {
	Endpoint string `help:"Umami base URL (e.g. https://analytics.example.com)" env:"UMAMI_URL"`
	Token    string `help:"API token (overrides stored config)" env:"UMAMI_TOKEN"`
	JSON     bool   `help:"Output raw JSON"`
}

type Team

type Team struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type TeamsCmd

type TeamsCmd struct {
	List     TeamsListCmd     `cmd:"" help:"List teams"`
	Websites TeamsWebsitesCmd `cmd:"" help:"List websites for a team"`
}

type TeamsListCmd

type TeamsListCmd struct{}

func (*TeamsListCmd) Run

func (c *TeamsListCmd) Run(ctx *Context) error

type TeamsWebsitesCmd

type TeamsWebsitesCmd struct {
	TeamID string `arg:"" name:"team-id" help:"Team ID"`
}

func (*TeamsWebsitesCmd) Run

func (c *TeamsWebsitesCmd) Run(ctx *Context) error

type TimeRange

type TimeRange struct {
	StartAt int64 `help:"Start timestamp (ms since epoch)"`
	EndAt   int64 `help:"End timestamp (ms since epoch)"`
}

type VersionCmd

type VersionCmd struct{}

func (*VersionCmd) Run

func (c *VersionCmd) Run(*Context) error

type Website

type Website struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Domain string `json:"domain"`
}

type WebsitesCmd

type WebsitesCmd struct {
	List WebsitesListCmd `cmd:"" help:"List websites"`
}

type WebsitesListCmd

type WebsitesListCmd struct{}

func (*WebsitesListCmd) Run

func (c *WebsitesListCmd) Run(ctx *Context) error

Jump to

Keyboard shortcuts

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