Skip to content

@ogygia/cli

Overview

The ogygia command line. It wires ogygia into a SvelteKit app, scaffolds a docs site, installs the AI skill and MCP server, judges pages against perf budgets in CI, and makes federation keys and typed widget stubs.

On this page

@ogygia/cli is the ogygia command. You rarely install it by hand: the ogygia package’s own ogygia bin passes every command on to it, running the copy installed in your app or the matching version through your package manager. It is not a plugin, so nothing goes in vite.config.ts for it.

Install

The first command adds it for you:

npx ogygia init
pnpm dlx ogygia init

init wires ogygia into the SvelteKit app in the current directory (the package, the Vite plugin, the server handle, the transport and the types) and adds @ogygia/cli to your devDependencies, so later npx ogygia commands run that local copy. To pin it yourself:

pnpm add -D @ogygia/cli

The commands

CommandWhat it doesGoes with
ogygia init [--markdown]Wires ogygia into an app; --markdown adds content collections.ogygia
ogygia site initScaffolds a docs site: a collection, its site(), routes and a DocsShell layout.@ogygia/content
ogygia ai · ogygia mcpInstalls the ogygia skill for AI agents and registers the MCP server; mcp runs the server.ogygia, @ogygia/devtools
ogygia perfRenders pages under the profiler on a running server and judges them against a budget.@ogygia/devtools
ogygia bisectFinds the first commit that made a page slower.@ogygia/devtools
ogygia keys <name>Makes an Ed25519 key pair for an app.@ogygia/federation
ogygia fragments <origin>Writes typed stubs for a peer’s widgets, from its catalog.@ogygia/federation

With other packages

The perf commands read the SSR profiler from @ogygia/devtools, so the server they measure lists devtools({ profiler: true }). A CI job builds, starts the server and runs:

npx ogygia perf --url http://127.0.0.1:4173 --pages /,/pricing \
  --baseline perf/baseline.json --budget perf/budget.json --md perf/comment.md

It exits with 1 when the budget fails, and the markdown file is ready to post as a PR comment (In CI). For the same checks inside a test suite, see @ogygia/testing.

Where to go next

  • Commands: every command and flag, and the tools of the MCP server.