You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flexible configuration management supporting multiple sources and interactive setup.
183
185
184
-
#### Configuration Sources
186
+
#### Server (`config/` Go package + runtime directory)
187
+
188
+
The **Go package** at repository path `config/` loads server settings from the process environment and from a `.env` file inside the **server configuration directory**. When `go.mod` is present in the process working directory, that directory defaults to `./config` in the repo (alongside the server’s `.env` and SQLite database). Otherwise it follows `MARCHAT_CONFIG_DIR` or the XDG-style user config path (see server `main` and `config` package). This `./config` folder is **not** where the TUI client stores `config.json` or profiles.
189
+
190
+
#### Client (`client/config/`)
191
+
192
+
The **client** stores `config.json`, `profiles.json`, keystore (unless legacy `keystore.dat` in cwd), themes, and debug logs under the **per-user application data directory** (e.g. `%APPDATA%\marchat` on Windows, `~/.config/marchat` on Linux), or under `MARCHAT_CONFIG_DIR` when set. This applies both when developing from a clone and when using release binaries.
193
+
194
+
#### Configuration Sources (server)
185
195
186
196
1.**Environment Variables**: Primary configuration method for production deployments
187
-
2.**`.env` Files**: Local development and testing configuration
197
+
2.**`.env` Files**: Local development and testing configuration (in the server config directory)
188
198
3.**Interactive TUI**: User-friendly setup for initial configuration
189
-
4.**Profile System**: Multiple server configurations for different environments
199
+
4.**Profile System** (client): Multiple server connection profiles in the client config directory
-**Database Settings**: SQLite file path and connection parameters
@@ -197,6 +207,10 @@ Flexible configuration management supporting multiple sources and interactive se
197
207
-**File Transfer**: Size limits and allowed file types
198
208
-**Logging**: Log levels and output destinations
199
209
210
+
### Diagnostics (`internal/doctor`)
211
+
212
+
Shared package invoked by **`marchat-client`** and **`marchat-server`** when passed **`-doctor`** (human-readable report) or **`-doctor-json`** (JSON on stdout). It summarizes Go/OS, resolved config directories, known `MARCHAT_*` variables with secrets masked, role-specific checks (client: profiles, clipboard, TTY; server: `.env`, validation, DB/TLS/sqlite ping), and optionally compares the embedded version to the latest GitHub release. Set **`MARCHAT_DOCTOR_NO_NETWORK=1`** to skip the release check (e.g. air-gapped environments).
213
+
200
214
### Command Line Tools (`cmd/`)
201
215
202
216
Additional command-line utilities for system management and plugin licensing.
@@ -206,6 +220,8 @@ Additional command-line utilities for system management and plugin licensing.
206
220
-**`cmd/server/main.go`**: Main server application with interactive configuration
207
221
-**`cmd/license/main.go`**: Plugin license management and validation tool
208
222
223
+
Both **`marchat-client`** and **`marchat-server`** embed diagnostics via **`internal/doctor`** (`-doctor`, `-doctor-json`); there is no separate doctor binary in release archives.
224
+
209
225
#### License Tool Features
210
226
211
227
-**License Generation**: Create signed licenses for official plugins
@@ -412,8 +428,9 @@ marchat produces two main executables:
412
428
413
429
-**Environment Variables**: Primary configuration method for containers
414
430
-**Interactive Setup**: User-friendly initial configuration through TUI
415
-
-**Profile Management**: Multiple server configurations for different environments
431
+
-**Profile Management**: Multiple server connection profiles on the client
416
432
-**Backward Compatibility**: Support for deprecated command-line flags
433
+
-**Diagnostics**: `-doctor` / `-doctor-json` on each binary for env/config verification (see `internal/doctor`)
Copy file name to clipboardExpand all lines: NOTIFICATIONS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ Only notify when someone @mentions you:
89
89
90
90
## Configuration
91
91
92
-
Notification settings are automatically saved to your config file:
92
+
Notification settings are automatically saved to your client `config.json` (same directory as profiles and themes: per-user app data, or `MARCHAT_CONFIG_DIR` — see [README.md](README.md) and [ARCHITECTURE.md](ARCHITECTURE.md)). Run `marchat-client -doctor` to confirm the resolved path. Example shape:
0 commit comments