-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
84 lines (74 loc) · 4.69 KB
/
.env.example
File metadata and controls
84 lines (74 loc) · 4.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Tokenomics Environment Variables
# Copy this file to .env and fill in your values
#
# All TOKENOMICS_ prefixed variables override config.yaml settings.
# Example: TOKENOMICS_SERVER_HTTP_PORT=9000 overrides server.http_port
# Generate secure keys: openssl rand -hex 32
# ── Quick Start ────────────────────────────────────────────────────────────
# Set this to auto-register a wrapper token on `tokenomics init`
# TOKENOMICS_KEY=your-wrapper-token-here
# ── Security (Required) ────────────────────────────────────────────────────
# HMAC key used to hash wrapper tokens (generated automatically on first run)
TOKENOMICS_HASH_KEY=your-32-byte-hex-key-here
# AES-256-GCM key for at-rest encryption (generated automatically on first run)
TOKENOMICS_ENCRYPTION_KEY=your-32-byte-hex-key-here
# ── Server ─────────────────────────────────────────────────────────────────
TOKENOMICS_SERVER_HTTP_PORT=8080
TOKENOMICS_SERVER_HTTPS_PORT=8443
TOKENOMICS_SERVER_UPSTREAM_URL=https://api.openai.com
# ── TLS Certificates ──────────────────────────────────────────────────────
# Leave auto_gen=true to self-sign on startup, or provide cert/key paths
TOKENOMICS_SERVER_TLS_ENABLED=true
TOKENOMICS_SERVER_TLS_AUTO_GEN=true
TOKENOMICS_SERVER_TLS_CERT_DIR=./certs
# TOKENOMICS_SERVER_TLS_CERT_FILE=/path/to/cert.pem
# TOKENOMICS_SERVER_TLS_KEY_FILE=/path/to/key.pem
# ── Storage ────────────────────────────────────────────────────────────────
TOKENOMICS_STORAGE_DB_PATH=./tokenomics.db
# ── Session Backend ────────────────────────────────────────────────────────
# "memory" for in-process, "redis" for distributed
TOKENOMICS_SESSION_BACKEND=memory
TOKENOMICS_SESSION_REDIS_ADDR=localhost:6379
TOKENOMICS_SESSION_REDIS_PASSWORD=
TOKENOMICS_SESSION_REDIS_DB=0
# ── Logging ────────────────────────────────────────────────────────────────
# Log file path. If not set, logs go to stdout.
# TOKENOMICS_LOG_FILE=~/.tokenomics/tokenomics.log
TOKENOMICS_LOGGING_LEVEL=info
TOKENOMICS_LOGGING_FORMAT=json
TOKENOMICS_LOGGING_REQUEST_BODY=false
TOKENOMICS_LOGGING_RESPONSE_BODY=false
TOKENOMICS_LOGGING_HIDE_TOKEN_HASH=false
TOKENOMICS_LOGGING_DISABLE_REQUEST=false
# ── Provider API Keys ──────────────────────────────────────────────────────
# These are referenced by config.yaml provider definitions (api_key_env field).
# The proxy automatically loads this .env file at startup, so variables are
# available to the running process without manual export.
#
# Example naming patterns:
# 1. Standard provider names: OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.
# 2. Scoped names (avoid conflicts): MY_OPENAI_API_KEY, MY_ANTHROPIC_API_KEY_NEW
#
# Use pattern 2 if you have conflicts with system environment variables.
# Reference the chosen name in config.yaml as: api_key_env: MY_ANTHROPIC_API_KEY_NEW
#
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GEMINI_API_KEY=...
GOOGLE_API_KEY=...
AZURE_OPENAI_API_KEY=...
GROQ_API_KEY=gsk-...
MISTRAL_API_KEY=...
DEEPSEEK_API_KEY=sk-...
# ── Remote Config Sync (Optional) ──────────────────────────────────────────
# Load tokens and config from a central server on startup/schedule
# TOKENOMICS_REMOTE_URL=http://config-server:9090
# TOKENOMICS_REMOTE_API_KEY=my-remote-api-key
# TOKENOMICS_REMOTE_SYNC=60
# TOKENOMICS_REMOTE_INSECURE=false
# ── Webhook Events (Optional) ──────────────────────────────────────────────
# Webhook configuration is in config.yaml. Set these if you need to override:
# TOKENOMICS_EVENTS_WEBHOOKS_0_URL=http://localhost:9090/webhook
# TOKENOMICS_EVENTS_WEBHOOKS_0_SECRET=my-webhook-secret
# TOKENOMICS_EVENTS_WEBHOOKS_0_SIGNING_KEY=my-signing-key
# TOKENOMICS_EVENTS_WEBHOOKS_0_TIMEOUT=10