Hiyve Components - v1.0.0
    Preparing search index...

    Module @hiyve/cli

    @hiyve/cli

    Command-line tool for configuring npm to use the private Hiyve SDK registry.

    # One command to authenticate and configure npm
    npx @hiyve/cli login

    After login, install Hiyve packages normally:

    npm install @hiyve/rtc-client
    npm install @hiyve/react @hiyve/react-ui

    Authenticate with Hiyve and configure npm for @hiyve packages.

    # Interactive mode (prompts for API key)
    npx @hiyve/cli login

    # Non-interactive (CI/CD)
    npx @hiyve/cli login --key sk_live_your_secret_key_here

    Remove Hiyve configuration from your ~/.npmrc file.

    npx @hiyve/cli logout
    

    Show current authentication status.

    npx @hiyve/cli whoami
    

    List all available @hiyve packages.

    npx @hiyve/cli list
    

    Scaffold a new Hiyve project from a template.

    npx @hiyve/cli init my-app
    npx @hiyve/cli init my-app --template ai

    Templates: basic, ai, full

    1. Log in to the Hiyve Developer Console
    2. Navigate to API Keys in the sidebar
    3. Copy your secret key (starts with sk_test_ or sk_live_)

    The login command:

    1. Validates your API key with the Hiyve registry
    2. Adds two lines to your ~/.npmrc file:
      @hiyve:registry=https://api.hiyve.dev/registry/
      //api.hiyve.dev/registry/:_authToken=sk_live_...

    This tells npm to fetch @hiyve/* packages from the private Hiyve registry instead of the public npm registry.

    For automated deployments, add registry credentials as environment variables in your CI/CD pipeline. Your project .npmrc should use variable expansion:

    @hiyve:registry=https://api.hiyve.dev/registry/
    //api.hiyve.dev/registry/:_authToken=${HIYVE_API_KEY}
    

    Set HIYVE_API_KEY in your CI environment (GitHub Actions secrets, AWS SSM, etc.). npm natively expands ${ENV_VAR} in .npmrc files — no custom tooling needed.

    • Make sure your key starts with sk_test_ or sk_live_
    • Verify your account is active in the developer console
    • Check your internet connection
    • The registry may be temporarily unavailable

    If you've previously logged in and your token has expired, npx may fail because npm routes all @hiyve/* packages (including the CLI) through the private registry. To fix this, remove the stale registry line from your ~/.npmrc and re-run login:

    # Remove the stale @hiyve registry config
    npm config delete @hiyve:registry

    # Now login will work again
    npx @hiyve/cli login

    After login, verify your configuration:

    npx @hiyve/cli whoami
    

    Or check your ~/.npmrc manually:

    cat ~/.npmrc | grep hiyve
    
    • Your API key is stored in ~/.npmrc (standard npm token storage)
    • The key is sent only to the Hiyve registry during npm operations
    • Run npx @hiyve/cli logout to remove your credentials