docs

package
v0.16.397 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: AGPL-3.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Documentation

The same pages are built into harnessly: the /help page of every install shows them by section, and agents read them with harnessly docs. The sections are folders with a section.json: Getting started, For agents, Architecture, Self-hosting and Apps and plugins; a team adds its own without a rebuild (your own documentation). The screenshots are shot from the real page by web/e2e/docs-shots.spec.ts.

Page What it covers
Compared harnessly next to Happy, Paseo, T3 Code, Orca and Claude Code Remote Control
Getting started build, run the runtime standalone, open tabs, run agents, connect the machine agent
Architecture the runtime gate and its two modes, the core, tmux, the machine agent, the repository layout
Slices the slices of routes, switching them per machine, the shadow comparison
Configuration every RUNTIME_* and AGENT_* environment variable
Deploy plain commands, systemd, Docker, docker compose with boards and artifacts, Helm, Argo CD
Voice input the microphone in the message field: what it needs, the built-in recognition, how to change or turn it off
Build apps and plugins the guide: from an empty folder to a published app, UI and backend, with diagrams and examples; also harnessly app docs
Apps reference every manifest field, SDK call, limit and security layer of apps
Design pages the page model of a design project (meta/), the page commands, the migration, the canvas.json guard
The safe secrets for the agents without the chat: storage, the ask flow, the threat model
Connections the person's Jira, Confluence, YouTrack, Linear, GitLab, GitHub and wikis by a pasted link: detection, storage, routes, the agents' harnessly issues
MCP servers remote MCP servers connected in Settings → Connections: probing, OAuth sign-in in a popup, the proxy, how Claude Code and Codex get them
Documents and Boards the two optional services beside the hub: install with compose or Helm, the address, how to check the app is there, what happens without them
Integrations boards and artifacts beside the conversation, the agents' environment, the agent skills
The hub running a hub with sign-in for a team: deploy (compose, Caddy, systemd, Helm), connecting a machine, architecture, the contract of the hub, the agent link and the UI

Brand assets (wordmarks, the square avatar and the GitHub social preview) are in brand/.

Documentation

Overview

Package docs carries the documentation in the binary, so a machine with no source checkout and no network has it: the `harnessly docs` and `harnessly app docs` commands read it for an agent, the runtime's /help page shows it to a person.

Index

Constants

View Source
const (
	AudiencePeople = "people"
	AudienceAgents = "agents"
	AudienceAll    = "all"
)

Audiences of a section: who it is written for. The page shows them all; an agent's list marks them.

View Source
const (
	OriginBuiltin = "builtin"
	OriginLocal   = "local"
)

Origins of a section or a page.

View Source
const (
	LocaleEN = "en"
	LocaleRU = "ru"
)

Locales are the languages the guide is written in; English is the source and the fallback of any page.

View Source
const ManifestFile = "section.json"

ManifestFile is the file that makes a folder a section.

View Source
const MaxPicture = 8 << 20

MaxPicture is the largest picture a page may show.

View Source
const TeamSection = "team"

TeamSection is the id of the section made of the Markdown files in the root of a local folder.

Variables

View Source
var Guide embed.FS

Guide holds the whole built-in library (library.go): the sections (each folder with a section.json: start, agents, inside, self-host, build-apps), the repository's own pages they list (*.md, hub/, migrations/), their pictures, the example packages of the apps guide, and the Russian translations under ru/ with the same file names. A page with no translation is read in English.

Functions

func LocalDirs added in v0.16.154

func LocalDirs(getenv func(string) string, dataDir string) []string

LocalDirs are the machine's own documentation folders: HARNESSLY_DOCS_DIR (several separated like PATH), else <data>/docs. The first one is where `harnessly docs add` writes.

func Migration

func Migration(id string) ([]byte, error)

Migration is the page of a move of the machines' data (docs/migrations/<id>.md), as this version carries it: `hub doctor` and `harnessly migrate` show it with the version that moves.

func PageName

func PageName(file string) string

PageName drops the folder, the reading-order number and the extension: build-apps/03-views.md is views.

func Read

func Read(guide fs.FS, locale, name string) ([]byte, bool, error)

Read is the Markdown of the page called name in the locale; false when there is no such page. The name is matched against the listed pages, so nothing the caller sends reaches the file system.

func Slug added in v0.16.154

func Slug(s string) string

Slug makes an address name of a title or a file name: lower-case latin letters and digits, the rest a single dash. It is empty for a name with no latin letter or digit.

func ValidID added in v0.16.154

func ValidID(s string) bool

ValidID is a name of a section or a page as it may stand in an address: lower-case letters, digits and dashes.

Types

type Doc added in v0.16.154

type Doc struct {
	Name     string   `json:"name"`
	Title    string   `json:"title"`
	Headings []string `json:"headings"`
	// File is the page's path in its source, the English one: links and pictures of the page are relative to it.
	File string `json:"file"`
	// Read is the file actually read: the translation (ru/...) when the locale has one, else File.
	Read   string `json:"read"`
	Origin string `json:"origin"`
	// contains filtered or unexported fields
}

Doc is a page of a section: its name in the section, the file it was read from and its outline.

func (Doc) Markdown added in v0.16.154

func (d Doc) Markdown() ([]byte, error)

Markdown is the page's text in the locale it was loaded in.

func (Doc) Path added in v0.16.154

func (d Doc) Path() string

Path is where the page lies on disk, for a local page; empty for a built-in one.

func (Doc) Picture added in v0.16.154

func (d Doc) Picture(src string) ([]byte, string, error)

Picture reads a picture a page points at (src relative to the page's file, as Markdown writes it) from the page's own source; it never leaves the source and only reads pictures. The type is its media type.

type Hit added in v0.16.154

type Hit struct {
	Section string `json:"section"`
	Name    string `json:"name"`
	Title   string `json:"title"`
	// Heading is the heading the match is under, if any (its anchor is the page's to make).
	Heading string `json:"heading"`
	Snippet string `json:"snippet"`
	// contains filtered or unexported fields
}

Hit is a page that matched a search, with the line that shows why.

type Library added in v0.16.154

type Library struct {
	Sections []Section
}

Library is the sections in reading order.

func Load added in v0.16.154

func Load(sources []Source, locale string) (Library, error)

Load reads the library in the locale. A broken local section (a bad section.json) is left out, not the library: the person's folder must never take the built-in documentation down with it.

func (Library) Find added in v0.16.154

func (l Library) Find(section, name string) (Doc, bool)

Find is the page of a section; the names are matched against the library, so nothing a caller sends reaches a path.

func (Library) Search added in v0.16.154

func (l Library) Search(query string, limit int) []Hit

Search finds the pages that have every word of the query, best first: a word in the title counts most, then in a heading, then in the text.

func (Library) Section added in v0.16.154

func (l Library) Section(id string) (Section, bool)

Section is the section of the id.

type Page

type Page struct {
	Name     string
	File     string
	Title    string
	Headings []string
}

Page is a page of the guide: its name (on the command line, in the address of the page), its file in the embedded docs, its title and its headings.

func Pages

func Pages(guide fs.FS, locale string) ([]Page, error)

Pages lists the guide in reading order (its files are numbered), and last the reference. The English files make the list; for another locale a page is that locale's file when it has one, else the English one.

type Section added in v0.16.154

type Section struct {
	ID       string `json:"id"`
	Title    string `json:"title"`
	Audience string `json:"audience"`
	Order    int    `json:"order"`
	Origin   string `json:"origin"`
	Pages    []Doc  `json:"pages"`
	// contains filtered or unexported fields
}

Section is a section of the library in one locale.

type Source added in v0.16.154

type Source struct {
	Origin string
	FS     fs.FS
	// Dir is the folder on disk of a local source (empty for the embedded one).
	Dir string
}

Source is one place the documentation is read from: the embedded docs or a folder on the machine.

func Builtin added in v0.16.154

func Builtin() Source

Builtin is the embedded documentation as a source.

func Sources added in v0.16.154

func Sources(localDirs []string) []Source

Sources are the built-in source and the local folders that exist.

Jump to

Keyboard shortcuts

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