{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "zai-org-zcode--package-and-test-zcode-command",
 "repo": "zai-org/ZCode",
 "repo_url": "https://github.com/zai-org/ZCode",
 "repo_slug": "zai-org-zcode",
 "title": "Package the zcode command and test it locally",
 "page_title": "How to package the zcode command and test it locally with ZCode",
 "summary": "Build the release bundle, unpack it to a debug folder and start Web mode from it.",
 "who": "A maintainer who needs to check the packaged zcode command before publishing it.",
 "problem": "Source runs do not prove the full release bundle works, so the packaged output needs its own test.",
 "outcome": "A tested unpacked zcode runtime that serves the web interface on port 3030 from the built bundle.",
 "steps": [
  "Set `ZCODE_DIST_BASE_URL` in `.env` or the environment, or pass `--base-url` to the build with your own hosting address.",
  "Run `pnpm build:zcode --base-url https://downloads.example.com/zcode/`, replacing the placeholder with the real download address.",
  "Read the version from dist/zcode/latest.json and extract `dist/zcode/releases/<version>/zcode-<version>.tar.gz` into `dist/zcode/debug`.",
  "Start the unpacked runtime with `node dist/zcode/debug/zcode/bin/zcode.mjs --web --workspace \"$PWD\" --port 3030 --no-open`. (inferred, check the README)",
  "Open `http://127.0.0.1:3030` in a browser to confirm the web page and agent run from the same backend."
 ],
 "agent_prompt": "In the zai-org/ZCode repo, run `pnpm build:zcode --base-url <download-root-url>`, extract the tarball listed in dist/zcode/latest.json into dist/zcode/debug, and start it with --web on port 3030. Report the URL and confirm that http://127.0.0.1:3030 returns a page.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "90 minutes",
 "basis": "readme",
 "caveat": "pnpm build:zcode only creates the release package and does not replace an existing zcode command already on PATH.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "Git",
  "Node.js 24.14.0 and pnpm 10.33.2, as pinned in mise.toml",
  "Clone of the zai-org/ZCode repository",
  "A local project folder to point the agent at"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/zai-org-zcode/package-and-test-zcode-command/",
 "md": "https://dedupedai.com/use-cases/zai-org-zcode/package-and-test-zcode-command/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/zai-org-zcode--package-and-test-zcode-command.json",
 "api_version": "v1"
}
