Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
271 lines (226 loc) · 10.7 KB
/
Copy path.env.example
File metadata and controls
271 lines (226 loc) · 10.7 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# ============================================================================
# STRATOSORT ENVIRONMENT CONFIGURATION
# ============================================================================
# Copy this file to .env and adjust values as needed.
#
# SECURITY NOTICE: Never commit your actual .env file to version control!
#
# All configuration options are centralized in src/shared/config/index.js
# Environment variables override the defaults defined there.
# ============================================================================
# ----------------------------------------------------------------------------
# CRASH REPORTING (SENTRY)
# ----------------------------------------------------------------------------
# Sentry DSN for crash reporting (optional)
# If not provided, crash reports will be stored locally in userData/crash-dumps
# SENTRY_DSN=https://examplePublicKey@o0.ingest.sentry.io/0
# ----------------------------------------------------------------------------
# ENVIRONMENT MODE
# ----------------------------------------------------------------------------
# Values: development | production | test
#
# IMPORTANT FOR PRODUCTION DEPLOYMENTS:
# - Always set NODE_ENV=production for production builds
# - Production mode disables DevTools, reduces logging verbosity,
# and enables performance optimizations
# - Development mode enables hot reloading, verbose logging,
# and developer tools access
#
# WARNING: Running with NODE_ENV=development in production exposes
# debugging features and may impact performance!
# ----------------------------------------------------------------------------
NODE_ENV=production
# ----------------------------------------------------------------------------
# DEVELOPER TOOLS
# ----------------------------------------------------------------------------
# Force opening DevTools on app start (true | false)
# Opens DevTools on app start. In packaged builds, guarded by app.isPackaged (see createWindow.js).
FORCE_DEV_TOOLS=false
# Dev-only delay (ms) to simulate slow folder scans
# STRATOSORT_SCAN_STRUCTURE_DELAY_MS=35000
# ----------------------------------------------------------------------------
# OCR / TESSERACT
# ----------------------------------------------------------------------------
# Override path to the Tesseract binary
# TESSERACT_PATH=C:\Program Files\Tesseract-OCR\tesseract.exe
# Override Tesseract.js worker pool size for the JS OCR fallback.
# Accepts a positive integer; non-numeric values use the auto value.
# STRATOSORT_LOCAL_OCR_WORKERS=
# ----------------------------------------------------------------------------
# RUNTIME & LOGGING
# ----------------------------------------------------------------------------
# Enable console logging in production (set to 1)
# STRATOSORT_CONSOLE_LOGS=1
# ----------------------------------------------------------------------------
# STARTUP & HEALTH CHECKS
# ----------------------------------------------------------------------------
# Service health check timeout in ms (default: 2000)
# SERVICE_CHECK_TIMEOUT=2000
# Strict file-operation validation: when 'true', file-op IPC rejects any path
# that fails strict validation (no symlinks, no traversal, no relative segments).
# Use to harden non-default install profiles or run security tests.
# STRATOSORT_STRICT_FILE_OPS=false
# ----------------------------------------------------------------------------
# SETUP SCRIPT FLAGS (ADVANCED)
# ----------------------------------------------------------------------------
# Skip postinstall rebuild and setup scripts
# SKIP_APP_DEPS=1
#
# Skip Tesseract setup (used by setup scripts/background setup)
# SKIP_TESSERACT_SETUP=1
#
# Minimal model setup (skip optional models)
# MINIMAL_SETUP=1
# ----------------------------------------------------------------------------
# GPU ADVANCED FLAGS
# ----------------------------------------------------------------------------
# Ignore Electron GPU blocklist (advanced)
# STRATOSORT_IGNORE_GPU_BLOCKLIST=1
# Force software rendering — disable GPU hardware acceleration (set to 1)
# STRATOSORT_FORCE_SOFTWARE_GPU=0
#
# Force node-llama-cpp GPU backend for text/embedding (cuda|vulkan|metal|auto|cpu).
# Use when detection picks a slower backend but your driver supports another (e.g. CUDA on NVIDIA).
# STRATOSORT_LLM_GPU_BACKEND=
# Set custom OpenGL implementation (e.g., "angle", "swiftshader", "egl")
# STRATOSORT_GL_IMPLEMENTATION=
# ANGLE graphics backend (default: d3d11 on Windows)
# ANGLE_BACKEND=d3d11
# CUDA version for GPU-accelerated llama.cpp runtime (default: 12.4)
# STRATOSORT_CUDA_VERSION=12.4
# ----------------------------------------------------------------------------
# CI/CD FLAGS
# ----------------------------------------------------------------------------
# CI flag is auto-set by GitHub Actions; do not set locally unless needed
# CI=false
# ----------------------------------------------------------------------------
# FEATURE FLAGS
# ----------------------------------------------------------------------------
# Knowledge graph master toggle (set to 0/1; sub-features use app defaults)
# STRATOSORT_GRAPH_ENABLED=1
# Enable debug mode with verbose logging
# STRATOSORT_DEBUG=1
# Install React DevTools in development mode (true | false)
# REACT_DEVTOOLS=false
# ----------------------------------------------------------------------------
# AI TUNING (ADVANCED)
# ----------------------------------------------------------------------------
# Override default AI models (see src/shared/aiModelConfig.js for defaults)
# STRATOSORT_TEXT_MODEL=
# STRATOSORT_VISION_MODEL=
# STRATOSORT_EMBEDDING_MODEL=
# Vision model batch sizes (advanced GPU tuning)
# STRATOSORT_VISION_BATCH_SIZE=512
# STRATOSORT_VISION_UBATCH_SIZE=512
# Image preflight TTL in ms (default: 15000)
# STRATOSORT_IMAGE_PREFLIGHT_TTL_MS=15000
# LLM JSON repair timeout in ms
# STRATOSORT_JSON_REPAIR_TIMEOUT_MS=5000
# STRATOSORT_PROSE_EXTRACTION_TIMEOUT_MS=5000
# Max concurrent LLM inference requests (default: 1)
# STRATOSORT_INFERENCE_CONCURRENCY=1
# Idle timeout before vision server auto-shuts down (ms, 0 = disabled)
# STRATOSORT_VISION_KEEPALIVE_MS=0
# Hostname allowlist for STRATOSORT_UPDATE_FEED_URL (required in packaged
# builds when a custom feed is set). Comma-separated.
# STRATOSORT_UPDATE_FEED_ALLOWED_HOSTS=updates.example.com
# AI-powered OCR timeout in ms (default: 60000)
# AI_OCR_TIMEOUT=60000
# Override llama.cpp release tag for vision server (default: b9000)
# STRATOSORT_LLAMA_CPP_TAG=b9000
# Override llama.cpp download URL (use a local or mirror archive)
# STRATOSORT_LLAMA_CPP_URL=
# Explicit path to a pre-existing llama-server binary (bypasses download)
# STRATOSORT_LLAMA_SERVER_PATH=
# llama-server subprocess log verbosity (default: 2)
# LLAMA_ARG_LOG_VERBOSITY=2
# ----------------------------------------------------------------------------
# PERSISTENCE (ADVANCED)
# ----------------------------------------------------------------------------
# Storage backend override: "sqlite" (default) | "json" (legacy JSON-file backend)
# STRATOSORT_PERSISTENCE_BACKEND=sqlite
# Per-store backend overrides (take precedence over the global default above).
# The store name is uppercased with non-alphanumerics stripped, so "analysisHistory"
# becomes ANALYSISHISTORY (no underscore). Recognized stores:
# STRATOSORT_EMBEDDINGQUEUE_BACKEND=json
# STRATOSORT_ANALYSISHISTORY_BACKEND=json
# Enable/disable SQLite compression (default: true)
# STRATOSORT_SQLITE_COMPRESS=true
# ----------------------------------------------------------------------------
# WORKER POOLS (ADVANCED)
# ----------------------------------------------------------------------------
# Enable embedding worker thread (default: false — main-process embeddings)
# STRATOSORT_ENABLE_EMBEDDING_WORKER=false
# Orama vector DB LZ4 compression on persist (default: true)
# STRATOSORT_ORAMA_COMPRESS=true
# Orama batch upsert concurrency (1-6, default: 3)
# STRATOSORT_ORAMA_BATCH_UPSERT_CONCURRENCY=3
# Disable Piscina worker pools entirely (default: false)
# STRATOSORT_DISABLE_PISCINA=false
# Disable background throttling for renderer (diagnostic use only)
# STRATOSORT_DISABLE_BACKGROUND_THROTTLING=0
# ----------------------------------------------------------------------------
# RUNTIME OVERRIDES (ADVANCED)
# ----------------------------------------------------------------------------
# Override runtime directory for models/binaries
# STRATOSORT_RUNTIME_DIR=
# Force app launch even if single-instance lock fails
# STRATOSORT_FORCE_LAUNCH=0
# Use official pdfjs-dist instead of bundled PDF parser
# STRATOSORT_USE_OFFICIAL_PDFJS=false
# E2E isolated userData root (set by Playwright harness; do not set manually)
# STRATOSORT_E2E_USER_DATA=
# Redact file/folder paths in the UI (for demos/screen recordings)
# STRATOSORT_REDACT_PATHS=1
# ----------------------------------------------------------------------------
# CONFIGURATION REFERENCE
# ----------------------------------------------------------------------------
# All configuration is defined by CONFIG_SCHEMA in
# src/shared/config/configSchema.js and loaded by src/shared/config/index.js.
# Only the keys that declare an `envVar` can be overridden from this file; the
# rest take their schema default. The categories and their keys are:
#
# SERVER: Development server settings
# - devServerPort
#
# MODELS: AI model configuration
# - textModel, visionModel, embeddingModel, fallbackModels
# - textTemperature, imageTemperature
# - textMaxTokens, imageMaxTokens, maxContentLength
#
# ANALYSIS: File analysis settings
# - maxConcurrency, batchSize, timeout
# - retryAttempts, retryDelay
# - embeddingDimension
# (the per-image vision timeout is NOT here: it is the hard-coded 300s
# TIMEOUTS.AI_ANALYSIS_LONG applied in main/analysis/imageAnalysis.js)
#
# PERFORMANCE: Caching and optimization
# - fileCacheSize, embeddingCacheSize, queryCacheSize
# - cacheTtlShort, cacheTtlMedium, cacheTtlLong
# - debounceMs, throttleMs, batchInsertDelay
# - healthCheckInterval, maxConcurrentNetwork
#
# FILE_LIMITS: Size limits for file operations
# - maxTextFileSize, maxImageFileSize, maxDocumentFileSize
# - maxPathLength
#
# THRESHOLDS: Confidence and scoring thresholds
# - confidenceThreshold, minSimilarityScore
# - confidenceHigh, confidenceMedium
#
# FEATURES: Feature flags
# - debugMode, forceDevTools
# - autoOrganize, backgroundMode, redactPaths
#
# UI: User interface settings
# - notifications
# - workflowRestoreMaxAge, saveDebounceMs
#
# ENV: Runtime environment
# - nodeEnv, isCI, settingsSchemaVersion
#
# To inspect current configuration at runtime, use the system config channel
# (`system:get-config`), exposed to the renderer as:
# window.electronAPI.system.getConfig()
# ----------------------------------------------------------------------------