cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev"
	Commit  = "none"
	Date    = "unknown"
)

Build metadata, stamped via -ldflags (spec §7). goreleaser targets github.com/tamnd/x-cli/cli.{Version,Commit,Date}.

Functions

func New added in v0.2.1

func New() *kit.App

New builds the kit App: the identity, the x-specific global flags, the per-run config finalize, and every command as a kit escape hatch. cli only touches kit here; kit wraps cobra/fang internally.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App is the per-run state every command works through. The reads, the local-store workflow, and the meta commands are all kit.Command escape hatches: each one rebuilds this state from the run context with appFromCtx, so they share the resolved config, the engine, and the output settings kit resolved once for the run. The record operations also live in the x domain (x/domain.go), which an ant host drives; the standalone binary keeps its full command surface here, now on kit instead of cobra.

func (*App) StorePath added in v0.2.1

func (a *App) StorePath() string

StorePath is the fixed location of the typed local store, under the data dir. The crawl, queue, db, and export commands read and write this rich schema. It is deliberately not kit's generic --db sink: that store carries a different schema and serves the (currently empty) record-op surface.

type Row

type Row = render.Record

Row is one output record: an ordered, curated column set (Cols/Vals) for the table, csv, tsv, and url views plus the full typed object as Value for json, jsonl, raw, and template. It is kit's render.Record, so every row builder feeds straight into the shared renderer with no per-format code of our own, the same way ytb-cli does. Snowflake IDs stay strings (the Value tags them).

Jump to

Keyboard shortcuts

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