Skip to main content

Environment variables

Before you can develop and deploy apps, you need to configure environment variables with your organization's specific settings and access tokens.

Basic setup

Step 1: Copy the sample environment file

Create your development environment file from the provided template:

cp .config/dev.env.sample .config/dev.env

Step 2: Configure your environment variables

Open .config/dev.env and update the following variables:

  1. Get your access token: Request the COMIND_SECRET_AUTH_CODE_MANAGEMENT token from your admin

    Security

    This is a secret token - never commit it to version control or share it publicly

  2. Set your organization URL: Replace YOUR-ORG with your actual organization name

.config/dev.env
# (!) Do not commit or expose this secret code:
COMIND_SECRET_AUTH_CODE_MANAGEMENT=COPY-CODE-HERE--GET-FROM-ADMIN

# URLs - replace YOUR-ORG with your actual organization name
COMIND_BASE_URL=https://YOUR-ORG.comindwork.com
COMIND_API_V1_URL=https://api.comindwork.com

Step 3: Verify your setup

Test your configuration by installing an existing app from your repository:

npx comind install app-your-task

If this command succeeds, your environment variables are configured correctly.

Working with multiple environments

If you need to work with multiple sites (development, UAT, production), you can create separate environment files:

  • .config/dev.env - Development environment
  • .config/uat.env - User Acceptance Testing environment
  • .config/prod.env - Production environment

Switching between environments

  1. Copy the sample environment switcher:

    cp .env-sample .env
  2. Edit the root .env file to specify which environment to use:

    .env
    # Uncomment the environment you want to use:
    # COMIND_ENV=dev
    # COMIND_ENV=uat
    COMIND_ENV=prod

The system will automatically load the corresponding .config/{environment}.env file based on your selection.