GET STARTED / CONFIGURATION

Configuration

promptLM is a Spring Boot application — it picks up configuration from environment variables and from application.yml.

Environment variables

The repository ships a .env.example in its root with the four variables that the CLI and Studio expect.

Variable Purpose

REPO_REMOTE_URL

Base URL of the Git host’s REST API (GitHub or self-hosted Gitea). Used by the store to create and read remote repositories. See the endpoint table below.

REPO_REMOTE_USERNAME

User or owner on the remote host.

REPO_REMOTE_TOKEN

Personal access token with repo scope.

OPENAI_API_KEY

Used by Spring AI’s OpenAI client for prompt execution.

Important

REPO_REMOTE_URL must point at the host’s REST API endpoint, not its web address:

Host REPO_REMOTE_URL

GitHub (SaaS)

https://api.github.com

GitHub Enterprise

https://<your-host>/api/v3

Gitea / Forgejo

http://<your-host>:<port>/api/v1

A value of https://github.com (the web UI host) will not work: the store sends API calls there and every request fails. Use https://api.github.com, with no trailing slash.

ANTHROPIC_API_KEY is also read by the Spring AI Anthropic client when the model catalog routes a prompt to Claude.

REPO_REMOTE_ALLOW_LOOPBACK_HOST_ALIASES (optional, defaults to true) controls whether loopback aliases are permitted when resolving the remote URL — useful for local Gitea setups.

Note

Never commit a real PAT into .env.example. Use placeholder values in the template and rely on a .env file (gitignored) for the actual secrets in development.

Spring properties

Key properties read from apps/promptlm-cli/src/main/resources/application.yml:

Property What it controls

promptlm.release.promotion.mode

direct (default) or pr_two_phase. See Your first prompt § 4.

promptlm.store.local.workspace-root

Local directory under which prompt stores are created. Defaults to ${user.home}.

promptlm.store.remote.username / .token / .base-url

Mirror the env vars above for the remote store client.

promptlm.store.remote.allow-loopback-host-aliases

See env var above.

LLM provider configuration

Spring AI configuration is wired under spring.ai.openai.api-key and spring.ai.anthropic.api-key. To route through a LiteLLM gateway instead, enable promptlm.gateway.litellm.enabled=true and follow the configuration in the project README.