Documentation
¶
Overview ¶
Package pgedgecli embeds the AI-facing index shipped in this repository so the binary can serve it anywhere it is installed, without a checkout of the repo.
Only the INDEX lives here. Each module embeds its own reference document alongside its code (internal/<module>/llms.txt), reached through module.Module's Reference method and printed by `pgedge llms <module>`. That split is deliberate: a single llms-full.txt covering every module cost an agent roughly 40k tokens to look up one flag, and it made module scope something the doc gates had to infer rather than read off the file it was in.
Agent skills live in the repo's skills/ tree and are distributed via external, format-native installers (see the README) — they are NOT embedded in the binary.
Index ¶
Constants ¶
const IndexSizeBudget = 28 * 1024
IndexSizeBudget bounds the size of the top-level llms.txt index.
The index exists because printing every module's reference cost the whole of that reference to look up one flag -- 314 KB across the four module documents as of this writing, and it only grows. Every section added to the index makes it a little more like the monolith it replaced, and before this budget there was no signal that a writer was spending against anything -- the design comment above cited a figure that had drifted to more than twice its stated value (#306).
It is set at the current size plus headroom, not at some ideal: the point is to make growth deliberate and visible, not to force a rewrite. Raising it is a fine thing to do on purpose, in a commit that says why.
The MODULE references are deliberately exempt. They are the targeted second read -- an agent reaches one only after the index has told it which -- so their size is paid by a caller who already knows they want that module, and byoc's is 131 KB precisely because it can be.
Variables ¶
var LLMS []byte
LLMS is the AI-agent index (llms.txt), printed by `pgedge llms`.
Functions ¶
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gendocs
command
Command gendocs regenerates the AI-agent reference documents from the live cobra tree.
|
Command gendocs regenerates the AI-agent reference documents from the live cobra tree. |
|
pgedge
command
|
|
|
vendorspec
command
Command vendorspec captures the published per-product OpenAPI contracts into openapi/.
|
Command vendorspec captures the published per-product OpenAPI contracts into openapi/. |
|
internal
|
|
|
apicall
Package apicall is the raw request behind `pgedge starfleet api` and `pgedge controlplane api`: one HTTP call to a path under the module's API base, over the module's own authenticated client, with the module's own status-to-exit mapping and the CLI's output formats.
|
Package apicall is the raw request behind `pgedge starfleet api` and `pgedge controlplane api`: one HTTP call to a path under the module's API base, over the module's own authenticated client, with the module's own status-to-exit mapping and the CLI's output formats. |
|
apidefaults
Package apidefaults owns platform-level API defaults: the pgEdge Starfleet base URL and its resolution rule (flag > profile > default).
|
Package apidefaults owns platform-level API defaults: the pgEdge Starfleet base URL and its resolution rule (flag > profile > default). |
|
atomicfile
Package atomicfile replaces a file in one step, so a reader arriving mid-write sees the whole old file or the whole new one and never a truncated one.
|
Package atomicfile replaces a file in one step, so a reader arriving mid-write sees the whole old file or the whole new one and never a truncated one. |
|
auth
Package auth resolves API credentials and manages cached access tokens per profile and module under ~/.pgedge/cli/cache/.
|
Package auth resolves API credentials and manages cached access tokens per profile and module under ~/.pgedge/cli/cache/. |
|
clitest
Package clitest assembles the full pgedge command tree for build-gate tests.
|
Package clitest assembles the full pgedge command tree for build-gate tests. |
|
config
Package config loads and saves the pgedge CLI configuration at ~/.pgedge/cli/config.yaml with named profiles carrying per-module sections.
|
Package config loads and saves the pgedge CLI configuration at ~/.pgedge/cli/config.yaml with named profiles carrying per-module sections. |
|
controlplane
Package controlplane implements the pgEdge Control Plane module of the unified pgedge CLI.
|
Package controlplane implements the pgEdge Control Plane module of the unified pgedge CLI. |
|
controlplane/api
Package api provides primitives to interact with the openapi HTTP API.
|
Package api provides primitives to interact with the openapi HTTP API. |
|
controlplane/cmd
Package cmd wires the pgEdge Control Plane command tree: the module root, its persistent connection flags, and the HTTP API client shared by every resource command.
|
Package cmd wires the pgEdge Control Plane command tree: the module root, its persistent connection flags, and the HTTP API client shared by every resource command. |
|
controlplane/svccfg
Package svccfg is a hand-written mirror of the Control Plane's per-service-type config key sets (mcp, rag, postgrest) at the CP release KeysFloor names.
|
Package svccfg is a hand-written mirror of the Control Plane's per-service-type config key sets (mcp, rag, postgrest) at the CP release KeysFloor names. |
|
docgen
Package docgen renders the command reference, the llms pages and the docs/reference pages, from the live cobra tree.
|
Package docgen renders the command reference, the llms pages and the docs/reference pages, from the live cobra tree. |
|
dryrun
Package dryrun records what a mutating command WOULD have sent, and stops it from being sent.
|
Package dryrun records what a mutating command WOULD have sent, and stops it from being sent. |
|
errbody
Package errbody repairs one specific lie an upstream proxy tells: an error response whose body is not JSON, served under a JSON Content-Type.
|
Package errbody repairs one specific lie an upstream proxy tells: an error response whose body is not JSON, served under a JSON Content-Type. |
|
httplog
Package httplog renders HTTP requests and responses to a diagnostic stream at an ordered level, and is the one place in this CLI that decides what must never be printed.
|
Package httplog renders HTTP requests and responses to a diagnostic stream at an ordered level, and is the one place in this CLI that decides what must never be printed. |
|
inspect
Package inspect runs read-only diagnostic queries against a Postgres database and renders the rows.
|
Package inspect runs read-only diagnostic queries against a Postgres database and renders the rows. |
|
inspect/inspecttest
Package inspecttest is a database/sql driver that answers queries from a script, so a command that runs an inspect analysis can be tested without a Postgres.
|
Package inspecttest is a database/sql driver that answers queries from a script, so a command that runs an inspect analysis can be tested without a Postgres. |
|
keychain
Package keychain stores the Starfleet client secret in the operating system's credential store: macOS Keychain, the Secret Service on Linux, Credential Manager on Windows.
|
Package keychain stores the Starfleet client secret in the operating system's credential store: macOS Keychain, the Secret Service on Linux, Credential Manager on Windows. |
|
metricfmt
Package metricfmt renders metric samples for text tables.
|
Package metricfmt renders metric samples for text tables. |
|
module
Package module defines the contract between the base pgedge CLI and its modules.
|
Package module defines the contract between the base pgedge CLI and its modules. |
|
reference
Package reference derives a module's reference pages from the files it embeds, and answers the routing questions `pgedge llms` and the generator ask of them.
|
Package reference derives a module's reference pages from the files it embeds, and answers the routing questions `pgedge llms` and the generator ask of them. |
|
selfupdate
Package selfupdate implements `pgedge self update`: resolving a release tag from a fetched release list, verifying the downloaded asset, and swapping it into place.
|
Package selfupdate implements `pgedge self update`: resolving a release tag from a fetched release list, verifying the downloaded asset, and swapping it into place. |
|
starfleet
Package cloud is the pgEdge Starfleet module: one product, one connection, three faces (account-level resources, byoc, managed).
|
Package cloud is the pgEdge Starfleet module: one product, one connection, three faces (account-level resources, byoc, managed). |
|
starfleet/account/api
Package api provides primitives to interact with the openapi HTTP API.
|
Package api provides primitives to interact with the openapi HTTP API. |
|
starfleet/account/cmd
Package cmd wires the account-level commands of the pgedge starfleet tree: authentication, API clients, tenants, invites and memberships — everything the accounts half of the Starfleet API owns.
|
Package cmd wires the account-level commands of the pgedge starfleet tree: authentication, API clients, tenants, invites and memberships — everything the accounts half of the Starfleet API owns. |
|
starfleet/byoc
Package byoc holds the byoc sub-tree of the starfleet module: its generated API client, its command tree and its reference pages.
|
Package byoc holds the byoc sub-tree of the starfleet module: its generated API client, its command tree and its reference pages. |
|
starfleet/byoc/api
Package api provides primitives to interact with the openapi HTTP API.
|
Package api provides primitives to interact with the openapi HTTP API. |
|
starfleet/byoc/cmd
Package cmd wires the pgEdge BYOC command tree: the module root, its persistent flags, and the authenticated API client shared by every resource command.
|
Package cmd wires the pgEdge BYOC command tree: the module root, its persistent flags, and the authenticated API client shared by every resource command. |
|
starfleet/cmd
Package cmd wires the pgedge starfleet command tree: the starfleet root, its persistent connection flags, the account-level commands (auth, doctor, tenant, client, invite, membership), and the byoc and managed sub-trees.
|
Package cmd wires the pgedge starfleet command tree: the starfleet root, its persistent connection flags, the account-level commands (auth, doctor, tenant, client, invite, membership), and the byoc and managed sub-trees. |
|
starfleet/conn
Package conn owns the single pgEdge Starfleet API connection: base-URL and credential precedence, the token exchange and cache, the shared HTTP client, and the exit codes every Starfleet module reports.
|
Package conn owns the single pgEdge Starfleet API connection: base-URL and credential precedence, the token exchange and cache, the shared HTTP client, and the exit codes every Starfleet module reports. |
|
starfleet/connstr
Package connstr assembles a libpq connection string from the parts a database GET returns, for the managed and byoc connection-string verbs.
|
Package connstr assembles a libpq connection string from the parts a database GET returns, for the managed and byoc connection-string verbs. |
|
starfleet/managed
Package managed holds the managed sub-tree of the starfleet module: its generated API client, its command tree and its reference pages.
|
Package managed holds the managed sub-tree of the starfleet module: its generated API client, its command tree and its reference pages. |
|
starfleet/managed/api
Package api provides primitives to interact with the openapi HTTP API.
|
Package api provides primitives to interact with the openapi HTTP API. |
|
starfleet/managed/cmd
Package cmd wires the pgEdge Managed command tree: the module root, its persistent flags, and the authenticated API client shared by every resource command.
|
Package cmd wires the pgEdge Managed command tree: the module root, its persistent flags, and the authenticated API client shared by every resource command. |
|
testsupport
Package testsupport holds the test fixtures every Starfleet module's command tree needs: an isolated Runtime, the stub token/resource server, and the authenticated-command runner.
|
Package testsupport holds the test fixtures every Starfleet module's command tree needs: an isolated Runtime, the stub token/resource server, and the authenticated-command runner. |