Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.xcommand.ai/llms.txt

Use this file to discover all available pages before exploring further.

xCommand CLI can be configured using a config.json file or via command-line arguments. This allows you to persist settings like your API key, preferred server port, and execution mode.

Configuration File

By default, xCommand looks for a configuration file at: ~/.xcommand/config.json

File Structure

The configuration file is a simple JSON object. Here is the default structure:
{
  "api_key": "your-api-key-here",
  "server_port": 8080,
  "mode": "safe",
  "github_token": "your-github-token-here",
  "gcloud_service_account": "your-sa@project.iam.gserviceaccount.com",
  "gcloud_service_account_json_path": "/path/to/key.json",
  "aws_profile": "default",
  "aws_access_key_id": "your_access_key_id",
  "aws_secret_access_key": "your_secret_access_key",
  "aws_region": "us-east-1",
  "azure_client_id": "your_client_id",
  "azure_client_secret": "your_client_secret",
  "azure_tenant_id": "your_tenant_id",
  "azure_subscription_id": "your_subscription_id",
  "do_access_token": "your_digitalocean_access_token",
  "linear_token": "your_linear_api_token",
  "notion_token": "your_notion_api_token",
  "pagerduty_token": "your_pagerduty_api_token",
  "gemini_api_key": "your_gemini_api_key"
}

Fields

FieldDescriptionDefault
api_keyYour xCommand API key for authentication.None
server_portThe port used when running in server mode.8080
modeThe default execution mode (safe or standard).safe
github_tokenA GitHub Personal Access Token for the GitHub Integration.None
gcloud_service_accountTarget Google Cloud Service Account for the GCP Integration.None
gcloud_service_account_json_pathPath to a Service Account JSON key for the GCP Integration.None
aws_profileTarget AWS Profile for the AWS Integration.None
aws_access_key_idAWS Access Key ID for the AWS Integration.None
aws_secret_access_keyAWS Secret Access Key for the AWS Integration.None
aws_regionAWS Region for the AWS Integration.None
azure_client_idAzure Client ID for the Azure Integration.None
azure_client_secretAzure Client Secret for the Azure Integration.None
azure_tenant_idAzure Tenant ID for the Azure Integration.None
azure_subscription_idAzure Subscription ID for the Azure Integration.None
do_access_tokenDigitalOcean Personal Access Token for the DigitalOcean Integration.None
linear_tokenLinear Personal API Key for the Linear Integration.None
notion_tokenNotion Personal Access TokenNone
pagerduty_tokenPagerDuty REST API KeyNone
gemini_api_keyUser-provided Google Gemini API Key. When set, xCommand uses this key and skips token billing.None

CLI Arguments

You can override the default configuration using command-line flags.

Custom Configuration Path

If you want to use a specific configuration file instead of the default one, use the --config-file flag:
xcommand --config-file ./custom-config.json

Server Port Override

When starting the server, you can specify a port that takes precedence over the configuration file:
xcommand server --port 9000

Environment Variables

For automated environments or CI/CD pipelines, you can use the XCOMMAND_API_KEY environment variable to authenticate without a configuration file.
export XCOMMAND_API_KEY=your_secret_token
xcommand bypass-login