Initialize repository with harness code and assets

Initial import of all source code, config, and README assets: the
packages workspace (cli, core, server, web, docs, landing, skills),
build scripts, tooling config, and CI workflows.

Includes the data-layout revision made on this branch: the local data
root defaults to ~/.penguin/data (PENGUIN_HOME still overrides; the
installer keeps its binaries in ~/.penguin), and every Agent lives
under <project>/agents/<agent>/ — path helpers, the three
agent-enumeration scans, the system prompt, built-in Skills, tests
and docs all follow the new layout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018ihk8iQuo3kv2aPjAYEPuR
This commit is contained in:
Yaowei Zheng
2026-07-19 14:06:53 +08:00
committed by GitHub
parent 056bed7aeb
commit 45bfae6e94
543 changed files with 92949 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
/**
* PenguinHarness CLI entry point.
*
* Only responsible for parsing CLI input into SDK arguments and rendering the streaming
* OmniMessage returned by the SDK.
* Loads .env on startup (e.g. locally configured ANTHROPIC_API_KEY / ANTHROPIC_BASE_URL).
*
* penguin config model add|default ...
* penguin chat ...
* penguin run --message ...
* penguin server|web ...
* Docs: packages/docs/content/cli.{zh,en}.md (site path /docs/cli).
*/
import "dotenv/config";
import { Command } from "commander";
import { VERSION } from "@prismshadow/penguin-core";
import { registerConfigCommand } from "./commands/config.js";
import { registerRunCommand } from "./commands/run.js";
import { registerChatCommand } from "./commands/chat.js";
import { registerServeCommands } from "./commands/serve.js";
import { defaultMessages } from "./i18n.js";
// Language comes from the PENGUIN_LANG env var (default en); used consistently for
// command/option descriptions and runtime output.
const t = defaultMessages();
const program = new Command();
program
.name("penguin")
.description(t.cliDescription)
.version(VERSION, "-v, --version", t.versionDesc);
registerConfigCommand(program, t);
registerRunCommand(program, t);
registerChatCommand(program, t);
registerServeCommands(program, t);
// Show help only when no subcommand is given (empty input); do not error.
program.action(() => {
program.outputHelp();
});
program.parseAsync(process.argv).catch((err: unknown) => {
process.stderr.write(`${err instanceof Error ? err.message : String(err)}\n`);
process.exitCode = 1;
});