Help us shape the future of Go! Take the 2026 Go Developer Survey

app

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package app is AutoDoc's one binary, with its modes as flags (ADR 0203 §4.1), as a function a main calls (ADR 0216 §1.1). --serve is the daemon; --ui is the TUI, its client, which starts the daemon when nothing answers:

autodoc --ui [--dev dir] [workspace]

opens the named workspace, or the one the TUI last used. --call is one verb, as JSON, for a shell or an AI agent (AGENTS.md):

autodoc --call search.query '["kb", "a query", {"limit": 5}]'

The Web-UI (--web-ui) follows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(ctx context.Context, args []string, o Options) int

Main runs autodoc as its CLI does and returns the process's exit code: 2 for usage, 1 for an error. It parses args (without the program's name) with its own FlagSet and never calls os.Exit.

Types

type CallError

type CallError struct {
	Code    int64  `json:"code"`
	Message string `json:"message"`
}

CallError is the daemon refusing a call: its code and message, as --call prints them.

func (*CallError) Error

func (e *CallError) Error() string

type Derived

type Derived = registrations.Derived

Deriver and Derived are a build's text derivation (core/registrations).

type Deriver

type Deriver = registrations.Deriver

Deriver and Derived are a build's text derivation (core/registrations).

type Options

type Options struct {
	// Version is the build's, stamped in its main package: --version prints it, the daemon reports
	// it, and the TUI compares it with the installed binary's, so it must be real.
	Version string
	// Chunkers are the build's own chunkers, by lower-case extension with its dot (".go"): a file
	// of one is indexed by it, as kind.Registered (ADR 0216 §1.2-1.3). Main refuses a malformed or
	// built-in extension, a Pro format's, and a version outside document.indexer's charset. nil:
	// none, the community build.
	Chunkers map[string]search.Chunker
	// Deriver makes text of the build's Pro document formats (ADR 0216 §1.8), its formats and their
	// identities read once, at entry; AutoDoc 03 wires it into indexing. nil: none.
	Deriver Deriver
}

Options is what a main hands Main: what makes its build its own.

Jump to

Keyboard shortcuts

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