The Scenius CLI requires authentication to connect to LLM services. Currently, the CLI supports OpenAI Compatible authentication.
This method allows you to connect to OpenAI or any OpenAI-compatible service (such as local LLM servers, alternative providers, etc.).
When you first run the CLI, you'll be prompted to select an authentication method. Choose "OpenAI Compatible" and you'll be asked to provide:
- API Key: Your OpenAI API key or the key for your compatible service
- Base URL (optional): The API endpoint URL (defaults to OpenAI's API if not specified)
- Model (optional): The model to use (defaults to gpt-4 if not specified)
You can also configure authentication using environment variables:
export OPENAI_API_KEY="YOUR_API_KEY"
export OPENAI_BASE_URL="https://api.openai.com/v1" # Optional
export OPENAI_MODEL="gpt-4" # OptionalFor repeated use, you can add these to your .env file or shell configuration file:
echo 'export OPENAI_API_KEY="YOUR_API_KEY"' >> ~/.bashrc
source ~/.bashrcYou can create a .sceni/.env file in your project directory or in your home directory. Creating a plain .env file also works, but .sceni/.env is recommended to keep Scenius variables isolated from other tools.
Scenius CLI automatically loads environment variables from the first .env file it finds, using the following search order:
- Starting in the current directory and moving upward toward
/, for each directory it checks:.sceni/.env.env
- If no file is found, it falls back to your home directory:
~/.sceni/.env~/.env
Important: The search stops at the first file encountered—variables are not merged across multiple files.
Project-specific overrides (take precedence when you are inside the project):
mkdir -p .sceni
echo 'OPENAI_API_KEY="your-api-key"' >> .sceni/.envUser-wide settings (available in every directory):
mkdir -p ~/.sceni
cat >> ~/.sceni/.env <<'EOF'
OPENAI_API_KEY="your-api-key"
OPENAI_MODEL="gpt-4"
EOFWhen running the Scenius CLI in a non-interactive environment, you cannot use the interactive setup flow. Instead, you must configure authentication using environment variables.
The CLI will automatically detect if it is running in a non-interactive terminal and will require the OPENAI_API_KEY environment variable to be set.
If the OPENAI_API_KEY environment variable is not set in a non-interactive session, the CLI will exit with an error.