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 whenthesis server start --detachspawns the background child process. Not meant to be set by users.PROJECT_ROOT_DIR— set internally bythesis server start/thesis appbased on--root-dir(or the computed default). Consumed by server code as the project root.THESIS_CORE_URL— set internally bythesis appso 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 appadditionally accepts--api-urland--platform-urlto override the URLs injected into the app frontend at runtime, and--core-tokento gate the Core API.