Set up your Personal Access Token for ARKA Code CLI
ARKA Code CLI requires a Personal Access Token to authenticate with the ARKA AI API. This guide walks you through creating a token and configuring the CLI.
Pro Subscription Required
Navigate to Settings → Personal Access Tokens in your ARKA AI workspace, or go directly to arka-ai.com/app/personal/settings/tokens

The Personal Access Tokens management page
Click the Create Token button. Give your token a descriptive name (e.g., "MacBook Pro", "Work Laptop", or "CI/CD Pipeline"). Optionally set an expiration date for added security.

Enter a name for your token and optionally set an expiration
After creation, your token will be displayed once. Copy it immediately and store it securely. You won't be able to see the full token again.

Copy your token now - it won't be shown again!
Keep Your Token Secure
The easiest way to authenticate is using the arka login command. It will open your browser to the tokens page and prompt you to paste your token.
Your token is securely stored in the config file at ~/.config/arka-code-nodejs/config.json (location may vary by OS).
You can also set your token as an environment variable. This is useful for CI/CD pipelines or when you don't want to store the token in a config file.
export ARKA_API_KEY=arka_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxOr pass it directly when running the CLI:
To clear your stored credentials, use the logout command:
If you suspect a token has been compromised or you no longer need it, revoke it immediately from the tokens page. Click the trash icon next to any token to delete it.
Revoking a token is immediate and irreversible. Any applications or scripts using that token will stop working.
Invalid Token
If you see "Invalid token" or "Unauthorized", verify that:
arka_Pro Subscription Required
If you see "Pro subscription required", your account doesn't have an active Pro subscription. Visit arka-ai.com/billing to upgrade.
Multiple Tokens
You can create multiple tokens for different devices or purposes. Each token can be revoked independently, so if one device is lost or compromised, you only need to revoke that specific token.