cli

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package cli builds the wiki command tree on top of the wiki library.

Index

Constants

View Source
const (
	FormatAuto     = render.Auto
	FormatTable    = render.Table
	FormatMarkdown = render.Markdown
	FormatList     = render.List
	FormatJSON     = render.JSON
	FormatJSONL    = render.JSONL
	FormatCSV      = render.CSV
	FormatTSV      = render.TSV
	FormatURL      = render.URL
	FormatRaw      = render.Raw
)

Variables

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

Build metadata, set via -ldflags at release time.

Functions

func Root

func Root() *cobra.Command

Root builds the root command and its whole subtree.

Types

type App

type App struct {
	Cfg   wiki.Config
	Cache *wiki.Cache
	Out   *render.Renderer

	Limit int
	// contains filtered or unexported fields
}

App carries the resolved configuration and shared clients for a command run.

func (*App) Client

func (a *App) Client() (*wiki.Client, error)

Client returns the resolved wiki client or the resolution error (bad project/host). Commands that need network access call this first.

type Format

type Format = render.Format

Format is an output encoding. It aliases kit's render.Format so the command code keeps reading naturally (app.Out.Format() == FormatJSON) while the actual rendering is the shared kit engine — the same one every tamnd/*-cli uses.

type Row

type Row = render.Record

Row is one output record: an ordered, curated column set (Cols/Vals) for the list, table, csv, tsv, and url views plus the full typed 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.

Jump to

Keyboard shortcuts

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