Configuration
This page collects the configuration knobs across teemtape’s surfaces.
Settings are resolved with the precedence CLI flags > environment variables > config file > defaults.
| Setting | Flag | Env var | Default |
|---|---|---|---|
| API URL | --api-url | TEEMTAPE_API_URL | https://api.teemtape.com |
| Token | --token | TEEMTAPE_TOKEN | (none) |
| Handle | --handle | TEEMTAPE_HANDLE | (auto-generated on first use) |
| Web URL | --web-url | TEEMTAPE_WEB_URL | https://www.teemtape.com |
| Access token | --access-token | TEEMTAPE_ACCESS_TOKEN | (none) |
| App URL | --dashboard-url | TEEMTAPE_DASHBOARD_URL | https://app.teemtape.com |
The access token is only relevant on the hosted service with teemtape Pro:
it unlocks private watchlists and role-based access for the CLI and agents.
Save one with teemtape login. Self-hosted APIs ignore it.
Config file
Section titled “Config file”The CLI stores config at ~/.config/teemtape/config.json (or
$XDG_CONFIG_HOME/teemtape/config.json), written with 0600 permissions. It
holds your watchlist token and handle. The token is never printed in full —
teemtape config masks it.
teemtape init creates a watchlist and writes its token here so subsequent
commands pick it up automatically.
Web app
Section titled “Web app”Build-time variables (Vite):
| Variable | Default | Purpose |
|---|---|---|
VITE_API_URL | https://api.teemtape.com | Worker API base URL |
VITE_WEB_URL | window.location.origin | Share link host |
VITE_DASHBOARD_URL | (unset) | teemtape Pro app URL. When set, API calls carry the .teemtape.com session cookie and the top bar shows sign-in state. Leave unset when self-hosting. |
In development, apps/web/.env.development defaults VITE_API_URL to
http://127.0.0.1:8787. Production values live in apps/web/.env.production.
Worker API
Section titled “Worker API”Non-secret config lives in workers/api/wrangler.toml under [vars] and
[env.production.vars].
| Variable | Purpose |
|---|---|
QUOTES_PROVIDER | sample (default, no key) or polygon |
QUOTE_DELAY_SECONDS | Quote delay / KV cache TTL (minimum 60) |
Secrets
Section titled “Secrets”Secrets are never committed.
-
Local dev (
wrangler dev): put secrets inworkers/api/.dev.vars(gitignored). Copy the example and add your key:Terminal window cd workers/apicp .dev.vars.example .dev.vars# edit .dev.vars: POLYGON_API_KEY=your-polygon-keyTo use live quotes locally, also set
QUOTES_PROVIDER = "polygon"inwrangler.toml[vars]. -
Deployed Workers: upload secrets with Wrangler:
Terminal window cd workers/apinpx wrangler secret put POLYGON_API_KEY # default (dev) targetnpx wrangler secret put POLYGON_API_KEY --env production # production
Before the first deploy, create the D1 database and KV namespace and paste their
ids into wrangler.toml:
cd workers/apinpx wrangler d1 create teemtape-db # -> database_idnpx wrangler kv namespace create QUOTES_CACHE # -> idCI / deploy secrets
Section titled “CI / deploy secrets”Maintainers configure these GitHub Actions secrets (contributors don’t need them for local work):
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_IDPOLYGON_API_KEYNPM_PACKAGE_TOKEN— for publishing@teemtape/*packages on release.