{"_id":"@turboforge/cli-kit","_rev":"2-6afc961bc40723b62e580c24ab0684e3","name":"@turboforge/cli-kit","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@turboforge/cli-kit","version":"1.0.0","keywords":["turboforge","cli","monorepo","config-loader","workspace-detection","logger","typescript","node-js","tooling"],"author":{"name":"Mayank Kumar Chaudhari","email":"https://mayankchaudhari.com"},"license":"MIT","_id":"@turboforge/cli-kit@1.0.0","maintainers":[{"name":"mayank1513","email":"mayank.srmu@gmail.com"}],"homepage":"https://github.com/turboforge-dev/turboforge/blob/main/packages/cli-kit/README.md","bugs":{"url":"https://github.com/turboforge-dev/turboforge/issues"},"dist":{"shasum":"dae72d1073f4f41714f29de7c66ee7ade935a954","tarball":"https://registry.npmjs.org/@turboforge/cli-kit/-/cli-kit-1.0.0.tgz","fileCount":7,"integrity":"sha512-eLIPIPFTaJ6K2pRaK+5/iu2c6FkQnXPOeNQIhhFngHT5uoFG0tj3jU6K0bJiJZrxvLNKQ7vTE7Lkg2Yjv/b4Ww==","signatures":[{"sig":"MEUCIQDWhSxVWThwdgNW5xH9bwdfYzDNXaGrE8mq8AlkoyEYFAIgY/gXJfgUFQdNeCIfO1C3SC0e23VqSWYoW7Pv6Hmbusw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35464},"main":"./dist/index.js","_from":"file:turboforge-cli-kit-1.0.0.tgz","forge":{"icon":"Terminal","aliases":["@turbo-forge/cli-kit"],"description":"CLI & Config Utilities"},"types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./package.json":"./package.json"},"funding":[{"url":"https://github.com/sponsors/turboforge-dev","type":"github"},{"url":"https://github.com/sponsors/mayank1513","type":"github"}],"private":false,"scripts":{"dev":"tsup --watch","build":"tsup && gzip -c dist/index.js | wc -c","clean":"rm -rf dist"},"_npmUser":{"name":"mayank1513","email":"mayank.srmu@gmail.com"},"_resolved":"/tmp/4169c9cbc6f6f402c9624e8f31fe614c/turboforge-cli-kit-1.0.0.tgz","_integrity":"sha512-eLIPIPFTaJ6K2pRaK+5/iu2c6FkQnXPOeNQIhhFngHT5uoFG0tj3jU6K0bJiJZrxvLNKQ7vTE7Lkg2Yjv/b4Ww==","repository":{"url":"git+https://github.com/turboforge-dev/turboforge.git","type":"git","directory":"packages/cli-kit"},"_npmVersion":"11.9.0","description":"Low-level utilities and configuration resolution for building high-performance CLI tools in monorepos.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"defu":"^6.1.4","jiti":"^2.6.1","tsup":"^8.5.1","typescript":"^5.9.3","@types/node":"^25.5.0"},"peerDependencies":{"defu":"^6.0.0","jiti":"^2.0.0","yaml":"^2.0.0"},"peerDependenciesMeta":{"defu":{"optional":true},"jiti":{"optional":true},"yaml":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/cli-kit_1.0.0_1773944566614_0.1033488828436957","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@turboforge/cli-kit","author":{"name":"Mayank Kumar Chaudhari","email":"https://mayankchaudhari.com"},"private":false,"version":"1.0.1","description":"Low-level utilities and configuration resolution for building high-performance CLI tools in monorepos.","license":"MIT","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./package.json":"./package.json"},"forge":{"icon":"Terminal","description":"CLI & Config Utilities","aliases":["@turboforge/cli-kit"]},"repository":{"type":"git","url":"git+https://github.com/turboforge-dev/turboforge.git","directory":"packages/cli-kit"},"bugs":{"url":"https://github.com/turboforge-dev/turboforge/issues"},"homepage":"https://github.com/turboforge-dev/turboforge/blob/main/packages/cli-kit/README.md","sideEffects":false,"devDependencies":{"@types/node":"^25.7.0","defu":"^6.1.7","jiti":"^2.7.0","tsup":"^8.5.1","typescript":"^6.0.3"},"funding":[{"type":"github","url":"https://github.com/sponsors/turboforge-dev"},{"type":"github","url":"https://github.com/sponsors/mayank1513"}],"peerDependencies":{"defu":"^6.0.0","jiti":"^2.0.0","yaml":"^2.0.0"},"peerDependenciesMeta":{"defu":{"optional":true},"jiti":{"optional":true},"yaml":{"optional":true}},"keywords":["turboforge","cli","monorepo","config-loader","workspace-detection","logger","typescript","node-js","tooling"],"scripts":{"build":"tsup","clean":"rm -rf dist","dev":"tsup --watch"},"_id":"@turboforge/cli-kit@1.0.1","_integrity":"sha512-XUN0DVGiJyPTxZX0qNGMvSwRZxOZahcbh3Bd/Yv1gCDlb1ZaOez7iLNv2BmPeKbZ8Ym/raGMBfS3qyZ6tqcj3Q==","_resolved":"/tmp/c060d8e927501bd5143c6f3b3f72d1ad/turboforge-cli-kit-1.0.1.tgz","_from":"file:turboforge-cli-kit-1.0.1.tgz","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-XUN0DVGiJyPTxZX0qNGMvSwRZxOZahcbh3Bd/Yv1gCDlb1ZaOez7iLNv2BmPeKbZ8Ym/raGMBfS3qyZ6tqcj3Q==","shasum":"956bb2c53700cfd50e879987570542f5fc9455e0","tarball":"https://registry.npmjs.org/@turboforge/cli-kit/-/cli-kit-1.0.1.tgz","fileCount":7,"unpackedSize":35784,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@turboforge%2fcli-kit@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBsllX6/b/JK9P9g8Yw+eoW4IJc8M6UrUcI9To/VqkuNAiEAkTHhWtyXVqOdnOStXGdN6Rg4Nc3ouhUODWps6DaOuSc="}]},"_npmUser":{"name":"mayank1513","email":"mayank.srmu@gmail.com"},"directories":{},"maintainers":[{"name":"mayank1513","email":"mayank.srmu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli-kit_1.0.1_1778664897322_0.3281466671736264"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-19T18:22:46.529Z","modified":"2026-05-13T09:34:57.767Z","1.0.0":"2026-03-19T18:22:46.758Z","1.0.1":"2026-05-13T09:34:57.465Z"},"bugs":{"url":"https://github.com/turboforge-dev/turboforge/issues"},"author":{"name":"Mayank Kumar Chaudhari","email":"https://mayankchaudhari.com"},"license":"MIT","homepage":"https://github.com/turboforge-dev/turboforge/blob/main/packages/cli-kit/README.md","keywords":["turboforge","cli","monorepo","config-loader","workspace-detection","logger","typescript","node-js","tooling"],"repository":{"type":"git","url":"git+https://github.com/turboforge-dev/turboforge.git","directory":"packages/cli-kit"},"description":"Low-level utilities and configuration resolution for building high-performance CLI tools in monorepos.","maintainers":[{"name":"mayank1513","email":"mayank.srmu@gmail.com"}],"readme":"# @turboforge/cli-kit\n\nBuild monorepo-aware CLIs without rewriting config loading, workspace detection, and logging every time.\n\n<p className=\"flex gap-2\">\n  <a href=\"https://github.com/turboforge-dev/turboforge/actions/workflows/ci.yml\" rel=\"noopener noreferrer\">\n    <img alt=\"CI\" src=\"https://github.com/turboforge-dev/turboforge/actions/workflows/ci.yml/badge.svg\" />\n  </a>\n  <a href=\"https://codecov.io/gh/turboforge-dev/turboforge/tree/main/packages/@turboforge/cli-kit\" rel=\"noopener noreferrer\">\n    <img alt=\"codecov\" src=\"https://codecov.io/gh/turboforge-dev/turboforge/graph/badge.svg?flag=@turboforge/cli-kit\" />\n  </a>\n  <a href=\"https://npmjs.com/package/@turboforge/cli-kit\" rel=\"noopener noreferrer\">\n    <img alt=\"npm version\" src=\"https://img.shields.io/npm/v/@turboforge/cli-kit\" />\n  </a>\n  <a href=\"https://npmjs.com/package/@turboforge/cli-kit\" rel=\"noopener noreferrer\">\n    <img alt=\"npm downloads\" src=\"https://img.shields.io/npm/d18m/@turboforge/cli-kit\" />\n  </a>\n  <a href=\"https://npmjs.com/package/@turboforge/cli-kit\" rel=\"noopener noreferrer\">\n    <img alt=\"npm bundle size\" src=\"https://img.shields.io/bundlephobia/minzip/@turboforge/cli-kit\" />\n  </a>\n  <img alt=\"license\" src=\"https://img.shields.io/npm/l/@turboforge/cli-kit\" />\n</p>\n\n`@turboforge/cli-kit` exists because internal tooling usually starts as one script, then turns into five slightly different scripts with different root-detection rules, different config formats, and no shared mental model. This package gives Turboforge and downstream tools a common foundation.\n\nPart of the Turboforge system:\n\n- use [`@turboforge/sync`](/c:/Users/G/web/open-source/turbo-forge/packages/forge-sync/README.md) when the problem is keeping a repo aligned with its upstream shape\n- use `@turboforge/cli-kit` when the problem is building the repo-aware tools that operate inside that shape\n\n## Highlights\n\n- Resolve layered config from defaults, files, env, and CLI input.\n- Detect project roots and workspace packages without repo-specific glue code.\n- Share one logging and runtime foundation across multiple repo tools.\n\n## Why It Exists\n\nMost CLI helpers are either too generic to understand monorepos or too entangled with one app to reuse cleanly.\n\n`@turboforge/cli-kit` focuses on the boring parts every serious repo tool needs:\n\n- find the real project root\n- discover workspace packages\n- load layered config from the right place\n- log in a way that works for both humans and automation\n\n## Real Example\n\nYou are building `repo doctor`, `release check`, and `docs sync` commands for the same workspace.\n\nWithout a shared kit, each command re-implements:\n\n- \"where is the repo root?\"\n- \"which packages belong to this workspace?\"\n- \"which config wins: default, file, env, or CLI flag?\"\n\nWith `@turboforge/cli-kit`, those decisions become shared infrastructure instead of repeated code.\n\n## When To Use It\n\n- You are building internal or OSS CLIs that need monorepo awareness.\n- You want layered config resolution without writing a config loader from scratch.\n- You need a small foundation, not a full CLI framework.\n\n## When Not To Use It\n\n- You only need argument parsing.\n- Your tool does not care about workspaces, repo roots, or shared config.\n- You want a batteries-included command framework with prompts, subcommands, and plugin loading out of the box.\n\n## 📦 Installation\n\n```bash\npnpm add @turboforge/cli-kit\n```\n\n**_or_**\n\n```bash\n$ npm install @turboforge/cli-kit\n```\n\n**_or_**\n\n```bash\n$ yarn add @turboforge/cli-kit\n```\n\n### Optional Peer Dependencies\n\n```bash\npnpm add -D jiti defu\n```\n\n- `jiti` lets you load TypeScript config files at runtime.\n- `defu` gives you richer object merge behavior.\n\n## Example\n\n```ts\nimport {\n  createLogger,\n  findProjectRoot,\n  getWorkspacePackages,\n  resolveConfig,\n} from \"@turboforge/cli-kit\";\n\nconst logger = createLogger({ level: \"info\", name: \"repo-doctor\" });\nconst root = await findProjectRoot();\nconst packages = await getWorkspacePackages(root);\n\nconst config = await resolveConfig({\n  name: \"repo-doctor\",\n  defaults: { fix: false },\n});\n\nlogger.info(`checking ${packages.length} packages`, config.fix);\n```\n\n## What You Get\n\n- `resolveConfig`: layered config for repo tools\n- `findProjectRoot`: stable root detection\n- `getWorkspacePackages`: workspace discovery\n- `createLogger`: structured output for local use and automation\n\n## Ecosystem Fit\n\nIf Turboforge is about keeping a monorepo coherent, `@turboforge/cli-kit` is the layer you build that coherence on top of.\n","readmeFilename":"README.md"}