@guing-ai/cli
v0.2.5
Published
Guing CLI — set up design system consumption in your project
Readme
@guing-ai/cli
The Guing CLI allows developers to securely consume their design system components, tokens, and AI configuration generated by the Guing platform.
Publishing to npm
To publish updates to the @guing-ai/cli package, you need to authenticate with npm and ensure you have an access token with bypass 2FA enabled, as the @guing-ai organization requires 2FA for publishing.
Prerequisites
- You must be added as a member to the
@guing-aiorganization on npmjs.com. - Generate an Automation / Granular Access Token on npm:
- Go to https://www.npmjs.com/settings/tokens
- Click Generate New Token -> Granular Access Token
- Give it a name (e.g., "Guing CLI Publish Token")
- Under Packages and scopes, select
@guing-aiand set Read and write access. - ⚠️ CRITICAL: Check the box that says "Bypass two-factor authentication for publishing".
- Generate and copy the token (
npm_...).
Steps to Publish
Update the Version: Increase the
versionnumber inpackage.jsonaccording to semver (e.g., from"0.1.0"to"0.1.1").Build the CLI: From the
clidirectory, run the build command to compile the TypeScript code:npm run buildAuthenticate: If you haven't already, configure your local npm registry to use your generated token:
npm config set //registry.npmjs.org/:_authToken="<YOUR_TOKEN>"Publish: Publish the package to the public registry:
npm publish --access public
Usage
Developers can run the CLI directly using npx in their project's root directory:
Initial Setup
npx @guing-ai/cli setupThe CLI will prompt for the Tenant ID, Client Secret, and the developer's preferred AI Assistants to scaffold the design system dependencies and AI instruction rules.
After a successful setup, a .guing.json file is saved in the project root — this records the tenant ID, API URL, selected agents, and installed version for future updates.
⚠️ Security: The
clientSecretis never stored in.guing.json. It is read from the.envfile (GUING_CLIENT_SECRET) or a CLI flag at runtime.
Updating the Design System
When the design system is updated (new components, token changes, etc.), run:
npx @guing-ai/cli updateThis will:
- Read
.guing.jsonfor project settings - Read
GUING_CLIENT_SECRETfrom.env - Fetch the latest version and manifest from the API
- Update
package.jsonwith the new version tag - Regenerate all AI agent instruction files
- Run
npm installautomatically
Non-Interactive Mode
Alternatively, use flags for CI/CD environments:
npx @guing-ai/cli setup \
--api https://us-central1-guing-ai.cloudfunctions.net/api \
--tenant your-tenant-id \
--secret your-client-secret \
--agents cursor,claude \
--yes