Documentation
¶
Overview ¶
Package cli is `ce`, the command line client of Checkend. It reads stats and changes the setup of a remote Checkend server (cloud or self-hosted) with an API token, through the MCP tools (/mcp) and /api/v1/export: the same surface an agent uses, so no endpoint exists only for the CLI.
Index ¶
Constants ¶
const DefaultURL = "https://app.checkend.com"
DefaultURL is the server of a new login without --url: the cloud edition.
Variables ¶
var ErrLocked = errors.New("the organization is locked: open Checkend in the browser to see why")
ErrLocked means the org of the token is locked (cloud billing).
ErrUnauthorized means the server refused the token.
Functions ¶
Types ¶
type App ¶
type App struct {
Version string
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
Env func(string) string
HTTP *http.Client // nil: a default client
Now func() time.Time
// contains filtered or unexported fields
}
App holds what one run of ce needs. Main builds it from the process; tests build their own.
type Client ¶
type Client struct {
URL string // base URL, no trailing slash
Token string
Version string
HTTP *http.Client
// contains filtered or unexported fields
}
Client talks to one Checkend server with an API token: the MCP tools at /mcp for stats and setup, and plain HTTP for the file export. It uses the same surface as an agent, so a token works in both.