-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.env.example
More file actions
156 lines (121 loc) · 7.69 KB
/
Copy path.env.example
File metadata and controls
156 lines (121 loc) · 7.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
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
# CocoSearch environment configuration template
# Copy this file to .env and adjust values as needed
# =============================================================================
# Optional (has default: postgresql://cocosearch:cocosearch@localhost:5432/cocosearch)
# =============================================================================
# PostgreSQL connection URL for vector storage (uncomment to override default)
# Format: postgresql://user:password@host:port/database
# COCOSEARCH_DATABASE_URL=postgresql://cocosearch:cocosearch@localhost:5432/cocosearch
# =============================================================================
# Optional (has default: http://localhost:11434)
# =============================================================================
# Ollama API URL for embeddings (only used when provider is "ollama")
# COCOSEARCH_OLLAMA_URL=http://localhost:11434
# Embedding model name (default depends on provider:
# ollama → nomic-embed-text, openai → text-embedding-3-small,
# openrouter → openai/text-embedding-3-small)
# COCOSEARCH_EMBEDDING_MODEL=nomic-embed-text
# =============================================================================
# Optional: Remote Embedding Provider (default: ollama)
# =============================================================================
# Embedding provider: ollama (default), openai, openrouter
# When set to a remote provider, Ollama is not required for indexing.
# COCOSEARCH_EMBEDDING_PROVIDER=ollama
# API key for remote embedding providers (OpenAI, OpenRouter)
# Required when COCOSEARCH_EMBEDDING_PROVIDER is not "ollama" (unless baseUrl is set)
# COCOSEARCH_EMBEDDING_API_KEY=sk-...
# Base URL for any embedding provider. Use this to point any provider at a local
# OpenAI-API-compatible server (Infinity, text-embeddings-inference, vLLM, etc.)
# instead of the default endpoint. When set for a remote provider, the API key
# requirement is relaxed (local servers typically don't need one).
# For the "ollama" provider, this overrides COCOSEARCH_OLLAMA_URL.
# COCOSEARCH_EMBEDDING_BASE_URL=http://localhost:8080
# =============================================================================
# Optional: Query-Rewrite Controller (default: OFF)
# =============================================================================
# When enabled, an LLM rewrites/expands a natural-language query into better
# search terms before retrieval (e.g. "how does login work" ->
# "authentication session credential login user token"). DISABLED by default —
# when off, search behaves exactly as before and no generative model is called.
# Configured exactly like the embedding provider. On any error/timeout the
# controller falls back to the original query, so search never breaks.
# Enable the controller (default: false)
# COCOSEARCH_CONTROLLER_ENABLED=true
# Controller provider: ollama (default), openai, openrouter
# COCOSEARCH_CONTROLLER_PROVIDER=ollama
# Controller model (default per provider:
# ollama -> qwen2.5:3b, openai -> gpt-4o-mini, openrouter -> openai/gpt-4o-mini)
# COCOSEARCH_CONTROLLER_MODEL=qwen2.5:3b
# API key for remote controller providers (OpenAI, OpenRouter).
# If unset and the controller uses the same provider as embedding, the
# embedding key (COCOSEARCH_EMBEDDING_API_KEY) is reused automatically.
# COCOSEARCH_CONTROLLER_API_KEY=sk-...
# Base URL override (point at a local OpenAI-compatible server, or override
# COCOSEARCH_OLLAMA_URL for the ollama provider)
# COCOSEARCH_CONTROLLER_BASE_URL=http://localhost:11434
# Hard timeout in seconds — on timeout, search falls back to the original query
# COCOSEARCH_CONTROLLER_TIMEOUT=5.0
# =============================================================================
# Optional (default: auto-detected from cocosearch.yaml, git root, or cwd)
# =============================================================================
# Override the index name used by all commands (index, search, stats).
# Precedence: CLI flag (-n/--name/--index) > env var > cocosearch.yaml > auto-detect
# COCOSEARCH_INDEX_NAME=cocosearch
# =============================================================================
# Optional (default: not set — dashboard auto-opens in browser)
# =============================================================================
# Set to "1" to prevent the web dashboard from auto-opening in the browser
# when starting the MCP server or running `cocosearch mcp`
# COCOSEARCH_NO_DASHBOARD=1
# Pin the MCP background dashboard to a specific port (default: random OS-assigned port)
# COCOSEARCH_DASHBOARD_PORT=8080
# =============================================================================
# Optional (default: not set — dashboard shows all indexes)
# =============================================================================
# Set the project path for the MCP server. When set, the dashboard auto-selects
# the matching index and shows a "not indexed" banner if the project isn't indexed yet.
# Automatically set by `cocosearch mcp --project-from-cwd` to the current directory.
# COCOSEARCH_PROJECT_PATH=/path/to/your/project
# =============================================================================
# Optional (default: not set — falls back to $EDITOR, then $VISUAL)
# =============================================================================
# Editor command for "Open in Editor" from the web dashboard.
# Resolved in order: COCOSEARCH_EDITOR → EDITOR → VISUAL.
# Supports line-number jumping for: code, vim, nvim, nano, emacs, subl, idea, etc.
# COCOSEARCH_EDITOR=code
# =============================================================================
# Optional (default: 1800 — 30 minutes; 0 to disable)
# =============================================================================
# Idle timeout in seconds for stdio MCP servers. When no MCP tool calls or
# dashboard API requests are received within this period, the server shuts
# down automatically to prevent orphaned processes.
# COCOSEARCH_IDLE_TIMEOUT=1800
# =============================================================================
# Docker / Client Mode (default: not set — CLI runs locally)
# =============================================================================
# When set, the CLI forwards commands to a remote CocoSearch server over HTTP
# instead of running locally. The host does not need PostgreSQL or Ollama.
# COCOSEARCH_SERVER_URL=http://localhost:3000
# Rewrite paths between host and container when using client mode.
# Format: <host_prefix>:<container_prefix>
# The CLI translates host paths → container paths in requests,
# and container paths → host paths in results.
# COCOSEARCH_PATH_PREFIX=~/GIT:/projects
# =============================================================================
# Docker Compose variables (used in docker-compose.yml)
# =============================================================================
# Start infrastructure:
# docker compose up -d # PostgreSQL only
# docker compose --profile ollama up -d # PostgreSQL + Ollama (local embeddings)
# Server port — shared by the MCP server CLI and Docker Compose (default: 3000).
# The CLI reads this when --port is not specified; Docker Compose uses it for
# both the host port mapping and the container's internal port.
# COCOSEARCH_MCP_PORT=3000
# Host directory to mount into the app container as /projects (default: .).
# Only used by `docker compose --profile app up`.
# PROJECTS_DIR=~/GIT
# Directory to scan for available projects (used by the dashboard's project
# discovery). Shows unindexed projects with an option to index them.
# Defaults to the current directory when using `cocosearch dashboard`.
# Set to /projects in docker-compose.yml. Override with --projects-dir flag.
# COCOSEARCH_PROJECTS_DIR=/projects