.env.example file-level

at sha256:f · View file ↗ · Intel ↗

History
1 files
1 commits
0 hotspots
0 🧊 dead
0 πŸ’₯ blast risk
sha256:9 feat(calendar): hosted bridge/gateway route parity and timeline noteRec… · aaronrene · Jun 19, 2026
1 # Copy to .env and set your keys. Do not commit .env.
2 # OPENAI_API_KEY=sk-your-key-here
3 #
4 # ── Two LLM lanes (different keys / providers) ─────────────────────────────
5 # 1) EMBEDDINGS = Meaning search + indexer (vectors). NOT Anthropic β€” use Ollama,
6 # OpenAI, Voyage, or DeepInfra. Set in config/local.yaml embedding: { provider, model } and/or:
7 # EMBEDDING_PROVIDER=ollama|openai|voyage|deepinfra EMBEDDING_MODEL=...
8 # Voyage (cloud, non-OpenAI): EMBEDDING_PROVIDER=voyage + VOYAGE_API_KEY
9 # DeepInfra (single-key with chat above; OpenAI-compatible API):
10 # EMBEDDING_PROVIDER=deepinfra + DEEPINFRA_API_KEY
11 # EMBEDDING_MODEL=BAAI/bge-large-en-v1.5 # default; 1024-dim
12 # Other options: Qwen/Qwen3-Embedding-8B (4096), intfloat/multilingual-e5-large-instruct (1024)
13 # NOTE: Switching embedding provider OR dimension requires a vault re-index.
14 # 2) CHAT = proposal Enrich / review hints / completeChat.
15 # Provider order (lib/llm-complete.mjs):
16 # a) KNOWTATION_CHAT_PROVIDER=deepinfra β†’ DeepInfra (Qwen/Llama/Mistral) with
17 # OpenAI/Anthropic fallback if their keys are also set. Single OpenAI-compatible bill;
18 # same DEEPINFRA_API_KEY also works for OpenClaw orchestration (image gen, embeddings, TTS).
19 # b) KNOWTATION_CHAT_PROVIDER=openrouter β†’ OpenRouter (BYO key, OpenAI-compatible).
20 # Requires OPENROUTER_API_KEY. NO fallback to a managed lane on failure: this is a
21 # "bring your own provider" lane (you pay OpenRouter directly; never metered against
22 # Knowtation packs), so an error surfaces instead of silently re-routing your note
23 # text to a metered provider. Explicit-only: adding OPENROUTER_API_KEY alone never
24 # changes the provider for an existing deploy. See
25 # docs/COMPANION-APP-MODEL-ROUTING-AND-ENRICHMENT-ARCHITECTURE.md Β§4/Β§6.
26 # c) KNOWTATION_CHAT_PROVIDER=openai|anthropic β†’ lock to that provider (no fallback).
27 # d) Implicit DeepInfra: DEEPINFRA_API_KEY set AND no OpenAI/Anthropic key β†’ DeepInfra.
28 # e) Default: OpenAI β†’ Anthropic β†’ Ollama (unchanged for existing deploys).
29 # KNOWTATION_CHAT_PREFER_ANTHROPIC=1 flips OpenAI/Anthropic order when both are set.
30 # ANTHROPIC_API_KEY=
31 # ANTHROPIC_CHAT_MODEL=claude-3-5-haiku-20241022
32 # KNOWTATION_CHAT_PREFER_ANTHROPIC=1
33 # DEEPINFRA_API_KEY=
34 # DEEPINFRA_CHAT_MODEL=Qwen/Qwen2.5-72B-Instruct # default; cheaper hint model: meta-llama/Meta-Llama-3.1-8B-Instruct
35 # KNOWTATION_CHAT_PROVIDER=deepinfra # explicit lock; omit for default OpenAI-first behavior
36 # OPENROUTER_API_KEY= # BYO key for KNOWTATION_CHAT_PROVIDER=openrouter
37 # OPENROUTER_CHAT_MODEL=openai/gpt-4o-mini # default; any OpenRouter model slug, e.g. anthropic/claude-3.5-haiku
38 # OPENROUTER_SITE_URL= # optional attribution β†’ HTTP-Referer header
39 # OPENROUTER_APP_TITLE= # optional attribution β†’ X-Title header
40 # VOYAGE_API_KEY= # when embedding.provider is voyage (see docs/setup.md)
41 # Hub (Phase 11): required for npm run hub (self-hosted). See docs/TWO-PATHS-HOSTED-AND-SELF-HOSTED.md#quick-start-self-hosted
42 # HUB_JWT_SECRET=your-long-random-secret
43 # KNOWTATION_VAULT_PATH=/absolute/path/to/vault (or set in config/local.yaml)
44 #
45 # Gateway β†’ canister authentication (required for production).
46 # Set a strong random secret (64+ hex chars), then call admin_set_gateway_auth_secret on the canister.
47 # CANISTER_AUTH_SECRET=
48 #
49 # Full operator export (all users; hub canister must have secret set β€” see docs/OPERATOR-BACKUP.md)
50 # KNOWTATION_OPERATOR_EXPORT_URL=https://<hub-canister-id>.icp0.io
51 # KNOWTATION_OPERATOR_EXPORT_KEY=long-random-secret-matching-admin_set_operator_export_secret
52 # KNOWTATION_OPERATOR_EXPORT_DIR=./backups
53 #
54 # Optional: before `dfx deploy hub --network ic`, `npm run canister:release-prep` can export vault(s) to ./backups/
55 # (same script as `npm run canister:export-backup` and scheduled HTTP vault export β€” see docs/DEPLOY-HOSTED.md Β§6)
56 # KNOWTATION_CANISTER_BACKUP_USER_ID=google:123
57 # KNOWTATION_CANISTER_URL=https://<canister-id>.icp0.io
58 # KNOWTATION_CANISTER_BACKUP_URL= # alias for CANISTER_URL (e.g. CI secret name)
59 # KNOWTATION_CANISTER_BACKUP_VAULT_ID=default
60 # KNOWTATION_CANISTER_BACKUP_VAULT_IDS=default,second # comma-separated; overrides VAULT_ID when set
61 # KNOWTATION_CANISTER_BACKUP_DIR=./backups
62 # KNOWTATION_CANISTER_BACKUP_ENCRYPT_KEY_HEX= # 64 hex chars β†’ AES-256-GCM .json.enc output
63 # KNOWTATION_CANISTER_BACKUP_S3_BUCKET=
64 # KNOWTATION_CANISTER_BACKUP_S3_PREFIX=knowtation-canister-backups/
65 # KNOWTATION_CANISTER_BACKUP_SKIP_S3=1 # local: skip S3 even if bucket set
66 # AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_REGION=us-east-1
67 #
68 # CLI / curl / repo scripts (verify-hosted-hub-api, seed:*, `knowtation propose`) read KNOWTATION_HUB_URL,
69 # KNOWTATION_HUB_TOKEN, KNOWTATION_HUB_VAULT_ID β€” not *_LOCAL / *_HOSTED. If you use suffixed names in .env,
70 # after `source .env` run exports, e.g. for hosted:
71 # export KNOWTATION_HUB_URL="$KNOWTATION_HUB_URL_HOSTED"
72 # export KNOWTATION_HUB_TOKEN="$KNOWTATION_HUB_TOKEN_HOSTED"
73 # export KNOWTATION_HUB_VAULT_ID="$KNOWTATION_HUB_VAULT_ID_HOSTED"
74 #
75 # Optional proposal LLM (exact names; env locks Settings β†’ Backup checkboxes when set to 1/0 or true/false):
76 # KNOWTATION_HUB_PROPOSAL_REVIEW_HINTS=1
77 # KNOWTATION_HUB_PROPOSAL_ENRICH=1
78 #
79 # AIR Improvement D: built-in attestation endpoint (hosted gateway).
80 # When set (32+ chars), the gateway auto-configures KNOWTATION_AIR_ENDPOINT to its own
81 # /api/v1/attest route. All hosted note writes are then attested (HMAC-signed, stored in
82 # Netlify Blobs). Verify any attestation via GET /api/v1/attest/:id.
83 # ATTESTATION_SECRET=your-long-random-secret-min-32-chars
84 #
85 # Hosted memory consolidation (Session 10 / Stream 1 β€” bridge + gateway).
86 # CONSOLIDATION_LLM_API_KEY: LLM key for hosted consolidation passes; falls back to OPENAI_API_KEY.
87 # CONSOLIDATION_LLM_MODEL: Model to use (default: gpt-4o-mini).
88 # CONSOLIDATION_COST_CAP_USD: Optional daily spend cap per user on the bridge (no cap if unset).
89 # CONSOLIDATION_LLM_API_KEY=
90 # CONSOLIDATION_LLM_MODEL=gpt-4o-mini
91 # CONSOLIDATION_COST_CAP_USD=