Logging In
To authenticate with a Kodexa platform instance, use thelogin
command:
- The URL of the Kodexa platform instance
- Your access token for authentication
- A profile name (defaults to “default”)
Profile Management
Profiles allow you to manage connections to multiple Kodexa platform instances. Each profile stores a URL and access token for a specific instance.Creating Profiles
When you log in, you automatically create a profile. You can specify a profile name during login:Viewing Profiles
To list all available profiles:Checking Current Profile
To check which profile is currently active:Switching Profiles
To switch to a different profile:prod
with the name of the profile you want to use.
After switching, you can verify the change:
Deleting Profiles
To delete a profile when you no longer need it:Profile Configuration File
Profiles are stored in a configuration file on your system. The location depends on your operating system:- macOS:
~/Library/Application Support/kodexa-cli/profiles.json
- Linux:
~/.local/share/kodexa-cli/profiles.json
- Windows:
C:\Documents and Settings\{User}\Application Data\Local Settings\kodexa\kodexa-cli\profiles.json
Platform Information
To verify your connection and view information about the platform you’re connected to:Token Storage
Your authentication tokens are securely stored in your system:- macOS:
~/Library/Application Support/kodexa-cli
- Linux:
~/.local/share/kodexa-cli
- Windows:
C:\Documents and Settings\{User}\Application Data\Local Settings\kodexa\kodexa-cli
orC:\Documents and Settings\{User}\Application Data\kodexa\kodexa-cli
Environment Variable Authentication
You can also authenticate using environment variables:Global Options
Most Kodexa CLI commands accept the following authentication-related options:Best Practices
- Use different profiles for different environments (development, production, etc.)
- Avoid storing tokens in scripts or sharing them with others
- Regularly rotate your access tokens for security
- Use the
--profile
option for one-off commands instead of switching profiles