Ghostly’s configuration is split across two surfaces:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Meza-dev/Ghostly/llms.txt
Use this file to discover all available pages before exploring further.
~/.ghostly/auth.json, which the CLI writes during ghostly keygen / ghostly install / ghostly config, and environment variables injected at runtime. When you run ghostly up, the CLI reads auth.json, converts it to the environment variable map via authToEnv(), then spawns the API process with those variables already set. You only need to set variables manually when building a custom deployment or overriding specific values.
Most variables below are automatically injected by
ghostly up from ~/.ghostly/auth.json. Manual configuration is only needed for custom or non-standard deployments.Server
These variables control the HTTP server that powers both the REST API and the static dashboard frontend.TCP port the API server listens on. The raw env var default is
3000, but ghostly up always passes --port 4000 (or the value of the --port flag) explicitly, so the effective default when using the CLI is 4000. Override with ghostly up --port <number>.Fallback port variable.
config.ts reads API_PORT ?? PORT ?? "3000". Prefer API_PORT for explicit configuration; PORT is supported for compatibility with hosting platforms that inject it automatically.Network interface the server binds to. The env var default is
0.0.0.0. ghostly up always hardcodes HOST=127.0.0.1 (loopback only) for the spawned process. If you launch the API directly without ghostly up, HOST defaults to 0.0.0.0 — set it explicitly to 127.0.0.1 unless you intend to bind to all interfaces.Runtime mode. Accepts
development or production. ghostly up always sets this to production for the spawned server process.SQLite connection string in the format
file:/absolute/path/to/ghostly.db. Auto-set by ghostly up to the path returned by getDbPath() (typically ~/.ghostly/ghostly.db). Must begin with file:.HMAC-SHA256 secret used to sign and verify JWT bearer tokens. The default value is intentionally weak and must be changed in any deployment accessible beyond localhost.
Absolute path to the built web frontend asset directory. Served as static files by the API. Auto-set by
ghostly up to the path returned by getWebDistDir().Authentication
These variables identify the local CLI user to the API and configure the API base URL for outbound CLI requests.The API key used by the CLI and MCP server to authenticate requests against the Ghostly API via the
X-Api-Key header. Written to ~/.ghostly/auth.json by ghostly keygen or ghostly install, then injected into the server process environment by ghostly up.Base URL of the Ghostly API as seen by CLI commands and the MCP server. Stored in
~/.ghostly/auth.json and injected at startup. Change this if you run the server on a non-default port.Alias for
GHOST_API_KEY used specifically by the MCP server process. The server’s auth middleware validates the X-Api-Key request header against the key stored in ~/.ghostly/auth.json; this variable is the environment-level source of that value for MCP tooling.LLM / AI Provider
Ghostly’s AI-assisted E2E engine supports two LLM backends: an HTTP provider (any OpenAI-compatible endpoint) and the Cursor Agent CLI. The variables below configure which is used and how. Many have dual names for backward compatibility — both names are accepted and the primary name takes precedence.Selects the LLM backend. Accepts
http (any OpenAI-compatible REST endpoint) or cursor-cli (local Cursor Agent CLI binary). Stored in ~/.ghostly/auth.json under llm.provider and mapped here by authToEnv(). The alias LLM_PROVIDER is also accepted; ASSIST_LLM_PROVIDER takes precedence.Backward-compatible alias for
ASSIST_LLM_PROVIDER. Set by authToEnv() alongside ASSIST_LLM_PROVIDER. Prefer ASSIST_LLM_PROVIDER in new deployments.Base URL of the OpenAI-compatible API when using the
http provider. Examples: https://api.openai.com/v1, http://localhost:11434/v1 (Ollama), or an OpenRouter / Azure proxy base URL. Mapped from auth.llm.baseUrl. The alias LLM_BASE_URL is also accepted; ASSIST_LLM_API_URL takes precedence.Backward-compatible alias for
ASSIST_LLM_API_URL. Set by authToEnv() alongside ASSIST_LLM_API_URL. Prefer ASSIST_LLM_API_URL in new deployments.Bearer token sent in the
Authorization header for the http provider. Mapped from auth.llm.apiKey. Not required (and not stored) when using the cursor-cli provider. The alias OPENAI_API_KEY is also accepted; ASSIST_LLM_API_KEY takes precedence.Backward-compatible alias for
ASSIST_LLM_API_KEY. Set by authToEnv() alongside ASSIST_LLM_API_KEY for compatibility with tools that expect the standard OpenAI variable name.Model identifier forwarded to the LLM endpoint or Cursor Agent CLI. Examples:
gpt-4o, claude-3-5-sonnet-20241022, composer-2.5. Mapped from auth.llm.model. The alias LLM_MODEL is also accepted; ASSIST_LLM_MODEL takes precedence.Backward-compatible alias for
ASSIST_LLM_MODEL. Set by authToEnv() alongside ASSIST_LLM_MODEL.Per-call timeout in milliseconds for LLM requests. If a call exceeds this duration the provider raises an error and the orchestrator falls back to local heuristics. Consider increasing this to
90000 or more when using the cursor-cli provider, which requires spawning a subprocess.Path to the Cursor Agent CLI binary. Defaults to
agent (resolved from PATH). On Windows the typical install path is %LOCALAPPDATA%\cursor-agent\cursor-agent.cmd — set this variable if agent is not on your PATH.Working directory passed to the Cursor Agent CLI via
--workspace. Defaults to the current working directory of the API process. Set this to your project root if you want the agent to have access to source context.Alternative authentication token for the Cursor Agent CLI. When set, this bypasses the requirement for an active
agent login session. Useful in CI environments or on Windows where agent login sessions may not persist across terminal restarts.Prisma / DB
Absolute path to the Prisma query engine
.node native library. Auto-set by ghostly up via getPrismaEngineLibraryPath() for global npm installs where the engine is bundled inside the CLI package. Only required if Prisma cannot locate the engine automatically — this is rare in local development.Additional Engine Tuning
These variables let you fine-tune the assisted execution engine. They are read directly from the environment byloadConfig() in apps/api/src/config.ts and are not surfaced through auth.json.
Assist Engine (V1) variables
Assist Engine (V1) variables
| Variable | Default | Description |
|---|---|---|
ASSIST_ENABLED | true | Set to false to disable the AI-assist pipeline entirely. |
ASSIST_MAX_STEPS | 25 | Maximum number of steps the assist planner will generate per run. |
ASSIST_MAX_TIMEOUT_MS | 120000 | Hard wall-clock timeout for an entire assist run, in milliseconds. |
ASSIST_MAX_GOAL_CHARS | 2000 | Maximum character length accepted for a natural-language goal string. |
Assist Engine (V2) variables
Assist Engine (V2) variables
| Variable | Default | Description |
|---|---|---|
ASSIST_V2_ENABLED | true | Enables the V2 horizon-based orchestration pipeline. |
ASSIST_V2_CHUNK_SIZE | 3 | Number of steps per planning chunk sent to the strategist. |
ASSIST_V2_HEALING_ATTEMPTS | 1 | Number of self-healing retries per failed selector. |
ASSIST_V2_OBSERVER_MAX_NODES | 300 | Maximum DOM nodes captured by the observer after each action. |
ASSIST_V2_MAX_HORIZONS | 12 | Maximum number of planning horizons per run. |
ASSIST_V2_STEPS_PER_HORIZON | 3 | Target steps to plan within each horizon. |
ASSIST_V2_MAX_LOOP_MS | 300000 | Maximum total duration of the V2 assist loop in milliseconds. |
ASSIST_V2_MODAL_LOADER_MAX_MS | 180000 | Maximum wait time for modal/loader elements to settle between horizons. |
ASSIST_V2_MEMORY_MODE | runtime | Memory strategy: off, runtime (in-memory per run), or adaptive (persists across runs). |
Example .env File
The following mirrors the structure of .env.example in the repository root. You do not need to create this file for a standard local install — ghostly up injects all required values automatically.