Skip to main content

Managing Profiles

Profiles store your API key and API URL for each EntryGuard organization. You can configure multiple profiles and switch between them — similar to AWS CLI named profiles.

Configuration File

Profiles are stored in ~/.entryguard/config.toml:

default_profile = "work"

[profiles.work]
api_key = "eg_live_abc123..."
api_url = "https://app.entryguard.io/api/v1"

[profiles.freelance]
api_key = "eg_live_def456..."
api_url = "https://app.entryguard.io/api/v1"

Adding a Profile

eg profile add work

You'll be prompted for:

  1. API Key — Your EntryGuard API key (input is masked). See Create & Manage API Keys.
  2. API URL — Press Enter to accept the default (https://app.entryguard.io/api/v1), or enter a custom URL for self-hosted instances.

The CLI validates your API key by calling the API before saving. On success, it shows your organization name and email.

→ Validating API key...
✓ Profile "work" added (org: Acme Corp, user: [email protected])
→ Set as default profile
info

The first profile you add is automatically set as the default.

Listing Profiles

eg profile list
   NAME        API URL
* work https://app.entryguard.io/api/v1
freelance https://app.entryguard.io/api/v1

The * indicates the default profile.

Switching Default Profile

eg profile use freelance
✓ Default profile set to "freelance"

Using a Specific Profile

Override the default for a single command with --profile:

eg session start --profile freelance

Removing a Profile

eg profile remove freelance

If you remove the default profile, the CLI picks another profile as the new default (or clears it if none remain).

Next Steps