@eff-kay/docsalot-test
v0.1.0
Published
Standalone Docsalot CLI scaffold (OpenAPI-first)
Readme
Docsalot CLI (Standalone Scaffold)
This folder is the standalone CLI project kept in the same monorepo as backend/dashboard code.
OpenAPI-first workflow
- Update
openapi/docsalot-cli-v1.yaml - Regenerate types:
npm run generate:api
- Implement/update command handlers against generated types
Phase 1 auth commands
# Save dashboard-issued API token
docsalot auth login --token docsa_xxx
# CI-safe token input
echo "$DOCSALOT_API_TOKEN" | docsalot auth login --from-stdin
# Validate saved token
docsalot auth whoami
# Remove local credentials
docsalot auth logoutRun as native docsalot command
Use one of these install paths so you can run docsalot ... directly.
Local developer link (recommended)
cd tools/docsalot-cli
npm install
npm run generate:api
npm run link:global
docsalot --help
docsalot auth whoami --jsonGlobal install from local folder
npm install -g ./tools/docsalot-cli
docsalot --versionFirst npm publish (manual, no CI)
Prerequisites
# Require Node.js 20+ for CLI build/release workflow
node -v
npm -vNPM account setup (one-time)
# Create account at https://www.npmjs.com/signup (if needed),
# then authenticate in terminal:
npm login
# Verify the logged-in user
npm whoamiPackage preflight
cd tools/docsalot-cli
npm install
npm run generate:api
npm run typecheck
npm run build
npm run publish:dry-runPublish
cd tools/docsalot-cli
npm publish --access publicInstall and verify from npm registry
npm install -g [email protected]
docsalot --version
docsalot --help
docsalot auth whoami --jsonExpected:
docsalot --versionprints0.1.0docsalot --helpprints command usagedocsalot auth whoami --jsonreturns auth error when no token is saved
Tarball flow (release-style validation)
cd tools/docsalot-cli
npm install
npm run generate:api
npm run pack:local
npm install -g ./docsalot-0.1.0.tgz
docsalot --versionLocal source-only execution (without install)
cd tools/docsalot-cli
npm install
npm run generate:api
npm run typecheck
npm run build
node dist/index.js --help