{"_id":"@commonforge-org/cli","_rev":"2-518771804bb14e54b156e65495e03d80","name":"@commonforge-org/cli","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.0-stage":{"name":"@commonforge-org/cli","version":"0.0.0-stage","_id":"@commonforge-org/cli@0.0.0-stage","stub":true,"maintainers":[{"name":"build3r-dev","email":"dustin@build3r.io"}],"dist":{"shasum":"01ff42cf0f0926d129388145977a210872083f4d","tarball":"https://registry.npmjs.org/@commonforge-org/cli/-/cli-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-jtoavkwhxlFhH83wZEql5zQJVTcyIHqDqDAozRPSIED8JX/JSMDXSin/9PRt7kgFJI2X7V/34Ao4aV5x/b0u5w==","signatures":[{"sig":"MEYCIQCTAdul0cdDakBrNtRh/8rvJ3RxhC042zA0Hl1KgqE6BgIhAK/uaRTU2h1GfjdIettpFS0VjYCxceqbvZEer/wcrOxd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":342},"_npmUser":{"name":"build3r-dev","email":"dustin@build3r.io"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.1.0":{"_id":"@commonforge-org/cli@0.1.0","bin":{"cforge":"dist/index.js"},"bugs":{"url":"https://github.com/CommonForge-org/commonforge/issues"},"dist":{"shasum":"672e14cb4755c98930c55fe76775729b35c88cd1","tarball":"https://registry.npmjs.org/@commonforge-org/cli/-/cli-0.1.0.tgz","fileCount":5,"integrity":"sha512-7LkSazYdSXtzyGJo25MZQw6VOdLOUmgcv7pdGftSzDGudg6ttXOEOrd9hiD9KH+4cUaF5VMOBHMah2UyyAgn6g==","signatures":[{"sig":"MEUCIQDwvl7zi5xamXTE0DXksSok86YYedjTDd1D2wuixlXjPgIgOMw0eJMvi2dzskb92Zf23hwlVVC/Au5YIanjjssBuyY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCgV9wTPsnfKQxBpxA+re02JT43iiMvbzBJKyriv/7STQIgOTHvo0AhrhkN7a3FuYgCx0zlH2d9eUk8M7a4Roxo1yI="}],"unpackedSize":968098},"name":"@commonforge-org/cli","type":"module","engines":{"node":">=22"},"exports":{"./package.json":"./package.json"},"license":"MIT","scripts":{"dev":"tsx src/index.ts","mcpb":"node scripts/bundle.mjs && node scripts/mcpb.mjs","test":"vitest run","build":"node scripts/bundle.mjs","typecheck":"tsc -p tsconfig.json --noEmit"},"version":"0.1.0","_npmUser":{"name":"build3r-dev","email":"dustin@build3r.io"},"homepage":"https://github.com/CommonForge-org/commonforge/tree/main/apps/cli#readme","keywords":["commonforge","cli","git","agents","cloudflare"],"repository":{"url":"git+https://github.com/CommonForge-org/commonforge.git","type":"git","directory":"apps/cli"},"description":"CommonForge developer CLI (cforge): check out, checkpoint and submit CommonForge task workspaces with plain git","directories":{},"maintainers":[{"name":"build3r-dev","email":"dustin@build3r.io"}],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.15","zod":"^4.6.5","vitest":"^4.1.11","esbuild":"~0.28.2","typescript":"^7.0.2","@types/node":"^26.6.4","@commonforge-org/core":"0.0.0","@commonforge-org/runner-protocol":"0.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.0_1792001585385_0.08088378625933612"}}},"time":{"created":"2026-10-14T18:10:56.660Z","modified":"2026-10-14T18:13:06.512Z","0.0.0-stage":"2026-10-14T18:10:56.660Z","0.1.0":"2026-10-14T18:13:05.473Z"},"description":"CommonForge developer CLI (cforge): check out, checkpoint and submit CommonForge task workspaces with plain git","maintainers":[{"name":"build3r-dev","email":"dustin@build3r.io"}],"readme":"# cforge\n\nThe CommonForge developer CLI. `cforge` checks a CommonForge task out as ordinary git\nrepositories, then pushes and freezes your work as candidates for review. Git talks to\nCommonForge through `cforge credential-helper`, so no token is written to disk, to git config or\nto the workspace.\n\nRequires Node.js 22 or later and `git` (plus `git-lfs` for folders that use Git LFS).\n\n## Install\n\n```sh\nnpm install -g @commonforge-org/cli\ncforge --version\n```\n\n## Point it at your CommonForge API\n\nThere is no hosted default. Pass the API URL of the CommonForge deployment you use, once:\n\n```sh\ncforge login --api-url https://api.example.com --email you@example.com\n```\n\n`cforge login` remembers the URL in its config file. You can also set it per command with\n`--api-url <url>` or the `CFORGE_API_URL` environment variable. With none of these, cforge uses\n`http://localhost:8787` (a local `wrangler dev` worker). Plain `http` is only accepted for\nlocalhost.\n\n## Sign in\n\n```sh\ncforge login --email you@example.com      # emails a one-time code, then asks you to paste it\ncforge login --code cfm_...               # or finish later with the code (or the emailed link);\n                                          # pass the same --api-url if you have not logged in before\ncforge whoami\ncforge logout\n```\n\nThe session is stored with mode 0600 in your config directory (`~/.config/commonforge` on\nLinux, `~/Library/Application Support/commonforge` on macOS, `%APPDATA%\\commonforge` on\nWindows; override with `CFORGE_CONFIG_DIR`).\n\n## Find a task\n\n```sh\ncforge project list\ncforge project tasks <projectId>\n```\n\nIf you belong to more than one organization, add `--org <orgId>` (or set `CFORGE_ORG`).\n\n## Check out\n\n```sh\ncforge checkout <taskId> ./work\n```\n\nThis takes the task's lease, clones each folder of the task into `./work/<mount>`, and verifies\nthe result against the server's plan. Options: `--lease-ttl <seconds>`, `--wait <seconds>`\n(wait for a lease someone else holds).\n\n## Save and submit\n\nInside the checkout, work with git as usual. Then:\n\n```sh\ncforge checkpoint --commit \"WIP\"          # push a recoverable checkpoint (not frozen)\ncforge submit --commit \"Fix the quote\"    # push, then freeze: prints the candidate id(s)\n```\n\nBoth commit everything first when you pass `--commit <message>`; without it only committed work\nis pushed. `--mount <name>` (repeatable) limits them to some folders, `--workspace <dir>` runs\nthem from outside the checkout. `submit` also takes `--tool <name>` to record what produced the\nchange.\n\n## Check status\n\n```sh\ncforge status              # inside a checkout\ncforge status <taskId>     # anywhere\n```\n\nShows the task, its lease, its candidates and the local checkout.\n\n## For agents and scripts\n\nEvery command takes `--json` and then prints exactly one JSON document on stdout (errors too,\nwith a non-zero exit code). An agent can be handed a task lease instead of a login:\n`CFORGE_LEASE_TOKEN` together with `CFORGE_LEASE_API_URL`, the API that issued it.\n\nRun `cforge --help` or `cforge <command> --help` for every command and option, including\n`task create|lease|release` and `export`.\n\n## Use it from an AI app (MCP)\n\n`cforge mcp` serves these commands as MCP tools on stdio: `sign_in`, `who_am_i`, `list_projects`,\n`list_tasks`, `create_task`, `get_task`, `checkout_task`, `save_progress` and `submit_task`. Each\ntool runs the matching command with `--json`, as the signed-in person, with the same config\ndirectory, so the CLI and the app share one sign-in.\n\n- **Claude Desktop:** install `commonforge.mcpb` (the repository's latest release; build it with\n  `pnpm --filter @commonforge-org/cli mcpb`, which writes `dist/commonforge.mcpb`). It carries the\n  CLI, so nothing else needs installing.\n- **Claude Code:** `/plugin install commonforge --marketplace CommonForge-org/commonforge` (the\n  plugin adds the server and a skill for the task routine; on Claude Code before 2.1.275, run\n  `/plugin marketplace add CommonForge-org/commonforge`, then `/plugin install\n  commonforge@commonforge`), or `claude mcp add --scope user commonforge -- cforge mcp`.\n- **Codex:** add to `~/.codex/config.toml`:\n\n  ```toml\n  [mcp_servers.commonforge]\n  command = \"npx\"\n  args = [\"-y\", \"@commonforge-org/cli\", \"mcp\"]\n  ```\n\nThen get a sign-in code on the app's **Account** page and paste the message into the chat; the\nagent passes it to `sign_in`. Checking out and submitting need an app that can edit local files.\n\n`sign_in` will not move a live sign-in to another address (text the agent reads could otherwise\npoint it at another server): sign out of the current one first. `cforge mcp --api-url <url>` (or\n`CFORGE_API_URL`) keeps it to one address.\n\n## License\n\nMIT. The bundled third-party code and its licences are listed in\n`dist/THIRD_PARTY_LICENSES.txt`.\n","readmeFilename":"","homepage":"https://github.com/CommonForge-org/commonforge/tree/main/apps/cli#readme","keywords":["commonforge","cli","git","agents","cloudflare"],"repository":{"url":"git+https://github.com/CommonForge-org/commonforge.git","type":"git","directory":"apps/cli"},"bugs":{"url":"https://github.com/CommonForge-org/commonforge/issues"},"license":"MIT"}