thesis Developers

Configuration

The CLI is primarily configured via command flags and a small set of environment variables. There is no thesis.config.json file read by the current CLI.

Defaults

These defaults come from @thesis/common (packages/common/src/ports.ts):

Setting Default
Core API port 42421
Core API URL (--core-url) http://localhost:42421
Thesis App UI port First available starting at 42420

Local filesystem paths

The CLI stores local state under ~/.thesis (THESIS_HOME_DIR):

Path Purpose
~/.thesis/thesis.db SQLite database (includes session records)
~/.thesis/pids/*.json PID files used by thesis server / thesis app for crash recovery
~/.thesis/logs/server.log Log file used when running thesis server start --detach

Environment variables

Environment variables recognized by core are defined in core/src/env.ts and core/src/config.ts. Document only what code actually consumes:

  • THESIS_DETACHED — set to "1" internally when thesis server start --detach spawns the background child process. Not meant to be set by users.
  • PROJECT_ROOT_DIR — set internally by thesis server start / thesis app based on --root-dir (or the computed default). Consumed by server code as the project root.
  • THESIS_CORE_URL — set internally by thesis app so the UI can reach the local Core API.

Notes

  • Most subcommands accept --core-url <url> to point at a non-default Core API server.
  • thesis app additionally accepts --api-url and --platform-url to override the URLs injected into the app frontend at runtime, and --core-token to gate the Core API.