Skip to content

Configuration

This page collects the configuration knobs across teemtape’s surfaces.

Settings are resolved with the precedence CLI flags > environment variables > config file > defaults.

SettingFlagEnv varDefault
API URL--api-urlTEEMTAPE_API_URLhttps://api.teemtape.com
Token--tokenTEEMTAPE_TOKEN(none)
Handle--handleTEEMTAPE_HANDLE(auto-generated on first use)
Web URL--web-urlTEEMTAPE_WEB_URLhttps://www.teemtape.com
Access token--access-tokenTEEMTAPE_ACCESS_TOKEN(none)
App URL--dashboard-urlTEEMTAPE_DASHBOARD_URLhttps://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.

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.

Build-time variables (Vite):

VariableDefaultPurpose
VITE_API_URLhttps://api.teemtape.comWorker API base URL
VITE_WEB_URLwindow.location.originShare 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.

Non-secret config lives in workers/api/wrangler.toml under [vars] and [env.production.vars].

VariablePurpose
QUOTES_PROVIDERsample (default, no key) or polygon
QUOTE_DELAY_SECONDSQuote delay / KV cache TTL (minimum 60)

Secrets are never committed.

  • Local dev (wrangler dev): put secrets in workers/api/.dev.vars (gitignored). Copy the example and add your key:

    Terminal window
    cd workers/api
    cp .dev.vars.example .dev.vars
    # edit .dev.vars: POLYGON_API_KEY=your-polygon-key

    To use live quotes locally, also set QUOTES_PROVIDER = "polygon" in wrangler.toml [vars].

  • Deployed Workers: upload secrets with Wrangler:

    Terminal window
    cd workers/api
    npx wrangler secret put POLYGON_API_KEY # default (dev) target
    npx 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:

Terminal window
cd workers/api
npx wrangler d1 create teemtape-db # -> database_id
npx wrangler kv namespace create QUOTES_CACHE # -> id

Maintainers configure these GitHub Actions secrets (contributors don’t need them for local work):

  • CLOUDFLARE_API_TOKEN
  • CLOUDFLARE_ACCOUNT_ID
  • POLYGON_API_KEY
  • NPM_PACKAGE_TOKEN — for publishing @teemtape/* packages on release.