Skip to main content

When to use

  • First-time environment setup
  • When deploy or project commands fail with “API key is required”
  • To check current identity or switch between organizations
  • When the user needs to authenticate with a different org

Prerequisites

  • Node.js 22+ installed
  • npm available

Commands

Install CLI

# Check if installed
codika-helper -V

# Install globally
npm install -g @codika-io/helper-sdk

Login (interactive)

codika-helper login
Prompts for API key with masked input. Verifies the key, stores a named profile.

Login (non-interactive)

codika-helper login --api-key cko_your_key_here

Check identity

codika-helper whoami
Returns: organization name, key name, masked key, scopes, expiry, profile name.

List profiles

codika-helper use
Shows all stored profiles with an active marker.

Switch profile

codika-helper use <profile-name>

Remove profile

codika-helper logout
codika-helper logout <profile-name>

View all configuration

codika-helper config show

Clear configuration

codika-helper config clear
codika-helper config clear --profile <name>

Configuration storage

ItemLocation
Config file~/.config/codika-helper/config.json
Permissions0o600 (owner read/write only)
FormatMulti-profile JSON with active profile pointer

API key resolution priority

  1. --api-key / --api-url flag on any command
  2. CODIKA_API_KEY / CODIKA_BASE_URL environment variable
  3. Active profile in config file
  4. Production default (base URL only)

Organization-aware profile selection

When project.json in a use case folder contains an organizationId, the CLI automatically selects the matching profile for deployment commands — even if a different profile is currently active.

Common errors

ErrorCauseFix
”API key is required”No key provided or foundRun codika-helper login
”Invalid API key”Key is wrong or expiredCheck with codika-helper whoami, re-login
”EACCES” on npm installPermission deniedUse sudo npm install -g or fix npm permissions
Wrong org on deployActive profile doesn’t match projectUse codika-helper use <correct-profile>