CLI Authentication
Appcircle CLI
Appcircle CLI is a unified command-line tool that provides access to Appcircle platform features, enabling you to manage your projects, builds, and more directly from your terminal.
You can install the Appcircle CLI from npm:
npm install -g @appcircle/cli
or yarn:
yarn global add @appcircle/cli
You can find more information and the open source code of the CLI on GitHub as follows:
Authentication Methods
The Appcircle CLI supports two authentication methods:
- Personal Access Token (PAT) - Recommended for individual users
- API Key - Suitable for organization-level access
Login with Personal Access Token (PAT)
Personal Access Tokens provide a secure way to authenticate with Appcircle CLI without exposing your account credentials.
To authenticate using a Personal Access Token:
appcircle login pat --token "your-personal-access-token-here"
For generating Personal API Token, please refer to API Authentication documentation.
Login with API Key
API Keys provide organization-level authentication, ideal for automated systems and shared environments. Unlike PATs tied to individual users, API Keys belong to the organization and remain valid regardless of user account changes.
To authenticate using an API Key:
appcircle login api-key --name "my-api-key" --secret "my-secret"
For organization-specific access, you can also specify the organization ID:
appcircle login api-key --name "my-api-key" --secret "my-secret" --organization-id "org-123"
For creating and managing API keys, please refer to API Keys.
Logout
To securely log out and clear your stored authentication credentials from the CLI, please use following command:
appcircle logout
The logout
command clears your stored authentication token locally. This is a local operation that doesn't make any API calls to the server.
Authentication Behavior
The Appcircle CLI maintains a single active session and prevents multiple concurrent logins to ensure security and avoid credential conflicts.
- If you're already logged in and try to login again, you'll see a "You are already logged in" message
- You must logout first before logging in with different credentials
- If you try to logout when you're not logged in, you'll see a "You are not logged in" message
Interactive Mode
In interactive mode (appcircle -i
), authentication options are grouped under "Authentication (Login/Logout)" menu:
- Select "Authentication (Login/Logout)" from the main menu
- Choose "Login" or "Logout" from the submenu
- When choosing Login, you can authenticate using:
- API Key
- Personal Access Token (PAT)
- When choosing Login, you can authenticate using:
Environment Variable
After successful authentication, the CLI stores your access token locally. You can also manually set the AC_ACCESS_TOKEN
or AC_API_KEY_TOKEN
environment variable if needed for other tools or scripts.