{"_id":"nocobase","_rev":"6-c513a7f6d3dd3fa80a35db706a4724f6","name":"nocobase","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"nocobase","version":"0.1.0","keywords":[],"author":"","license":"Apache-2.0","_id":"nocobase@0.1.0","maintainers":[{"name":"chenos","email":"chenlinxh@gmail.com"}],"homepage":"https://github.com/nocobase/nocobase#readme","bugs":{"url":"https://github.com/nocobase/nocobase/issues"},"bin":{"nocobase":"bin/run.js"},"dist":{"shasum":"ec4837e25993a40f7f912ec4d412a33eaa2b64ed","tarball":"https://registry.npmjs.org/nocobase/-/nocobase-0.1.0.tgz","fileCount":35,"integrity":"sha512-2HrJXkvsrYReCZu5JTWL7DG+Kaf0SpnRORPAXMHJPUbaYmr7JBnW2/2FrGTolkrtO3AUraSxEj/Qh4jJ1ZJ+3w==","signatures":[{"sig":"MEUCIQDPSbBcjPe4pCRUmungyeAsD+mohqNPCK9kVPB1tIRlRwIgK6fAqHFu3HS6HNJQdC5wk7P5iRTr9r54wGiAgpGIp20=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":99452},"main":"dist/generated/command-registry.js","type":"module","oclif":{"bin":"nocobase","topics":{"server":{"description":"Manage NocoBase server connections and update command runtimes."},"resource":{"description":"Work with generic collection resources."}},"dirname":"nocobase-cli","commands":{"target":"./dist/generated/command-registry.js","strategy":"explicit"},"topicSeparator":" ","additionalHelpFlags":["-h"]},"gitHead":"0ee028d3eaaf7a14f66f9aab04388740de1e2bce","scripts":{"dev":"./bin/dev.js","test":"echo \"Error: no test specified\" && exit 1","build":"pnpm run clean && tsc -p tsconfig.json","clean":"rm -rf dist"},"_npmUser":{"name":"chenos","email":"chenlinxh@gmail.com"},"repository":{"url":"git+https://github.com/nocobase/nocobase.git","type":"git","directory":"nocobase-cli"},"_npmVersion":"10.8.2","description":"NocoBase CLI","directories":{},"_nodeVersion":"20.19.5","dependencies":{"ora":"^8.2.0","picocolors":"^1.1.1","@oclif/core":"^4.10.4","openapi-types":"^12.1.3","@apidevtools/swagger-parser":"^12.1.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","typescript":"^6.0.2","@types/node":"^18.19.130"},"_npmOperationalInternal":{"tmp":"tmp/nocobase_0.1.0_1775611856608_0.9498173339366134","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"nocobase","version":"0.1.1","keywords":[],"author":"","license":"Apache-2.0","_id":"nocobase@0.1.1","maintainers":[{"name":"chenos","email":"chenlinxh@gmail.com"}],"homepage":"https://github.com/nocobase/nocobase#readme","bugs":{"url":"https://github.com/nocobase/nocobase/issues"},"bin":{"nocobase":"bin/run.js"},"dist":{"shasum":"4edd0819a92b0f39e365add372bc7a349191ce1f","tarball":"https://registry.npmjs.org/nocobase/-/nocobase-0.1.1.tgz","fileCount":35,"integrity":"sha512-AhoyOUis87rSBGGFcqMEM10blc9w59SUFdGOZRip6xxr3DR6xpJ4XwdeRNZa2VgnhLkL/q/J4xgCCzysELfaMg==","signatures":[{"sig":"MEQCIHXox1H4WJtUSDxU3UNCgEyHHuL1aXNnvMN6FFI/2bUaAiAoIHyYby4/0AvhrfS6Mvd6uMu1x9jBCqUIdyqNiROoqg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":99452},"main":"dist/generated/command-registry.js","type":"module","oclif":{"bin":"nocobase","topics":{"server":{"description":"Manage NocoBase server connections and update command runtimes."},"resource":{"description":"Work with generic collection resources."}},"dirname":"nocobase-cli","commands":{"target":"./dist/generated/command-registry.js","strategy":"explicit"},"topicSeparator":" ","additionalHelpFlags":["-h"]},"gitHead":"0ee028d3eaaf7a14f66f9aab04388740de1e2bce","scripts":{"dev":"./bin/dev.js","test":"echo \"Error: no test specified\" && exit 1","build":"pnpm run clean && tsc -p tsconfig.json","clean":"rm -rf dist"},"_npmUser":{"name":"chenos","email":"chenlinxh@gmail.com"},"repository":{"url":"git+https://github.com/nocobase/nocobase.git","type":"git","directory":"nocobase-cli"},"_npmVersion":"10.8.2","description":"NocoBase CLI","directories":{},"_nodeVersion":"20.19.5","dependencies":{"ora":"^8.2.0","picocolors":"^1.1.1","typescript":"^6.0.2","@oclif/core":"^4.10.4","openapi-types":"^12.1.3","@apidevtools/swagger-parser":"^12.1.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","@types/node":"^18.19.130"},"_npmOperationalInternal":{"tmp":"tmp/nocobase_0.1.1_1775612133646_0.03910871021852369","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"nocobase","version":"0.1.2","keywords":[],"author":"","license":"Apache-2.0","_id":"nocobase@0.1.2","maintainers":[{"name":"chenos","email":"chenlinxh@gmail.com"}],"homepage":"https://github.com/nocobase/nocobase#readme","bugs":{"url":"https://github.com/nocobase/nocobase/issues"},"bin":{"nocobase":"bin/run.js"},"dist":{"shasum":"b7f69869d3bbe5443dca36cec5ca4f1f9c4d5fc3","tarball":"https://registry.npmjs.org/nocobase/-/nocobase-0.1.2.tgz","fileCount":35,"integrity":"sha512-8UmbtVSJQBGYGOpw7mwkK8tJh2yQ2dyy1iqAdX8zK5I32x9p+zbjjgnD/b4UYJUxixX/TlmT7yFwsKW71IgifQ==","signatures":[{"sig":"MEUCIFGiQrfHjs0nka3tNRZIcz6QdlYq6Cxy9D4n3DMASDgtAiEAspGg73J5NmTZdrjkyhwMUti2utJWQzoMvKj8Xr3lDfo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":99420},"main":"dist/generated/command-registry.js","type":"module","oclif":{"bin":"nocobase","topics":{"server":{"description":"Manage NocoBase server connections and update command runtimes."},"resource":{"description":"Work with generic collection resources."}},"dirname":"nocobase-cli","commands":{"target":"./dist/generated/command-registry.js","strategy":"explicit"},"topicSeparator":" ","additionalHelpFlags":["-h"]},"gitHead":"0ee028d3eaaf7a14f66f9aab04388740de1e2bce","scripts":{"dev":"./bin/dev.js","test":"echo \"Error: no test specified\" && exit 1","build":"pnpm run clean && tsc -p tsconfig.json","clean":"rm -rf dist"},"_npmUser":{"name":"chenos","email":"chenlinxh@gmail.com"},"repository":{"url":"git+https://github.com/nocobase/nocobase.git","type":"git","directory":"nocobase-cli"},"_npmVersion":"10.8.2","description":"NocoBase CLI","directories":{},"_nodeVersion":"20.19.5","dependencies":{"ora":"^8.2.0","picocolors":"^1.1.1","typescript":"^6.0.2","@oclif/core":"^4.10.4","openapi-types":"^12.1.3","@apidevtools/swagger-parser":"^12.1.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","@types/node":"^18.19.130"},"_npmOperationalInternal":{"tmp":"tmp/nocobase_0.1.2_1775612538782_0.6753784950254071","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"nocobase","version":"0.1.3","keywords":[],"author":"","license":"Apache-2.0","_id":"nocobase@0.1.3","maintainers":[{"name":"chenos","email":"chenlinxh@gmail.com"}],"homepage":"https://github.com/nocobase/nocobase#readme","bugs":{"url":"https://github.com/nocobase/nocobase/issues"},"bin":{"nocobase":"bin/run.js"},"dist":{"shasum":"c622ec5407f647e4ee41ea5bab668c9ff7aedef4","tarball":"https://registry.npmjs.org/nocobase/-/nocobase-0.1.3.tgz","fileCount":35,"integrity":"sha512-Qmo5LARJZyeqTmla+aiBRWLnqUTBJ/GSIvNLxIO/SDF50nZZymJy1JYkOqQnDvc1IjEFmdMd51qDJKS4fR9aAw==","signatures":[{"sig":"MEUCIQC1D/OLQCQ+Ov7z1EmNzCkJx6kAri5qYR35ZKlupmz1yAIgVoC/13T+zj1dcm90/hLB0kYqYmPPHJCXoxH8/DiD/l8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":99470},"main":"dist/generated/command-registry.js","type":"module","oclif":{"bin":"nocobase","topics":{"server":{"description":"Manage NocoBase server connections and update command runtimes."},"resource":{"description":"Work with generic collection resources."}},"dirname":"nocobase-cli","commands":{"target":"./dist/generated/command-registry.js","strategy":"explicit"},"topicSeparator":" ","additionalHelpFlags":["-h"]},"gitHead":"aeedd228176ee99955c72ad772aa9be790800e37","scripts":{"dev":"./bin/dev.js","test":"echo \"Error: no test specified\" && exit 1","build":"pnpm run clean && tsc -p tsconfig.json","clean":"rm -rf dist"},"_npmUser":{"name":"chenos","email":"chenlinxh@gmail.com"},"repository":{"url":"git+https://github.com/nocobase/nocobase.git","type":"git","directory":"nocobase-cli"},"_npmVersion":"10.8.2","description":"NocoBase CLI","directories":{},"_nodeVersion":"20.19.5","dependencies":{"ora":"^8.2.0","picocolors":"^1.1.1","typescript":"^6.0.2","@oclif/core":"^4.10.4","openapi-types":"^12.1.3","@apidevtools/swagger-parser":"^12.1.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","@types/node":"^18.19.130"},"_npmOperationalInternal":{"tmp":"tmp/nocobase_0.1.3_1775627660388_0.8442486259884492","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"nocobase","version":"0.1.4","keywords":[],"author":"","license":"Apache-2.0","_id":"nocobase@0.1.4","maintainers":[{"name":"chenos","email":"chenlinxh@gmail.com"}],"homepage":"https://github.com/nocobase/nocobase#readme","bugs":{"url":"https://github.com/nocobase/nocobase/issues"},"bin":{"nocobase":"bin/run.js"},"dist":{"shasum":"a2a3166333934fbbd7e88efb0b77fab3a0783537","tarball":"https://registry.npmjs.org/nocobase/-/nocobase-0.1.4.tgz","fileCount":37,"integrity":"sha512-DARDf4GiQv/Cb2m0dQDPyh8aEBEMaLPK3HhVD0eDGpnNd1hlTGsmFg5rnH3bXCGc/Qz/4aaJOkMSqSnyDzF10g==","signatures":[{"sig":"MEYCIQCb2hWP0V6NABViEBVytyC7FBaJdznB9pnAhcaOxcNZ6QIhALBqjdveeoi3hG3KOUTVt/DxfalCgX9fLs/taBI5kTqA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":106311},"main":"dist/generated/command-registry.js","type":"module","oclif":{"bin":"nocobase","topics":{"env":{"description":"Manage NocoBase project environments and update command runtimes."},"resource":{"description":"Work with generic collection resources."}},"dirname":"nocobase-cli","commands":{"target":"./dist/generated/command-registry.js","strategy":"explicit"},"topicSeparator":" ","additionalHelpFlags":["-h"]},"gitHead":"e92ce3146d37605f7b2ba2d76946d03d7a38f98a","scripts":{"dev":"./bin/dev.js","test":"echo \"Error: no test specified\" && exit 1","build":"pnpm run clean && tsc -p tsconfig.json","clean":"rm -rf dist"},"_npmUser":{"name":"chenos","email":"chenlinxh@gmail.com"},"repository":{"url":"git+https://github.com/nocobase/nocobase.git","type":"git","directory":"nocobase-cli"},"_npmVersion":"10.8.2","description":"NocoBase CLI","directories":{},"_nodeVersion":"20.19.5","dependencies":{"ora":"^8.2.0","picocolors":"^1.1.1","typescript":"^6.0.2","@oclif/core":"^4.10.4","openapi-types":"^12.1.3","@apidevtools/swagger-parser":"^12.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","@types/node":"^18.19.130"},"_npmOperationalInternal":{"tmp":"tmp/nocobase_0.1.4_1775695691253_0.8724349322365315","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"nocobase","version":"0.1.5","description":"NocoBase CLI","type":"module","main":"dist/generated/command-registry.js","scripts":{"clean":"rm -rf dist","build":"pnpm run clean && tsc -p tsconfig.json","dev":"./bin/dev.js","test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"Apache-2.0","bin":{"nocobase":"bin/run.js"},"oclif":{"bin":"nocobase","additionalHelpFlags":["-h"],"commands":{"strategy":"explicit","target":"./dist/generated/command-registry.js"},"dirname":"nocobase-cli","topicSeparator":" ","topics":{"env":{"description":"Manage NocoBase project environments and update command runtimes."},"resource":{"description":"Work with generic collection resources."}}},"dependencies":{"@apidevtools/swagger-parser":"^12.1.0","@oclif/core":"^4.10.4","openapi-types":"^12.1.3","ora":"^8.2.0","picocolors":"^1.1.1","typescript":"^6.0.2"},"devDependencies":{"@types/node":"^18.19.130","tsx":"^4.20.6"},"repository":{"type":"git","url":"git+https://github.com/nocobase/nocobase.git","directory":"nocobase-cli"},"_id":"nocobase@0.1.5","gitHead":"00fbdbc3c0d8451f15704d7323481ba344c16a41","bugs":{"url":"https://github.com/nocobase/nocobase/issues"},"homepage":"https://github.com/nocobase/nocobase#readme","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-+qu9+dvMHRR8IuFn1SZX8NdN262jXkJmCPvIfAK4jjlq+g1UB2zu9jjFJplAJlAazwIrzXE/HAYn26mFlEQimg==","shasum":"2c2361c484877e0c8e1a6ec2e407c7914a38016c","tarball":"https://registry.npmjs.org/nocobase/-/nocobase-0.1.5.tgz","fileCount":38,"unpackedSize":115466,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEhI82m/27WFhMoXefTqi5oBR+TAplSiFh98bPdH0XOuAiEA+dmS/AOtkKlJThxRMnE1Jf6qsrllAo6BbZYL5utM21M="}]},"_npmUser":{"name":"chenos","email":"chenlinxh@gmail.com"},"directories":{},"maintainers":[{"name":"chenos","email":"chenlinxh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nocobase_0.1.5_1775828644259_0.9414992143591427"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-08T01:30:56.607Z","modified":"2026-04-10T13:44:04.539Z","0.1.0":"2026-04-08T01:30:56.764Z","0.1.1":"2026-04-08T01:35:33.794Z","0.1.2":"2026-04-08T01:42:18.925Z","0.1.3":"2026-04-08T05:54:20.558Z","0.1.4":"2026-04-09T00:48:11.445Z","0.1.5":"2026-04-10T13:44:04.433Z"},"bugs":{"url":"https://github.com/nocobase/nocobase/issues"},"license":"Apache-2.0","homepage":"https://github.com/nocobase/nocobase#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/nocobase/nocobase.git","directory":"nocobase-cli"},"description":"NocoBase CLI","maintainers":[{"name":"chenos","email":"chenlinxh@gmail.com"}],"readme":"# NocoBase CLI\n\nNocoBase CLI combines:\n\n- built-in commands for environment management and generic resource access\n- runtime-generated commands loaded from your NocoBase application's Swagger schema\n\nThis allows the CLI to stay aligned with the target application instead of relying on a fixed command list.\n\n## Install\n\nInstall dependencies for local development:\n\n```bash\npnpm install\n```\n\nRun in development mode:\n\n```bash\nnode ./bin/dev.js --help\n```\n\nBuild the CLI:\n\n```bash\npnpm build\n```\n\nRun the built CLI:\n\n```bash\nnode ./bin/run.js --help\n```\n\nAfter packaging or linking, the executable name is:\n\n```bash\nnocobase\n```\n\n## Quick Start\n\nAdd an environment:\n\n```bash\nnocobase env add --name local --base-url http://localhost:13000/api --token <token>\n```\n\nShow the current environment:\n\n```bash\nnocobase env\n```\n\nList configured environments:\n\n```bash\nnocobase env list\n```\n\nSwitch the current environment:\n\n```bash\nnocobase env use local\n```\n\nUpdate the runtime command cache from `swagger:get`:\n\n```bash\nnocobase env update\nnocobase env update -e local\n```\n\nUse the generic resource commands:\n\n```bash\nnocobase resource list --resource users\nnocobase resource get --resource users --filter-by-tk 1\nnocobase resource create --resource users --values '{\"nickname\":\"Ada\"}'\n```\n\n## Runtime Commands\n\nWhen you execute a runtime command, the CLI will:\n\n1. resolve the target environment\n2. read the application's Swagger schema from `swagger:get`\n3. generate or reuse a cached runtime command set for that application version\n4. execute the requested command\n\nIf the `API documentation plugin` is disabled, the CLI will prompt to enable it.\n\n## Environment Selection\n\nUse `-e, --env` to temporarily select an environment:\n\n```bash\nnocobase env update -e prod\nnocobase resource list --resource users -e prod\n```\n\nThis does not change the current environment unless you explicitly run:\n\n```bash\nnocobase env use <name>\n```\n\n## Config Scope\n\nThe `env` command supports two config scopes:\n\n- `project`: use `./.nocobase-cli` in the current working directory\n- `global`: use the global `.nocobase-cli` directory\n\nUse `-s, --scope` to select one explicitly:\n\n```bash\nnocobase env list -s project\nnocobase env add -s global --name prod --base-url http://example.com/api --token <token>\nnocobase env use local -s project\n```\n\nIf you do not pass `--scope`, the CLI uses automatic resolution:\n\n1. current working directory if `./.nocobase-cli` exists\n2. `NOCOBASE_HOME_CLI`\n3. your home directory\n\n## Built-in Commands\n\nCurrent built-in topics:\n\n- `env`\n- `resource`\n\nCheck available commands at any time:\n\n```bash\nnocobase --help\nnocobase env --help\nnocobase resource --help\n```\n\n## Common Flags\n\n- `-e, --env`: temporary environment selection\n- `-s, --scope`: config scope for `env` commands\n- `-t, --token`: token override\n- `-j, --json-output`: print raw JSON response\n\nExample:\n\n```bash\nnocobase env update -e prod -s global\nnocobase resource list --resource users -e prod -j\n```\n\n## Local Data\n\nThe CLI stores its local state in `.nocobase-cli`, including:\n\n- `config.json`: environment definitions and current selection\n- `versions/<version>/commands.json`: cached runtime commands for a generated version\n","readmeFilename":"README.md"}