Files
penguin-harness/packages/cli
Yaowei Zheng b18ae8f5f1 feat(server,web): serve Workspace HTML previews from a separate origin (#46)
Serve "open in new tab" HTML previews from a separate origin (the loopback counterpart, or PENGUIN_PREVIEW_ORIGIN) with a signed, host-bound token, so localStorage/cookies/third-party embeds work while Agent-generated pages stay off the app origin. The app is canonicalized onto localhost and the preview host (127.0.0.1) serves only /preview/* — its /api answers 401 and app routes 302 to the canonical host — so the preview origin can neither set nor honor a session cookie.
2026-07-23 23:11:04 +08:00
..

@prismshadow/penguin-cli

The PenguinHarness command line. Installs the penguin command: an interactive REPL, a one-shot task runner, model / vault configuration, and the launcher for the Web service.

npm install -g @prismshadow/penguin-cli   # requires Node >= 24
penguin web        # start the Web service and open http://127.0.0.1:7364
penguin server     # same service, headless

penguin config model add --model-id deepseek-v4-pro --api-key sk-... --set-default

penguin run -m "Create hello.txt containing Hello, Penguin"    # one Task, then exit
penguin chat                                                   # REPL: /compact, /exit, Ctrl-C interrupts
penguin chat --resume                                          # resume the latest session

Tool calls go through an approval gate — --approve allow-all (default) | deny-all | read-only | always-ask. Data lives under ~/.penguin/data (PENGUIN_HOME or --root override); model credentials come from the Project config or provider env vars (e.g. DEEPSEEK_API_KEY).

Prefer a one-line install with a bundled Node runtime? See the installation guide.

Documentation

Development

pnpm penguin <args>                              # run from source (repo root, via tsx)
pnpm --filter @prismshadow/penguin-cli build     # tsup → dist/index.js (the penguin bin)
pnpm --filter @prismshadow/penguin-cli typecheck
pnpm --filter @prismshadow/penguin-cli test

Part of PenguinHarness · Apache-2.0