ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
categories.h File Reference

Extern declarations for all category entry arrays. More...

Go to the source code of this file.

Variables

const registry_entry_t g_general_entries []
const registry_entry_t g_logging_entries []
const registry_entry_t g_terminal_entries []
const registry_entry_t g_configuration_entries []
const registry_entry_t g_display_entries []
const registry_entry_t g_webcam_entries []
const registry_entry_t g_audio_entries []
const registry_entry_t g_media_entries []
const registry_entry_t g_network_entries []
const registry_entry_t g_security_entries []
const registry_entry_t g_database_entries []
const registry_entry_t g_debug_entries []

Detailed Description

Extern declarations for all category entry arrays.

Author
Zachary Fogg me@zf.nosp@m.o.gg
Date
January 2026

Definition in file categories.h.

Variable Documentation

◆ g_audio_entries

const registry_entry_t g_audio_entries[]
extern

Definition at line 39 of file lib/options/registry/audio.c.

39 {
40 {"test-audio",
41 '\0',
43 offsetof(options_t, test_audio),
44 &default_test_audio,
45 sizeof(bool),
46 "Send a gentle repeating test signal instead of microphone audio and monitor it on speakers; enables audio.",
47 "AUDIO",
48 NULL,
49 false,
50 "ASCII_CHAT_TEST_AUDIO",
51 NULL,
52 NULL,
53 false,
54 false,
56 {0},
57 NULL},
58 {"audio-spectral-agc",
59 '\0',
61 offsetof(options_t, audio_spectral_agc),
62 &default_audio_spectral_agc,
63 sizeof(bool),
64 "Enable spectral RMS gain control with --spectral-audio.",
65 "AUDIO",
66 NULL,
67 false,
68 "ASCII_CHAT_AUDIO_SPECTRAL_AGC",
69 NULL,
70 NULL,
71 false,
72 false,
74 {0},
75 NULL},
76 {"audio-pitch-correct",
77 '\0',
79 offsetof(options_t, audio_pitch_correct),
80 &default_audio_pitch_correct,
81 sizeof(bool),
82 "Experimental monophonic semitone correction with --spectral-audio.",
83 "AUDIO",
84 NULL,
85 false,
86 "ASCII_CHAT_AUDIO_PITCH_CORRECT",
87 NULL,
88 NULL,
89 false,
90 false,
92 {0},
93 NULL},
94 {"spectral-audio",
95 '\0',
97 offsetof(options_t, audio_spectral),
98 &default_audio_spectral,
99 sizeof(bool),
100 "Process microphone audio with FFTW (default on; media/test audio bypass it). Disable with "
101 "--spectral-audio=false.",
102 "AUDIO",
103 NULL,
104 false,
105 "ASCII_CHAT_SPECTRAL_AUDIO",
106 NULL,
107 NULL,
108 false,
109 false,
111 {0},
112 NULL},
113 {"audio-spectral-mixer",
114 '\0',
116 offsetof(options_t, audio_spectral_mixer),
117 &default_audio_spectral_mixer,
118 sizeof(bool),
119 "Opt in to FFTW processing of the entire server mix, including media and test signals (default off).",
120 "AUDIO",
121 NULL,
122 false,
123 "ASCII_CHAT_AUDIO_SPECTRAL_MIXER",
124 NULL,
125 NULL,
126 false,
127 false,
129 {0},
130 NULL},
131 {"audio-spectral-gate",
132 '\0',
134 offsetof(options_t, audio_spectral_gate),
135 &default_audio_spectral_gate,
136 sizeof(bool),
137 "Enable adaptive spectral noise reduction with --spectral-audio.",
138 "AUDIO",
139 NULL,
140 false,
141 "ASCII_CHAT_AUDIO_SPECTRAL_GATE",
142 NULL,
143 NULL,
144 false,
145 false,
147 {0},
148 NULL},
149 {"audio-multiband",
150 '\0',
152 offsetof(options_t, audio_multiband),
153 &default_audio_multiband,
154 sizeof(bool),
155 "Enable four-band compression with --spectral-audio.",
156 "AUDIO",
157 NULL,
158 false,
159 "ASCII_CHAT_AUDIO_MULTIBAND",
160 NULL,
161 NULL,
162 false,
163 false,
165 {0},
166 NULL},
167 {"audio-adaptive-eq",
168 '\0',
170 offsetof(options_t, audio_adaptive_eq),
171 &default_audio_adaptive_eq,
172 sizeof(bool),
173 "Enable bounded spectral EQ balancing with --spectral-audio.",
174 "AUDIO",
175 NULL,
176 false,
177 "ASCII_CHAT_AUDIO_ADAPTIVE_EQ",
178 NULL,
179 NULL,
180 false,
181 false,
183 {0},
184 NULL},
185 {"audio-fft-size",
186 '\0',
188 offsetof(options_t, audio_fft_size),
189 &default_audio_fft_size,
190 sizeof(int),
191 "Spectral FFT size: 512, 1024, or 2048 (latency versus frequency resolution).",
192 "AUDIO",
193 NULL,
194 false,
195 "ASCII_CHAT_AUDIO_FFT_SIZE",
196 validate_audio_fft_size,
197 NULL,
198 false,
199 false,
201 {0},
202 NULL},
203 // AUDIO GROUP (client, discovery)
204 {"audio",
205 'A',
207 offsetof(options_t, audio_enabled),
208 &default_audio_enabled_value,
209 sizeof(bool),
210 "Enable audio streaming (press 'm' during rendering to toggle).",
211 "AUDIO",
212 NULL,
213 false,
214 "ASCII_CHAT_AUDIO",
215 NULL,
216 NULL,
217 false,
218 false,
220 {0},
221 NULL},
222 {"microphone-channels",
223 '\0',
225 offsetof(options_t, microphone_channels),
226 &(const int){1},
227 sizeof(int),
228 "Microphone layout: 1 for centered speech, 2 for a stereo pair.",
229 "AUDIO",
230 NULL,
231 false,
232 "ASCII_CHAT_MICROPHONE_CHANNELS",
233 NULL,
234 NULL,
235 false,
236 false,
238 {.numeric_range = {1, 2, 1}, .input_type = OPTION_INPUT_NUMERIC},
239 NULL},
240 {"microphone-channel",
241 '\0',
243 offsetof(options_t, microphone_channel),
244 &(const int){0},
245 sizeof(int),
246 "First zero-based microphone channel; -1 averages all inputs to mono.",
247 "AUDIO",
248 NULL,
249 false,
250 "ASCII_CHAT_MICROPHONE_CHANNEL",
251 NULL,
252 NULL,
253 false,
254 false,
256 {.numeric_range = {-1, 63, 1}, .input_type = OPTION_INPUT_NUMERIC},
257 NULL},
258 {"microphone-index",
259 '\0',
261 offsetof(options_t, microphone_index),
262 &default_microphone_index_value,
263 sizeof(int),
264 "Microphone device index for audio input.",
265 "AUDIO",
266 NULL,
267 false,
268 "ASCII_CHAT_MICROPHONE_INDEX",
269 NULL,
270 NULL,
271 false,
272 false,
274 {.numeric_range = {-1, INT_MAX, 1}, .examples = g_mic_examples, .input_type = OPTION_INPUT_NUMERIC},
275 NULL},
276 {"speakers-index",
277 '\0',
279 offsetof(options_t, speakers_index),
280 &default_speakers_index_value,
281 sizeof(int),
282 "Speakers device index to use for audio output.",
283 "AUDIO",
284 NULL,
285 false,
286 "ASCII_CHAT_SPEAKERS_INDEX",
287 NULL,
288 NULL,
289 false,
290 false,
292 {.numeric_range = {-1, 10, 1}, .examples = g_speakers_examples, .input_type = OPTION_INPUT_NUMERIC},
293 NULL},
294 {"microphone-volume",
295 '\0',
297 offsetof(options_t, microphone_sensitivity),
298 &default_microphone_sensitivity_value,
299 sizeof(float),
300 "Microphone volume multiplier (0.0-1.0).",
301 "AUDIO",
302 NULL,
303 false,
304 "ASCII_CHAT_MICROPHONE_VOLUME",
305 NULL,
307 false,
308 false,
310 {.numeric_range = {0, 1, 0}},
311 NULL},
312 {"ivolume",
313 '\0',
315 offsetof(options_t, microphone_sensitivity),
316 &default_microphone_sensitivity_value,
317 sizeof(float),
318 "Alias for --microphone-volume.",
319 "AUDIO",
320 NULL,
321 false,
322 "ASCII_CHAT_IVOLUME",
323 NULL,
325 false,
326 false,
328 {.numeric_range = {0, 1, 0}},
329 NULL},
330 {"speakers-volume",
331 '\0',
333 offsetof(options_t, speakers_volume),
334 &default_speakers_volume_value,
335 sizeof(float),
336 "Speakers volume multiplier (0.0-1.0; press =/- during rendering to adjust).",
337 "AUDIO",
338 NULL,
339 false,
340 "ASCII_CHAT_SPEAKERS_VOLUME",
341 NULL,
343 false,
344 false,
346 {.numeric_range = {0, 1, 0}},
347 NULL},
348 {"volume",
349 '\0',
351 offsetof(options_t, speakers_volume),
352 &default_speakers_volume_value,
353 sizeof(float),
354 "Alias for --speakers-volume.",
355 "AUDIO",
356 NULL,
357 false,
358 "ASCII_CHAT_VOLUME",
359 NULL,
361 false,
362 false,
364 {.numeric_range = {0, 1, 0}},
365 NULL},
366 {"audio-source",
367 '\0',
369 offsetof(options_t, audio_source),
370 &default_audio_source_value,
371 sizeof(audio_source_t),
372 "Select audio shown by --waveform/--fft: all (default), call, mic, or media.",
373 "AUDIO",
374 NULL,
375 false,
376 "ASCII_CHAT_AUDIO_SOURCE",
377 NULL,
379 false,
380 false,
382 {.enum_values = g_audio_source_values,
383 .enum_descriptions = g_audio_source_descs,
384 .enum_integer_values = g_audio_source_integers,
385 .input_type = OPTION_INPUT_ENUM},
386 NULL},
387 {"audio-capture-source",
388 '\0',
390 offsetof(options_t, audio_capture_source),
391 &default_audio_capture_source_value,
393 "Select local audio capture and media playback: auto, mic, media, both, or remote.",
394 "AUDIO",
395 NULL,
396 false,
397 "ASCII_CHAT_AUDIO_CAPTURE_SOURCE",
398 NULL,
400 false,
401 false,
403 {.enum_values = g_audio_capture_source_values,
404 .enum_descriptions = g_audio_capture_source_descs,
405 .enum_integer_values = g_audio_capture_source_integers,
406 .input_type = OPTION_INPUT_ENUM},
407 NULL},
408#ifdef DEBUG
409 {"audio-analysis",
410 '\0',
412 offsetof(options_t, audio_analysis_enabled),
413 &default_audio_analysis_value,
414 sizeof(bool),
415 "Enable audio analysis (debug).",
416 "AUDIO",
417 NULL,
418 false,
419 "ASCII_CHAT_AUDIO_ANALYSIS",
420 NULL,
421 NULL,
422 false,
423 false,
425 {0},
426 NULL},
427#endif
428 {"no-audio-playback",
429 '\0',
431 offsetof(options_t, audio_no_playback),
432 &default_no_audio_playback_value,
433 sizeof(bool),
434 "Disable speakers output.",
435 "AUDIO",
436 NULL,
437 false,
438 "ASCII_CHAT_NO_AUDIO_PLAYBACK",
439 NULL,
440 NULL,
441 false,
442 false,
444 {0},
445 NULL},
446 {"encode-audio",
447 '\0',
449 offsetof(options_t, encode_audio),
450 &default_encode_audio_value,
451 sizeof(bool),
452 "Enable Opus audio encoding.",
453 "AUDIO",
454 NULL,
455 false,
456 "ASCII_CHAT_ENCODE_AUDIO",
457 NULL,
458 NULL,
459 false,
460 false,
462 {0},
463 NULL},
464 {"no-encode-audio",
465 '\0',
467 offsetof(options_t, encode_audio),
468 &default_no_encode_audio_value,
469 sizeof(bool),
470 "Disable Opus audio encoding.",
471 "AUDIO",
472 NULL,
473 false,
474 "ASCII_CHAT_NO_ENCODE_AUDIO",
475 NULL,
476 NULL,
477 false,
478 false,
480 {0},
481 NULL},
482 {"no-audio-mixer",
483 '\0',
485 offsetof(options_t, no_audio_mixer),
486 &default_no_audio_mixer_value,
487 sizeof(bool),
488 "Use simple audio mixing without ducking or compression (debug mode only).",
489 "AUDIO",
490 NULL,
491 false,
492 "ASCII_CHAT_NO_AUDIO_MIXER",
493 NULL,
494 NULL,
495 false,
496 false,
498 {0},
499 NULL},
500 {"list-microphones",
501 '\0',
503 0,
504 NULL,
505 0,
506 "List available audio input devices by index and exit.",
507 "AUDIO",
508 NULL,
509 false,
510 NULL,
511 NULL,
512 NULL,
513 false,
514 false,
516 {0},
517 NULL},
518 {"list-speakers",
519 '\0',
521 0,
522 NULL,
523 0,
524 "List available audio output devices by index and exit.",
525 "AUDIO",
526 NULL,
527 false,
528 NULL,
529 NULL,
530 NULL,
531 false,
532 false,
534 {0},
535 NULL},
536
@ OPTION_INPUT_NUMERIC
Numeric value with optional min/max/step.
Definition builder.h:184
@ OPTION_INPUT_ENUM
Choose from fixed set of enum values.
Definition builder.h:183
@ OPTION_TYPE_INT
Integer value (–count 42).
Definition builder.h:168
@ OPTION_TYPE_ACTION
Action that executes and may exit (–list-webcams, etc.).
Definition builder.h:172
@ OPTION_TYPE_CALLBACK
Custom parser function.
Definition builder.h:171
@ OPTION_TYPE_BOOL
Boolean flag (–flag, no value).
Definition builder.h:167
audio_capture_source_t
Definition options.h:290
struct options_state options_t
Immutable, RCU-published snapshot of the application's runtime configuration.
audio_source_t
Audio source selected for visualization.
Definition options.h:276
@ OPTION_MODE_BINARY
Binary-level options (parsed before mode detection).
Definition options.h:945
@ OPTION_MODE_CLIENT
Client mode (bit 1).
Definition options.h:939
@ OPTION_MODE_DISCOVERY
Discovery mode (bit 4).
Definition options.h:942
@ OPTION_MODE_SERVER
Server mode (bit 0).
Definition options.h:938
@ OPTION_MODE_MIRROR
Mirror mode (bit 2).
Definition options.h:940
const char * g_audio_capture_source_values[]
Definition metadata.c:167
const char * g_audio_source_descs[]
Definition metadata.c:163
const char * g_speakers_examples[]
Definition metadata.c:196
const int g_audio_capture_source_integers[]
Definition metadata.c:170
const char * g_audio_source_values[]
Definition metadata.c:160
const char * g_mic_examples[]
Definition metadata.c:195
const char * g_audio_capture_source_descs[]
Definition metadata.c:173
const int g_audio_source_integers[]
Definition metadata.c:162
#define REGISTRY_TERMINATOR()
Initialize a terminator entry (sentinel value for array end) Uses designated initializers to properly...
bool parse_audio_source(const char *arg, void *dest, char **error_msg)
Parse visualization source option (–audio-source).
Definition parsers.c:1114
bool parse_audio_capture_source(const char *arg, void *dest, char **error_msg)
Definition parsers.c:1150
bool parse_volume(const char *arg, void *dest, char **error_msg)
Custom parser for volume options (–volume, –speakers-volume, –microphone-volume).
Definition parsers.c:1042

◆ g_configuration_entries

const registry_entry_t g_configuration_entries[]
extern

Definition at line 19 of file configuration.c.

19 {
20 // CONFIGURATION GROUP (binary-level)
21 {"config",
22 '\0',
24 offsetof(options_t, config_file),
25 "",
26 0,
27 "Load configuration from toml FILE.",
28 "CONFIGURATION",
29 "FILE",
30 false,
31 NULL,
32 NULL,
33 NULL,
34 false,
35 false,
37 {.input_type = OPTION_INPUT_FILEPATH},
38 NULL},
39 {"config-create",
40 '\0',
42 0,
43 NULL,
44 0,
45 "Create default config file and write to FILE or stdout if not specified.",
46 "CONFIGURATION",
47 "[FILE]",
48 false,
49 NULL,
50 NULL,
51 NULL,
52 false,
53 false,
55 {.input_type = OPTION_INPUT_FILEPATH},
56 NULL},
57 {"completions",
58 '\0',
60 0,
61 NULL,
62 0,
63 "Generate shell completions (bash, fish, zsh, powershell) and output to stdout (or optional file path).",
64 "CONFIGURATION",
65 "SHELL [FILE]",
66 false,
67 NULL,
68 NULL,
69 NULL,
70 false,
71 false,
73 {.enum_values = g_completion_shell_values, .input_type = OPTION_INPUT_ENUM},
74 NULL},
75 {"man-page-create",
76 '\0',
78 0,
79 NULL,
80 0,
81 "Generate man page and write to FILE or stdout if not specified.",
82 "CONFIGURATION",
83 "[FILE]",
84 false,
85 NULL,
86 NULL,
87 NULL,
88 false,
89 false,
91 {.input_type = OPTION_INPUT_FILEPATH},
92 NULL},
93
@ OPTION_INPUT_FILEPATH
File path completion.
Definition builder.h:186
@ OPTION_TYPE_STRING
String value (–name foo).
Definition builder.h:169
const char * g_completion_shell_values[]
Definition metadata.c:199

◆ g_database_entries

const registry_entry_t g_database_entries[]
extern

Definition at line 17 of file options/registry/database.c.

17 { // DATABASE GROUP - ACDS Server Specific Options
18 {"database",
19 '\0',
21 offsetof(options_t, discovery_database_path),
22 "",
23 0,
24 "Path to SQLite database for discovery session storage.",
25 "DATABASE",
26 NULL,
27 false,
28 "ASCII_CHAT_DATABASE",
29 NULL,
30 NULL,
31 false,
32 false,
34 {.input_type = OPTION_INPUT_FILEPATH},
35 NULL},
36
@ OPTION_MODE_DISCOVERY_SVC
Discovery server mode (bit 3).
Definition options.h:941

◆ g_debug_entries

const registry_entry_t g_debug_entries[]
extern

Definition at line 16 of file debug.c.

16 {
17#ifndef NDEBUG
18 {"face-follow-debug", '\0', OPTION_TYPE_BOOL, offsetof(options_t, face_follow_debug),
19 &default_face_follow_debug_value, sizeof(bool), "Outline the selected detected face with a red square (debug builds only).",
20 "DEBUG", NULL, false, "ASCII_CHAT_FACE_FOLLOW_DEBUG", NULL, NULL, false, false,
22
23 {"sync-state",
24 '\0',
26 offsetof(options_t, debug_sync_state_time),
27 &default_debug_sync_state_time_value,
28 sizeof(double),
29 "Print synchronization state and named registry statistics after TIME seconds.",
30 "DEBUG",
31 "TIME",
32 false, // required
33 NULL, // env_var_name
34 NULL, // validate_fn
35 NULL, // parse_fn
36 false, // owns_memory
37 true, // optional_arg
39 {0}, // metadata
40 NULL}, // action_fn
41 {"errno-stacks",
42 '\0',
44 offsetof(options_t, debug_errno_stacks_time),
45 &default_debug_errno_stacks_time_value,
46 sizeof(double),
47 "Print pending errors, handled history, and registry statistics after TIME seconds.",
48 "DEBUG",
49 "TIME",
50 false, // required
51 NULL, // env_var_name
52 NULL, // validate_fn
53 NULL, // parse_fn
54 false, // owns_memory
55 true, // optional_arg
57 {0}, // metadata
58 NULL}, // action_fn
59 {"backtrace",
60 '\0',
62 offsetof(options_t, debug_backtrace_time),
63 &default_debug_backtrace_time_value,
64 sizeof(double),
65 "Print backtrace with optional time offset (debug builds only).",
66 "DEBUG",
67 "TIME",
68 false, // required
69 NULL, // env_var_name
70 NULL, // validate_fn
71 NULL, // parse_fn
72 false, // owns_memory
73 true, // optional_arg
75 {0}, // metadata
76 NULL}, // action_fn
77 {"memory-report",
78 '\0',
80 offsetof(options_t, debug_memory_report_interval),
81 &default_debug_memory_report_interval_value,
82 sizeof(double),
83 "Print memory report periodically at specified interval in seconds (debug builds only).",
84 "DEBUG",
85 "TIME",
86 false, // required
87 NULL, // env_var_name
88 NULL, // validate_fn
89 NULL, // parse_fn
90 false, // owns_memory
91 true, // optional_arg
93 {0}, // metadata
94 NULL}, // action_fn
95
96#endif
@ OPTION_TYPE_DOUBLE
Floating point (–ratio 1.5).
Definition builder.h:170
@ OPTION_MODE_ALL
All modes + binary.
Definition options.h:946

◆ g_display_entries

const registry_entry_t g_display_entries[]
extern

Definition at line 108 of file lib/options/registry/display.c.

108 {
109 {.long_name = "zalgo",
110 .type = OPTION_TYPE_CALLBACK,
111 .offset = offsetof(options_t, zalgo),
112 .default_value_size = sizeof(int),
113 .help_text =
114 "Add combining marks at intensity 1-10 (default when enabled: 7). Omit to disable. Terminal/text output only.",
115 .group = "DISPLAY",
116 .arg_placeholder = "LEVEL",
117 .env_var_name = "ASCII_CHAT_ZALGO",
118 .parse_fn = parse_zalgo,
119 .optional_arg = true,
121 .metadata = {.numeric_range = {1, 10, 1}, .input_type = OPTION_INPUT_NUMERIC}},
122 {"waveform",
123 '\0',
125 offsetof(options_t, waveform),
126 &default_waveform_value,
127 sizeof(bool),
128 "Replace the video image with a live waveform of the source selected by --audio-source.",
129 "DISPLAY",
130 NULL,
131 false,
132 "ASCII_CHAT_WAVEFORM",
133 NULL,
134 NULL,
135 false,
136 false,
138 {0},
139 NULL},
140 {"fft",
141 '\0',
143 offsetof(options_t, fft),
144 &default_fft_value,
145 sizeof(bool),
146 "Replace the video image with a live scrolling frequency display for the source selected by --audio-source.",
147 "DISPLAY",
148 NULL,
149 false,
150 "ASCII_CHAT_FFT",
151 NULL,
152 NULL,
153 false,
154 false,
156 {0},
157 NULL},
158 {"fft-scale",
159 '\0',
161 offsetof(options_t, fft_scale),
162 &default_fft_scale,
163 0,
164 "FFT amplitude scale: linear, log, or MIN:MAX dB (default -62:-6).",
165 "DISPLAY",
166 "SCALE",
167 false,
168 "ASCII_CHAT_FFT_SCALE",
169 NULL,
170 parse_fft_scale,
171 false,
172 false,
174 {.input_type = OPTION_INPUT_STRING},
175 NULL},
176 // DISPLAY GROUP (client, mirror, discovery)
177 {"color-filter",
178 '\0',
180 offsetof(options_t, color_filter),
181 &default_color_filter_value,
182 sizeof(color_filter_t),
183 "Apply a monochromatic color tint to grayscale video. Values: none, black, white, green, magenta, fuchsia, "
184 "orange, teal, cyan, pink, red, yellow, rainbow. Using --color-filter automatically sets --color-mode to mono.",
185 "DISPLAY",
186 NULL,
187 false,
188 "ASCII_CHAT_COLOR_FILTER",
189 NULL,
191 false,
192 false,
194 {.enum_values = g_color_filter_values,
195 .enum_descriptions = g_color_filter_descs,
196 .enum_integer_values = g_color_filter_integers,
197 .input_type = OPTION_INPUT_ENUM},
198 NULL},
199 {"render-mode",
200 'M',
202 offsetof(options_t, render_mode),
203 &default_render_mode_value,
204 sizeof(terminal_render_mode_t),
205 "Render mode of text for your client to display. Values: foreground, background, half-block. Press 'r' during "
206 "rendering to cycle.",
207 "DISPLAY",
208 NULL,
209 false,
210 "ASCII_CHAT_RENDER_MODE",
211 NULL,
213 false,
214 false,
216 {.enum_values = g_render_values,
217 .enum_descriptions = g_render_descs,
218 .enum_integer_values = g_render_integers,
219 .input_type = OPTION_INPUT_ENUM},
220 NULL},
221 {"palette",
222 'P',
224 offsetof(options_t, palette_type),
225 &default_palette_type_value,
226 sizeof(palette_type_t),
227 "Palette type with which to render images to text art. Values: standard, blocks, digital, minimal, cool, "
228 "custom. All but 'custom' are built-in presets that all look different and nice. Try them out.",
229 "DISPLAY",
230 NULL,
231 false,
232 "ASCII_CHAT_PALETTE",
233 NULL,
234 parse_explicit_palette,
235 false,
236 false,
238 {.enum_values = g_palette_values,
239 .enum_descriptions = g_palette_descs,
240 .enum_integer_values = g_palette_integers,
241 .input_type = OPTION_INPUT_ENUM},
242 NULL},
243 {"palette-chars",
244 'C',
246 offsetof(options_t, palette_custom),
247 "",
248 0,
249 "Ordered sequence of characters from darkest to brightest to use with custom palette (--palette=custom) for "
250 "rendering images to text art for your client. These characters only will be used to create the rendered output. "
251 "Can be UTF-8 content (see --utf8).",
252 "DISPLAY",
253 "STRING",
254 false,
255 "ASCII_CHAT_PALETTE_CHARS",
256 NULL,
258 false,
259 false,
261 {0},
262 NULL},
263 {.long_name = "renderer",
264 .type = OPTION_TYPE_CALLBACK,
265 .offset = offsetof(options_t, renderer),
266 .default_value = &default_renderer,
267 .default_value_size = sizeof(ascii_renderer_t),
268 .help_text = "Character selection: glyph (default) or luminance matching. Glyph supports printable "
269 "ASCII and Unicode block elements; unsupported palette characters are rejected.",
270 .group = "DISPLAY",
271 .arg_placeholder = "luminance|glyph",
272 .env_var_name = "ASCII_CHAT_RENDERER",
273 .parse_fn = parse_ascii_renderer,
275 .metadata = {.enum_values = renderer_values,
276 .enum_descriptions = renderer_descriptions,
277 .enum_integer_values = renderer_integers,
278 .input_type = OPTION_INPUT_ENUM}},
279 {.long_name = "stabilize",
280 .type = OPTION_TYPE_BOOL,
281 .offset = offsetof(options_t, stabilize),
282 .default_value = &default_stabilize_value,
283 .default_value_size = sizeof(bool),
284 .help_text = "Reduce character and color flicker between video frames in all render modes.",
285 .group = "DISPLAY",
286 .env_var_name = "ASCII_CHAT_STABILIZE",
288 {"stretch",
289 '\0',
291 offsetof(options_t, stretch),
292 &default_stretch_value,
293 sizeof(bool),
294 "Allow aspect ratio distortion of image for rendering ascii output. This can allow the rendered ascii to fill "
295 "your terminal.",
296 "DISPLAY",
297 NULL,
298 false,
299 "ASCII_CHAT_STRETCH",
300 NULL,
301 NULL,
302 false,
303 false,
305 {0},
306 NULL},
307 {"fps",
308 '\0',
310 offsetof(options_t, fps),
311 &default_fps_value,
312 sizeof(int),
313 "Target framerate for rendering (0 = auto, 1-144).",
314 "DISPLAY",
315 NULL,
316 false,
317 "ASCII_CHAT_FPS",
318 NULL,
319 NULL,
320 false,
321 false,
323 {.numeric_range = {0, 144, 1}, .examples = g_fps_examples, .input_type = OPTION_INPUT_NUMERIC},
324 NULL},
325 {"fps-counter",
326 '\0',
328 offsetof(options_t, fps_counter),
329 &default_fps_counter_value,
330 sizeof(bool),
331 "Show FPS counter overlay in top-right corner. Press '-' to toggle.",
332 "DISPLAY",
333 NULL,
334 false,
335 "ASCII_CHAT_FPS_COUNTER",
336 NULL,
337 NULL,
338 false,
339 false,
341 {0},
342 NULL},
343 {"snapshot",
344 'S',
346 offsetof(options_t, snapshot_mode),
347 &default_snapshot_mode_value,
348 sizeof(bool),
349 "Snapshot mode (one frame and exit).",
350 "DISPLAY",
351 NULL,
352 false,
353 "ASCII_CHAT_SNAPSHOT",
354 NULL,
355 NULL,
356 false,
357 false,
359 {0},
360 NULL},
361 {"snapshot-delay",
362 'D',
364 offsetof(options_t, snapshot_delay),
365 &default_snapshot_delay_value,
366 sizeof(double),
367 "Snapshot delay in seconds. The timer starts right before the client-side program prints the first frame. "
368 "--snapshot --snapshot-delay=0 will print the first frame and exit.",
369 "DISPLAY",
370 "SECONDS",
371 false,
372 "ASCII_CHAT_SNAPSHOT_DELAY",
373 NULL,
374 NULL,
375 false,
376 false,
378 {.numeric_range = {0, 3600, 0}, .input_type = OPTION_INPUT_NUMERIC},
379 NULL},
380 {"matrix",
381 '\0',
383 offsetof(options_t, matrix_rain),
384 &default_matrix_rain_value,
385 sizeof(bool),
386 "Enable Matrix-style digital rain effect. Works with --render-mode truecolor|256 and --color-filter [color].",
387 "DISPLAY",
388 NULL,
389 false,
390 "ASCII_CHAT_MATRIX",
391 NULL,
392 NULL,
393 false,
394 false,
396 {0},
397 NULL},
398 {"face-follow",
399 '\0',
401 offsetof(options_t, face_follow),
402 &default_face_follow_value,
403 sizeof(bool),
404 "Automatically zoom and pan to follow your face, with smooth full-frame fallback.",
405 "DISPLAY",
406 NULL,
407 false,
408 "ASCII_CHAT_FACE_FOLLOW",
409 NULL,
410 NULL,
411 false,
412 false,
414 {0},
415 NULL},
416 {"flip-x",
417 '\0',
419 offsetof(options_t, flip_x),
420 &default_flip_x_value,
421 sizeof(bool),
422 "Flip video horizontally (X-axis). Webcam defaults to mirrored; media and audio animations do not. Explicit "
423 "choices apply to all sources until exit.",
424 "DISPLAY",
425 NULL,
426 false,
427 "ASCII_CHAT_FLIP_X",
428 NULL,
429 NULL,
430 false,
431 false,
433 {0},
434 NULL},
435 {"flip-y",
436 '\0',
438 offsetof(options_t, flip_y),
439 &default_flip_y_value,
440 sizeof(bool),
441 "Flip video vertically (Y-axis). Works with webcam, files, and streams.",
442 "DISPLAY",
443 NULL,
444 false,
445 "ASCII_CHAT_FLIP_Y",
446 NULL,
447 NULL,
448 false,
449 false,
451 {0},
452 NULL},
453
@ OPTION_INPUT_STRING
Free-form text input.
Definition builder.h:185
ascii_renderer_t
Consolidated options structure.
Definition options.h:966
palette_type_t
Built-in palette type enumeration.
Definition palette.h:90
const int g_palette_integers[]
Definition metadata.c:121
const char * g_color_filter_descs[]
Definition metadata.c:95
const char * g_palette_descs[]
Definition metadata.c:123
const char * g_color_filter_values[]
Definition metadata.c:84
const char * g_render_descs[]
Definition metadata.c:140
const int g_render_integers[]
Definition metadata.c:137
const char * g_fps_examples[]
Definition metadata.c:189
const char * g_palette_values[]
Definition metadata.c:114
const int g_color_filter_integers[]
Definition metadata.c:91
const char * g_render_values[]
Definition metadata.c:135
bool parse_render_mode(const char *arg, void *dest, char **error_msg)
Parse render mode option.
Definition parsers.c:250
bool parse_color_filter(const char *arg, void *dest, char **error_msg)
Parse color filter option.
Definition parsers.c:219
bool parse_palette_chars(const char *arg, void *dest, char **error_msg)
Parse custom palette characters option.
Definition parsers.c:875

◆ g_general_entries

const registry_entry_t g_general_entries[]
extern

Definition at line 20 of file general.c.

20 {
21 {.long_name = "server",
22 .type = OPTION_TYPE_BOOL,
23 .offset = offsetof(options_t, mcp_server_restricted),
24 .help_text = "Restrict MCP capabilities for cloud deployment (no webcam or caller-selected filesystem paths).",
25 .group = "MCP",
26 .env_var_name = "ASCII_CHAT_SERVER",
27 .mode_bitmask = OPTION_MODE_MCP_SERVER},
28 {.long_name = "downloads-dir",
29 .type = OPTION_TYPE_STRING,
30 .offset = offsetof(options_t, mcp_downloads_dir),
31 .default_value = "",
32 .default_value_size = OPTIONS_BUFF_SIZE,
33 .help_text = "Directory for temporary hosted MCP downloads (default: application data directory).",
34 .group = "MCP",
35 .env_var_name = "ASCII_CHAT_DOWNLOADS_DIR",
36 .mode_bitmask = OPTION_MODE_MCP_SERVER},
37 {.long_name = "downloads-url-prefix",
38 .type = OPTION_TYPE_STRING,
39 .offset = offsetof(options_t, mcp_downloads_url_prefix),
40 .default_value = "",
41 .default_value_size = OPTIONS_BUFF_SIZE,
42 .help_text = "Public HTTP(S) base URL for hosted download links, e.g. https://mcp.example.com.",
43 .group = "MCP",
44 .env_var_name = "ASCII_CHAT_DOWNLOADS_URL_PREFIX",
45 .mode_bitmask = OPTION_MODE_MCP_SERVER},
46 {.long_name = "transport",
47 .type = OPTION_TYPE_STRING,
48 .offset = offsetof(options_t, mcp_transport),
49 .default_value = "stdio",
50 .default_value_size = OPTIONS_BUFF_SIZE,
51 .help_text = "MCP transport: http or stdio (default). --server independently restricts cloud capabilities.",
52 .metadata = {.enum_values = g_mcp_transport_values, .input_type = OPTION_INPUT_ENUM},
53 .group = "MCP",
54 .env_var_name = "ASCII_CHAT_TRANSPORT",
55 .mode_bitmask = OPTION_MODE_MCP_SERVER},
56 {.long_name = "http-origin",
57 .type = OPTION_TYPE_STRING,
58 .offset = offsetof(options_t, http_origin),
59 .default_value = "https://mcp.ascii-chat.com",
60 .default_value_size = OPTIONS_BUFF_SIZE,
61 .help_text = "Allowed browser Origin for MCP HTTP requests.",
62 .group = "MCP",
63 .env_var_name = "ASCII_CHAT_HTTP_ORIGIN",
64 .mode_bitmask = OPTION_MODE_MCP_SERVER},
65 // GENERAL GROUP (binary-level + all modes)
66 {"help",
67 'h',
69 0,
70 NULL,
71 0,
72 "Show this help message and exit.",
73 "GENERAL",
74 NULL,
75 false,
76 NULL,
77 NULL,
78 NULL,
79 false,
80 false,
83 {0},
84 NULL},
85 {"version",
86 'v',
88 0,
89 NULL,
90 0,
91 "Show version information and exit.",
92 "GENERAL",
93 NULL,
94 false,
95 NULL,
96 NULL,
97 NULL,
98 false,
99 false,
101 {0},
102 NULL},
103 {"splash-screen",
104 '\0',
106 offsetof(options_t, splash_screen),
107 &default_splash_value,
108 sizeof(bool),
109 "Enable or disable splash screen with ASCII art. Overrides CLAUDECODE environment variable.",
110 "GENERAL",
111 NULL,
112 false,
113 "ASCII_CHAT_SPLASH_SCREEN",
114 NULL,
115 NULL,
116 false,
117 true, // optional_arg: allows --splash-screen to toggle or --splash-screen=true/false
119 {0},
120 NULL},
121 {"status-screen",
122 '\0',
124 offsetof(options_t, status_screen),
125 &default_status_screen_value,
126 sizeof(bool),
127 "Enable or disable live status screen display. Overrides non-interactive terminal checks.",
128 "GENERAL",
129 NULL,
130 false,
131 "ASCII_CHAT_STATUS_SCREEN",
132 NULL,
133 NULL,
134 false,
135 true, // optional_arg: allows --status-screen to toggle or --status-screen=true/false
137 {0},
138 NULL},
139 {"keepawake",
140 '\0',
142 offsetof(options_t, enable_keepawake),
143 &default_enable_keepawake_value,
144 sizeof(bool),
145 "Explicitly enable system sleep prevention (keepawake mode).",
146 "GENERAL",
147 NULL,
148 false,
149 "ASCII_CHAT_KEEPAWAKE",
150 NULL,
151 NULL,
152 false,
153 false,
155 {0},
156 NULL},
157 {"no-keepawake",
158 '\0',
160 offsetof(options_t, disable_keepawake),
161 &default_disable_keepawake_value,
162 sizeof(bool),
163 "Disable system sleep prevention (allow OS to sleep).",
164 "GENERAL",
165 NULL,
166 false,
167 "ASCII_CHAT_NO_KEEPAWAKE",
168 NULL,
169 NULL,
170 false,
171 false,
173 {0},
174 NULL},
175 {"check-update",
176 '\0',
178 0,
179 NULL,
180 0,
181 "Check for updates from GitHub releases and exit.",
182 "GENERAL",
183 NULL,
184 false,
185 NULL,
186 NULL,
187 NULL,
188 false,
189 false,
191 {0},
192 NULL},
193 {"no-check-update",
194 '\0',
196 offsetof(options_t, no_check_update),
197 &default_no_check_update_value,
198 sizeof(bool),
199 "Disable automatic update checks at startup.",
200 "GENERAL",
201 NULL,
202 false,
203 "ASCII_CHAT_NO_CHECK_UPDATE",
204 NULL,
205 NULL,
206 false,
207 false,
209 {0},
210 NULL},
211
#define OPTIONS_BUFF_SIZE
Buffer size for option string values.
Definition options.h:310
@ OPTION_MODE_MCP_SERVER
Definition options.h:943

◆ g_logging_entries

const registry_entry_t g_logging_entries[]
extern

Definition at line 29 of file options/registry/logging.c.

29 {
30 {"otel-log-level",
31 '\0',
33 offsetof(options_t, otel_log_level),
34 default_otel_log_level,
35 sizeof(((options_t *)0)->otel_log_level),
36 "Minimum exported log level: dev,debug,info,warn,error,fatal.",
37 "OTEL",
38 "LEVEL",
39 false,
40 "ASCII_CHAT_OTEL_LOG_LEVEL",
41 NULL,
42 NULL,
43 false,
44 false,
46 {.input_type = OPTION_INPUT_STRING},
47 NULL},
48 {"otel-endpoint",
49 '\0',
51 offsetof(options_t, otel_endpoint),
53 sizeof(((options_t *)0)->otel_endpoint),
54 "Collector base URL; enables telemetry. OTEL_EXPORTER_OTLP_PROTOCOL selects http/protobuf or grpc.",
55 "OTEL",
56 "VALUE",
57 false,
58 "ASCII_CHAT_OTEL_ENDPOINT",
59 NULL,
60 NULL,
61 false,
62 false,
64 {.input_type = OPTION_INPUT_STRING},
65 NULL},
66 {"otel-ca-file",
67 '\0',
69 offsetof(options_t, otel_ca_file),
70 NULL,
71 sizeof(((options_t *)0)->otel_ca_file),
72 "PEM CA bundle for HTTPS telemetry; replaces system roots.",
73 "OTEL",
74 "VALUE",
75 false,
76 "ASCII_CHAT_OTEL_CA_FILE",
77 NULL,
78 NULL,
79 false,
80 false,
82 {.input_type = OPTION_INPUT_STRING},
83 NULL},
84 {"otel-enabled-telemetry",
85 '\0',
87 offsetof(options_t, otel_enabled_telemetry),
88 default_otel_enabled_telemetry,
89 sizeof(((options_t *)0)->otel_enabled_telemetry),
90 "Comma-separated traces,logs,metrics, or none.",
91 "OTEL",
92 "VALUE",
93 false,
94 "ASCII_CHAT_OTEL_ENABLED_TELEMETRY",
95 NULL,
96 NULL,
97 false,
98 false,
100 {.input_type = OPTION_INPUT_STRING},
101 NULL},
102 {"otel-realtime-sample-rate",
103 '\0',
105 offsetof(options_t, otel_realtime_sample_rate),
106 &default_otel_realtime_sample_rate,
107 sizeof(((options_t *)0)->otel_realtime_sample_rate),
108 "Sampling probability for frame/audio/packet operations (0..1).",
109 "OTEL",
110 "VALUE",
111 false,
112 "ASCII_CHAT_OTEL_REALTIME_SAMPLE_RATE",
113 NULL,
114 NULL,
115 false,
116 false,
118 {.numeric_range = {0, 1, 0}, .input_type = OPTION_INPUT_NUMERIC},
119 NULL},
120 {"otel-realtime-max-per-second",
121 '\0',
123 offsetof(options_t, otel_realtime_max_per_second),
124 &default_otel_realtime_max_per_second,
125 sizeof(((options_t *)0)->otel_realtime_max_per_second),
126 "Maximum sampled realtime root operations per process per second.",
127 "OTEL",
128 "VALUE",
129 false,
130 "ASCII_CHAT_OTEL_REALTIME_MAX_PER_SECOND",
131 NULL,
132 NULL,
133 false,
134 false,
136 {.numeric_range = {1, 1048576, 1}, .input_type = OPTION_INPUT_NUMERIC},
137 NULL},
138 {"otel-metrics-interval",
139 '\0',
141 offsetof(options_t, otel_metrics_interval),
142 &default_otel_metrics_interval,
143 sizeof(((options_t *)0)->otel_metrics_interval),
144 "Metrics export interval in milliseconds.",
145 "OTEL",
146 "VALUE",
147 false,
148 "ASCII_CHAT_OTEL_METRICS_INTERVAL",
149 NULL,
150 NULL,
151 false,
152 false,
154 {.numeric_range = {1, 1048576, 1}, .input_type = OPTION_INPUT_NUMERIC},
155 NULL},
156 {"otel-timeout",
157 '\0',
159 offsetof(options_t, otel_timeout),
160 &default_otel_timeout,
161 sizeof(((options_t *)0)->otel_timeout),
162 "Export timeout in milliseconds; shutdown flush is capped at 400 ms.",
163 "OTEL",
164 "VALUE",
165 false,
166 "ASCII_CHAT_OTEL_TIMEOUT",
167 NULL,
168 NULL,
169 false,
170 false,
172 {.numeric_range = {1, 1048576, 1}, .input_type = OPTION_INPUT_NUMERIC},
173 NULL},
174 {"otel-queue-capacity",
175 '\0',
177 offsetof(options_t, otel_queue_capacity),
178 &default_otel_queue_capacity,
179 sizeof(((options_t *)0)->otel_queue_capacity),
180 "Bounded exporter queue capacity (power of two).",
181 "OTEL",
182 "VALUE",
183 false,
184 "ASCII_CHAT_OTEL_QUEUE_CAPACITY",
185 NULL,
186 NULL,
187 false,
188 false,
190 {.numeric_range = {1, 1048576, 1}, .input_type = OPTION_INPUT_NUMERIC},
191 NULL},
192
193 {"stats-interval",
194 '\0',
196 offsetof(options_t, stats_interval),
197 &default_stats_interval,
198 sizeof(int),
199 "Write plain statistics to stdout (stderr for MCP) every N seconds (0 disables). Press = for live statistics.",
200 "LOGGING",
201 "SECONDS",
202 false,
203 "ASCII_CHAT_STATS_INTERVAL",
204 NULL,
205 NULL,
206 false,
207 false,
209 {.numeric_range = {0, 86400, 1}, .input_type = OPTION_INPUT_NUMERIC},
210 NULL},
211 // LOGGING GROUP (binary-level)
212 {"log-file",
213 'L',
215 offsetof(options_t, log_file),
216 NULL, // Use mode_default_getter instead
217 0,
218#ifndef NDEBUG
219 "Set FILE as path for log file (default: current directory; filenames: server.log, client.log, mirror.log, "
220 "acds.log, discovery.log).",
221#else
222 "Set FILE as path for log file (default: $TMPDIR/ascii-chat/ or %TEMP%\\ascii-chat\\; filenames: server.log, "
223 "client.log, mirror.log, acds.log, discovery.log).",
224#endif
225 "LOGGING",
226 "FILE",
227 false,
228 "ASCII_CHAT_LOG_FILE",
229 NULL,
231 false,
232 false,
233#ifndef NDEBUG
235#else
237#endif
238 {0},
240 {"log-level",
241 '\0',
243 offsetof(options_t, log_level),
244 &default_log_level_value,
245 sizeof(log_level_t),
246 "Set log level: dev, debug, info, warn, error, fatal. Logs at or above this level are written.",
247 "LOGGING",
248 NULL,
249 false,
250 "ASCII_CHAT_LOG_LEVEL",
251 NULL,
253 false,
254 false,
256 {.enum_values = g_log_level_values,
257 .enum_descriptions = g_log_level_descs,
258 .enum_integer_values = g_log_level_integers,
259 .input_type = OPTION_INPUT_ENUM},
260 NULL},
261 {"verbose",
262 'V',
264 offsetof(options_t, verbose_level),
265 0,
266 sizeof(unsigned short int),
267 "Increase log verbosity (stackable: -VV, -VVV).",
268 "LOGGING",
269 NULL,
270 false,
271 "ASCII_CHAT_VERBOSE",
272 NULL,
274 false,
275 true,
277 {0},
278 NULL},
279 {"quiet",
280 'q',
282 offsetof(options_t, quiet),
283 &default_quiet_value,
284 sizeof(bool),
285 "Disable console logging (log to file only).",
286 "LOGGING",
287 NULL,
288 false,
289 "ASCII_CHAT_QUIET",
290 NULL,
291 NULL,
292 false,
293 false,
295 {0},
296 NULL},
297 {"grep",
298 '\0',
300 offsetof(options_t, grep_pattern),
301 NULL, // Default is empty string - not meaningful to display in help
302 sizeof(char *),
303 "Filter console logs with perl compatible regular expressions or fixed strings. "
304 "Format 1: /pattern/flags (with flags). Format 2: pattern (plain regex, no flags). "
305 "Flags (format 1 only): i(case-insensitive), m(multiline), s(dotall), x(extended), g(global highlight), "
306 "I(invert match), F(fixed string), A<n>(n lines after), B<n>(n lines before), C<n>(n lines of context). "
307 "Multiple --grep allowed (OR).",
308 "LOGGING",
309 "PATTERN",
310 false,
311 "ASCII_CHAT_GREP",
312 NULL,
313 NULL,
314 false,
315 false,
317 {.examples = (const char *[]){"ERROR", "client\\.c", "network.*failed", NULL}},
318 NULL},
319 {"color-scheme",
320 '\0',
322 offsetof(options_t, color_scheme_name),
324 sizeof(((options_t *)0)->color_scheme_name),
325 "Color scheme for logging output. Built-in schemes: pastel, nord, solarized, dracula, gruvbox, "
326 "monokai, base16-default. All schemes with light variants auto-adapt to terminal background.",
327 "LOGGING",
328 "NAME",
329 false,
330 "ASCII_CHAT_COLOR_SCHEME",
331 NULL,
332 NULL,
333 false,
334 false,
336 {.input_type = OPTION_INPUT_STRING},
337 NULL},
338 {"json",
339 '\0',
341 offsetof(options_t, json),
342 &default_json_value,
343 sizeof(bool),
344 "Enable JSON logging (machine-readable NDJSON format). Disabled by default (text format).",
345 "LOGGING",
346 NULL,
347 false,
348 "ASCII_CHAT_JSON",
349 NULL,
350 NULL,
351 false,
352 false,
354 {0},
355 NULL},
356 {"log-template",
357 '\0',
359 offsetof(options_t, log_template),
360 NULL,
361 sizeof(((options_t *)0)->log_template),
362 "Custom log format string. Format specifiers: %time(fmt) - time with strftime format (see man 3 strftime); "
363 "%level - log level (DEV/DEBUG/INFO/WARN/ERROR/FATAL); %level_aligned - level padded to 5 chars; "
364 "%file - full file path; %file_relative - file path relative to project root; %line - line number; "
365 "%func - function name; %tid - thread ID; %message - log message; "
366 "%color(LEVEL, text) - colorize text using LEVEL's color from current scheme. "
367 "Escape %% for literal %, \\\\ for literal backslash.",
368 "LOGGING",
369 "TEMPLATE",
370 false,
371 "ASCII_CHAT_LOG_TEMPLATE",
372 NULL,
373 NULL,
374 false,
375 false,
377 {.input_type = OPTION_INPUT_STRING},
378 NULL},
379 {"log-format-console",
380 '\0',
382 offsetof(options_t, log_format_console_only),
383 NULL,
384 sizeof(bool),
385 "Apply custom log template (--log-template) only to console output (file logs use default format). See "
386 "--log-template "
387 "for supported format specifiers.",
388 "LOGGING",
389 NULL,
390 false,
391 "ASCII_CHAT_LOG_FORMAT_CONSOLE",
392 NULL,
393 NULL,
394 false,
395 false,
397 {0},
398 NULL},
399
log_level_t
Logging levels enumeration.
Definition types.h:29
#define log_file(...)
File-only logging - writes to log file only, no stderr output.
Definition log/log.h:693
#define OPT_OTEL_ENDPOINT_DEFAULT
Debug and Dev builds export to the local Spaniel Compose collector.
Definition options.h:354
#define OPT_COLOR_SCHEME_NAME_DEFAULT
Default color scheme name (pastel).
Definition options.h:370
const char * g_log_level_descs[]
Definition metadata.c:31
const int g_log_level_integers[]
Definition metadata.c:30
const char * g_log_level_values[]
Definition metadata.c:23
const void * get_default_log_file(asciichat_mode_t mode)
Get mode-specific default value for –log-file.
bool parse_verbose_flag(const char *arg, void *dest, char **error_msg)
Custom parser for –verbose flag.
Definition parsers.c:919
bool parse_log_file(const char *arg, void *dest, char **error_msg)
Custom parser for log file paths (–log-file, -L).
Definition parsers.c:1074
bool parse_log_level(const char *arg, void *dest, char **error_msg)
Parse log level option.
Definition parsers.c:399

◆ g_media_entries

const registry_entry_t g_media_entries[]
extern

Definition at line 92 of file media.c.

92 {
93 // Media File Streaming Options
94 {"file",
95 'f',
97 offsetof(options_t, media_file),
98 "",
99 0,
100 "Append a media file to the playback playlist (repeat --file/--url in order). Stream from media file or stdin "
101 "(use '-' for stdin). Supported formats: see man ffmpeg-formats; codecs: see man "
102 "ffmpeg-codecs.",
103 "MEDIA",
104 NULL,
105 false,
106 "ASCII_CHAT_FILE",
107 NULL,
108 parse_media_file,
109 false,
110 false,
112 {.input_type = OPTION_INPUT_FILEPATH},
113 NULL},
114 {"url",
115 'u',
117 offsetof(options_t, media_url),
118 "",
119 0,
120 "Append a network URL to the playback playlist (repeat --file/--url in order). Direct HTTP/HTTPS/RTSP streams use "
121 "FFmpeg; complex sites (YouTube, TikTok, etc.) use "
122 "yt-dlp. Supported formats: see man ffmpeg-formats; codecs: see man ffmpeg-codecs; sites: yt-dlp "
123 "https://github.com/yt-dlp/yt-dlp/blob/master/README.md#supported-sites.",
124 "MEDIA",
125 NULL,
126 false,
127 "ASCII_CHAT_URL",
128 NULL,
129 parse_media_url,
130 false,
131 false,
133 {0},
134 NULL},
135 {"loop",
136 'l',
138 offsetof(options_t, media_loop),
139 &default_media_loop_value,
140 sizeof(bool),
141 "Loop single media or repeat the complete playlist.",
142 "MEDIA",
143 NULL,
144 false,
145 "ASCII_CHAT_LOOP",
146 NULL,
147 NULL,
148 false,
149 false,
151 {0},
152 NULL},
153 {"pause",
154 '\0',
156 offsetof(options_t, pause),
157 &default_pause_value,
158 sizeof(bool),
159 "Start playback paused (toggle with spacebar, requires --file or --url).",
160 "MEDIA",
161 NULL,
162 false,
163 "ASCII_CHAT_PAUSE",
164 NULL,
165 NULL,
166 false,
167 false,
169 {0},
170 NULL},
171 {"seek",
172 's',
174 offsetof(options_t, media_seek_timestamp),
175 &default_media_seek_value,
176 sizeof(double),
177 "Seek to timestamp before playback (format: seconds, MM:SS, or HH:MM:SS.ms).",
178 "MEDIA",
179 NULL,
180 false,
181 "ASCII_CHAT_SEEK",
182 NULL,
184 false,
185 false,
187 {.examples = g_seek_examples, .input_type = OPTION_INPUT_STRING},
188 NULL},
189 {"yt-dlp-options",
190 '\0',
192 offsetof(options_t, yt_dlp_options),
193 NULL,
194 sizeof(((options_t *)0)->yt_dlp_options),
195 "Arbitrary yt-dlp options passed to the extraction subprocess for URL resolution. "
196 "Examples: --no-warnings or --proxy socks5://127.0.0.1:1080 or --cookies-from-browser=firefox.",
197 "MEDIA",
198 NULL,
199 false,
200 "ASCII_CHAT_YT_DLP_OPTIONS",
201 NULL,
202 NULL,
203 false,
204 false,
206 {0},
207 NULL},
208 {"video-codec",
209 '\0',
211 offsetof(options_t, video_codec),
212 "auto",
213 sizeof(((options_t *)0)->video_codec),
214 "Video codec: auto (default) tries HEVC, H.264, then raw RGB. Explicit hevc, h264, or raw never falls back.",
215 "MEDIA",
216 "CODEC",
217 false,
218 "ASCII_CHAT_VIDEO_CODEC",
219 validate_video_codec,
220 NULL,
221 false,
222 false,
224 {0},
225 NULL},
226
227#define RENDER_FILE_MODES (OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY)
228
229#ifndef __EMSCRIPTEN__
230 {"render-kitty",
231 '\0',
233 offsetof(options_t, render_kitty),
234 &default_render_kitty_value,
235 sizeof(bool),
236 "Display a snapshot using Kitty graphics (requires --snapshot). Combine with --render-file to save it.",
237 "MEDIA",
238 NULL,
239 false,
240 "ASCII_CHAT_RENDER_KITTY",
241 validate_kitty_output,
242 NULL,
243 false,
244 false,
246 {0},
247 NULL},
248#endif
249
250 {"render-file",
251 '\0',
253 offsetof(options_t, render_file),
254 "",
255 sizeof(((options_t *)0)->render_file),
256 "Render ASCII frames to stdout or video/image file. Use '-' for stdout; extension determines format: "
257 ".mp4, .mov, .webm, .avi, .gif, .png, .jpg. Named files retain ASCII on stdout and show terminal "
258 "progress while finishing; redirect stdout to hide it.",
259 "MEDIA",
260 "PATH",
261 false,
262 "ASCII_CHAT_RENDER_FILE",
263 validate_kitty_output,
264 NULL,
265 false,
266 false,
268 {.input_type = OPTION_INPUT_FILEPATH},
269 NULL},
270
271 {"render-theme",
272 '\0',
274 offsetof(options_t, render_theme),
275 &default_render_theme_value,
276 sizeof(int),
277 "Terminal color scheme for rendered output: dark, light, auto.",
278 "MEDIA",
279 "THEME",
280 false,
281 "ASCII_CHAT_RENDER_THEME",
282 NULL,
284 false,
285 false,
287 {.enum_values = g_render_theme_values, .enum_descriptions = g_render_theme_descs, .input_type = OPTION_INPUT_ENUM},
288 NULL},
289
290 {"render-font",
291 '\0',
293 offsetof(options_t, render_font),
294 "",
295 sizeof(((options_t *)0)->render_font),
296 "Font for render-file output: bundled names (matrix or default), system font names, or absolute .ttf/.otf path. "
297 "Default: default (bundled DejaVu Sans Mono). "
298 "Examples: matrix, default, JetBrains Mono, Nerd Font Mono, /path/to/font.ttf.",
299 "MEDIA",
300 "FONT",
301 false,
302 "ASCII_CHAT_RENDER_FONT",
303 NULL,
304 NULL,
305 false,
306 false,
308 {.input_type = OPTION_INPUT_FILEPATH},
309 NULL},
310
311 {"render-font-size",
312 '\0',
314 offsetof(options_t, render_font_size),
315 &default_render_font_size_value,
316 sizeof(double),
317 "Font size in points for render-file output (default: 0, auto-scales video; positive fractional sizes supported).",
318 "MEDIA",
319 "SIZE",
320 false,
321 "ASCII_CHAT_RENDER_FONT_SIZE",
322 validate_render_font_size,
323 NULL,
324 false,
325 false,
327 {.input_type = OPTION_INPUT_NUMERIC},
328 NULL},
329
#define RENDER_FILE_MODES
const char * g_render_theme_values[]
Definition metadata.c:151
const char * g_seek_examples[]
Definition metadata.c:197
const char * g_render_theme_descs[]
Definition metadata.c:153
bool parse_timestamp(const char *arg, void *dest, char **error_msg)
Custom parser for –seek flag.
Definition parsers.c:957
bool parse_render_theme(const char *arg, void *dest, char **error_msg)
Parse render theme option for pixel rendering.
Definition parsers.c:297

◆ g_network_entries

const registry_entry_t g_network_entries[]
extern

Definition at line 40 of file options/registry/network.c.

40 {
41 {.long_name = "webtransport-public-url",
42 .type = OPTION_TYPE_STRING,
43 .offset = offsetof(options_t, webtransport_public_url),
44 .default_value_size = OPTIONS_BUFF_SIZE,
45 .help_text = "Public HTTPS WebTransport endpoint advertised after discovery authentication.",
46 .group = "NETWORK",
47 .env_var_name = "ASCII_CHAT_WEBTRANSPORT_PUBLIC_URL",
49 .metadata = {.input_type = OPTION_INPUT_STRING}},
50 {.long_name = "discovery-quic",
51 .type = OPTION_TYPE_BOOL,
52 .offset = offsetof(options_t, discovery_quic),
53 .default_value = &default_quic_audio_datagrams,
54 .default_value_size = sizeof(bool),
55 .help_text = "Connect to a disclosed discovery host using its advertised native QUIC endpoint.",
56 .group = "NETWORK",
57 .env_var_name = "ASCII_CHAT_DISCOVERY_QUIC",
58 .mode_bitmask = OPTION_MODE_DISCOVERY},
59 {.long_name = "quic-fallback-port",
60 .type = OPTION_TYPE_INT,
61 .offset = offsetof(options_t, quic_fallback_port),
62 .default_value_size = sizeof(int),
63 .help_text = "TCP fallback port after QUIC timeout (requires --server-key; 0 disables fallback).",
64 .group = "NETWORK",
65 .env_var_name = "ASCII_CHAT_QUIC_FALLBACK_PORT",
67 .metadata = {.numeric_range = {0, 65535, 1}, .input_type = OPTION_INPUT_NUMERIC}},
68 {.long_name = "quic-audio-datagrams",
69 .type = OPTION_TYPE_BOOL,
70 .offset = offsetof(options_t, quic_audio_datagrams),
71 .default_value = &default_quic_audio_datagrams,
72 .default_value_size = sizeof(bool),
73 .help_text = "Prefer QUIC datagrams for audio when negotiated; otherwise use reliable streams.",
74 .group = "NETWORK",
75 .env_var_name = "ASCII_CHAT_QUIC_AUDIO_DATAGRAMS",
77 {.long_name = "quic-visual-datagrams",
78 .type = OPTION_TYPE_BOOL,
79 .offset = offsetof(options_t, quic_visual_datagrams),
80 .default_value = &default_quic_audio_datagrams,
81 .default_value_size = sizeof(bool),
82 .help_text = "Prefer QUIC datagrams for visual media when negotiated; otherwise use reliable streams.",
83 .group = "NETWORK",
84 .env_var_name = "ASCII_CHAT_QUIC_VISUAL_DATAGRAMS",
86 {.long_name = "tls-ca-file",
87 .type = OPTION_TYPE_STRING,
88 .offset = offsetof(options_t, tls_ca_file),
89 .default_value_size = OPTIONS_BUFF_SIZE,
90 .help_text = "CA certificate file for secure network client verification (default: system trust).",
91 .group = "NETWORK",
92 .env_var_name = "ASCII_CHAT_TLS_CA_FILE",
94 .metadata = {.input_type = OPTION_INPUT_STRING}},
95 {.long_name = "webtransport-bind-address",
96 .type = OPTION_TYPE_STRING,
97 .offset = offsetof(options_t, webtransport_bind_address),
98 .default_value_size = OPTIONS_BUFF_SIZE,
99 .help_text = "Enable a browser WebTransport listener on a concrete numeric IP address.",
100 .group = "NETWORK",
101 .env_var_name = "ASCII_CHAT_WEBTRANSPORT_BIND_ADDRESS",
103 .metadata = {.input_type = OPTION_INPUT_STRING}},
104 {.long_name = "webtransport-origin",
105 .type = OPTION_TYPE_STRING,
106 .offset = offsetof(options_t, webtransport_origin),
107 .default_value_size = OPTIONS_BUFF_SIZE,
108 .help_text = "Exact HTTPS origin allowed to connect to WebTransport.",
109 .group = "NETWORK",
110 .env_var_name = "ASCII_CHAT_WEBTRANSPORT_ORIGIN",
112 .metadata = {.input_type = OPTION_INPUT_STRING}},
113 {.long_name = "webtransport-path",
114 .type = OPTION_TYPE_STRING,
115 .offset = offsetof(options_t, webtransport_path),
116 .default_value = "/acip",
117 .default_value_size = OPTIONS_BUFF_SIZE,
118 .help_text = "WebTransport CONNECT path (default: /acip).",
119 .group = "NETWORK",
120 .env_var_name = "ASCII_CHAT_WEBTRANSPORT_PATH",
122 .metadata = {.input_type = OPTION_INPUT_STRING}},
123 {.long_name = "quic-bind-address",
124 .type = OPTION_TYPE_STRING,
125 .offset = offsetof(options_t, quic_bind_address),
126 .default_value_size = OPTIONS_BUFF_SIZE,
127 .help_text = "Enable the native QUIC listener on a concrete numeric IPv4 or IPv6 address.",
128 .group = "NETWORK",
129 .env_var_name = "ASCII_CHAT_QUIC_BIND_ADDRESS",
131 .metadata = {.input_type = OPTION_INPUT_STRING}},
132 {.long_name = "quic-port",
133 .type = OPTION_TYPE_INT,
134 .offset = offsetof(options_t, quic_port),
135 .default_value_size = sizeof(int),
136 .help_text = "Shared native QUIC and HTTP/3 UDP port (0 uses the server port).",
137 .group = "NETWORK",
138 .env_var_name = "ASCII_CHAT_QUIC_PORT",
140 .metadata = {.numeric_range = {0, 65535, 1}, .input_type = OPTION_INPUT_NUMERIC}},
141 {.long_name = "address",
142 .type = OPTION_TYPE_STRING,
143 .offset = offsetof(options_t, address),
144 .default_value = "127.0.0.1",
145 .default_value_size = OPTIONS_BUFF_SIZE,
146 .help_text = "MCP bind address (IPv4 or IPv6); also accepts positional bind addresses.",
147 .group = "NETWORK",
148 .env_var_name = "ASCII_CHAT_ADDRESS",
149 .parse_fn = parse_mcp_bind,
151 {.long_name = "address6",
152 .type = OPTION_TYPE_STRING,
153 .offset = offsetof(options_t, address6),
154 .default_value = "",
155 .default_value_size = OPTIONS_BUFF_SIZE,
156 .help_text = "Additional MCP IPv6 bind address.",
157 .group = "NETWORK",
158 .env_var_name = "ASCII_CHAT_ADDRESS6",
159 .parse_fn = parse_mcp_bind6,
161 // NETWORK GROUP - port and client management
162 {"port",
163 'p',
165 offsetof(options_t, port),
166 NULL, // Use mode_default_getter instead
167 sizeof(int),
168 "Port to host a server or discovery-service on, or port to connect to a server as a client (default: 27224 for "
169 "server/client, 27225 for discovery-service, 27228 for mcp-server).",
170 "NETWORK",
171 NULL,
172 false,
173 "ASCII_CHAT_PORT",
174 NULL,
176 false,
177 false,
180 {.numeric_range = {1, 65535, 1}, .input_type = OPTION_INPUT_NUMERIC},
182 {"websocket-port",
183 '\0',
185 offsetof(options_t, websocket_port),
186 NULL, // Use mode_default_getter instead
187 sizeof(int),
188 "WebSocket server port (default: 27226 for server, 27227 for discovery-service, 443 when TLS cert+key provided).",
189 "NETWORK",
190 NULL,
191 false,
192 "ASCII_CHAT_WEBSOCKET_PORT",
193 NULL,
194 NULL,
195 false,
196 false,
198 {.numeric_range = {1, 65535, 1}, .input_type = OPTION_INPUT_NUMERIC},
200 {"tls-cert",
201 '\0',
203 offsetof(options_t, tls_cert),
204 NULL,
206 "TLS certificate file path for secure network listeners.",
207 "NETWORK",
208 NULL,
209 false,
210 "ASCII_CHAT_TLS_CERT",
211 NULL,
212 NULL,
213 false,
214 false,
217 {.input_type = OPTION_INPUT_STRING},
218 NULL},
219 {"tls-key",
220 '\0',
222 offsetof(options_t, tls_key),
223 NULL,
225 "TLS private key file path for secure network listeners.",
226 "NETWORK",
227 NULL,
228 false,
229 "ASCII_CHAT_TLS_KEY",
230 NULL,
231 NULL,
232 false,
233 false,
236 {.input_type = OPTION_INPUT_STRING},
237 NULL},
238 {"tls-key-password",
239 '\0',
241 offsetof(options_t, tls_key_password),
242 NULL,
244 "Password for password-protected TLS private key (use ASCII_CHAT_TLS_KEY_PASSWORD env var for "
245 "security).",
246 "NETWORK",
247 NULL,
248 false,
249 "ASCII_CHAT_TLS_KEY_PASSWORD",
250 NULL,
251 NULL,
252 false,
253 false,
256 {.input_type = OPTION_INPUT_STRING},
257 NULL},
258 {"max-clients",
259 '\0',
261 offsetof(options_t, max_clients),
262 &default_max_clients_value,
263 sizeof(int),
264 "Maximum concurrent clients.",
265 "NETWORK",
266 NULL,
267 false,
268 "ASCII_CHAT_MAX_CLIENTS",
269 NULL,
270 NULL,
271 false,
272 false,
274 {.numeric_range = {1, 99, 1}, .examples = g_maxclients_examples, .input_type = OPTION_INPUT_NUMERIC},
275 NULL},
276 {"reconnect-attempts",
277 '\0',
279 offsetof(options_t, reconnect_attempts),
280 &default_reconnect_attempts_value,
281 sizeof(int),
282 "Number of reconnection attempts before giving up (-1=infinite, 0=none).",
283 "NETWORK",
284 NULL,
285 false,
286 "ASCII_CHAT_RECONNECT_ATTEMPTS",
287 NULL,
288 NULL,
289 false,
290 false,
292 {.numeric_range = {-1, 99, 1}, .examples = g_reconnect_examples, .input_type = OPTION_INPUT_NUMERIC},
293 NULL},
294 {"port-forwarding",
295 '\0',
297 offsetof(options_t, enable_upnp),
298 &default_enable_upnp_value,
299 sizeof(bool),
300 "Map active TCP/WebSocket listeners and native WebRTC UDP ports with UPnP/NAT-PMP (router support required).",
301 "NETWORK",
302 NULL,
303 false,
304 "ASCII_CHAT_PORT_FORWARDING",
305 NULL,
306 NULL,
307 false,
308 false,
311 {0},
312 NULL},
313 {"scan",
314 '\0',
316 offsetof(options_t, lan_discovery),
317 &default_lan_discovery_value,
318 sizeof(bool),
319 "Scan for servers on local network via mDNS.",
320 "NETWORK",
321 NULL,
322 false,
323 "ASCII_CHAT_SCAN",
324 NULL,
325 NULL,
326 false,
327 false,
329 {0},
330 NULL},
331
332 // NETWORK GROUP - compression options
333 {"compression-level",
334 '\0',
336 offsetof(options_t, compression_level),
337 &default_compression_level_value,
338 sizeof(int),
339 "zstd compression level (1-9).",
340 "NETWORK",
341 NULL,
342 false,
343 "ASCII_CHAT_COMPRESSION_LEVEL",
344 NULL,
345 NULL,
346 false,
347 false,
349 {.numeric_range = {1, 9, 1}, .examples = g_compression_examples, .input_type = OPTION_INPUT_NUMERIC},
350 NULL},
351 {"no-compress",
352 '\0',
354 offsetof(options_t, no_compress),
355 &default_no_compress_value,
356 sizeof(bool),
357 "Disable compression.",
358 "NETWORK",
359 NULL,
360 false,
361 "ASCII_CHAT_NO_COMPRESS",
362 NULL,
363 NULL,
364 false,
365 false,
367 {0},
368 NULL},
369
370 // NETWORK GROUP - discovery service options
371 {"discovery-service",
372 '\0',
374 offsetof(options_t, discovery_server),
376 0,
377 "Discovery service endpoint (IP address or hostname).",
378 "NETWORK",
379 NULL,
380 false,
381 "ASCII_CHAT_DISCOVERY_SERVER",
382 NULL,
383 NULL,
384 false,
385 false,
387 {0},
388 NULL},
389 {"discovery-service-port",
390 '\0',
392 offsetof(options_t, discovery_port),
393 &default_discovery_port_value,
394 sizeof(int),
395 "Discovery service port (1-65535).",
396 "NETWORK",
397 NULL,
398 false,
399 "ASCII_CHAT_DISCOVERY_SERVICE_PORT",
400 NULL,
401 NULL,
402 false,
403 false,
405 {0},
406 NULL},
407 {"discovery-service-url",
408 '\0',
410 offsetof(options_t, discovery_service_url),
411 NULL,
413 "Discovery service WebSocket URL (ws:// or wss://). Mutually exclusive with --discovery-service-port.",
414 "NETWORK",
415 NULL,
416 false,
417 "ASCII_CHAT_DISCOVERY_SERVICE_URL",
418 NULL,
419 NULL,
420 false,
421 false,
423 {0},
424 NULL},
425 {"discovery-expose-ip",
426 '\0',
428 offsetof(options_t, discovery_expose_ip),
429 &default_discovery_expose_ip_value,
430 sizeof(bool),
431 "Allow public IP disclosure in discovery sessions (requires confirmation).",
432 "NETWORK",
433 NULL,
434 false,
435 "ASCII_CHAT_DISCOVERY_EXPOSE_IP",
436 NULL,
437 NULL,
438 false,
439 false,
441 {0},
442 NULL},
443 {"discovery",
444 '\0',
446 offsetof(options_t, discovery),
447 &default_discovery_value,
448 sizeof(bool),
449 "Enable discovery session registration.",
450 "NETWORK",
451 NULL,
452 false,
453 "ASCII_CHAT_DISCOVERY",
454 NULL,
455 NULL,
456 false,
457 false,
459 {0},
460 NULL},
461
462 // NETWORK GROUP - WebRTC options
463 {.long_name = "webrtc-bind-address",
464 .type = OPTION_TYPE_STRING,
465 .offset = offsetof(options_t, webrtc_bind_address),
466 .default_value = "",
467 .default_value_size = OPTIONS_BUFF_SIZE,
468 .help_text = "Bind WebRTC ICE sockets to a local IPv4 or IPv6 address (default: all interfaces).",
469 .group = "NETWORK",
470 .env_var_name = "ASCII_CHAT_WEBRTC_BIND_ADDRESS",
471 .validate_fn = validate_webrtc_bind_address,
473 {"webrtc",
474 '\0',
476 offsetof(options_t, webrtc),
477 &default_webrtc_value,
478 sizeof(bool),
479 "Make calls using WebRTC p2p connections.",
480 "NETWORK",
481 NULL,
482 false,
483 "ASCII_CHAT_WEBRTC",
484 NULL,
485 NULL,
486 false,
487 false,
489 {0},
490 NULL},
491 {"no-webrtc",
492 '\0',
494 offsetof(options_t, no_webrtc),
495 &default_no_webrtc_value,
496 sizeof(bool),
497 "Disable WebRTC, use direct TCP only.",
498 "NETWORK",
499 NULL,
500 false,
501 "ASCII_CHAT_NO_WEBRTC",
502 NULL,
503 NULL,
504 false,
505 false,
507 {0},
508 NULL},
509 {"prefer-webrtc",
510 '\0',
512 offsetof(options_t, prefer_webrtc),
513 &default_prefer_webrtc_value,
514 sizeof(bool),
515 "Try WebRTC before direct TCP.",
516 "NETWORK",
517 NULL,
518 false,
519 "ASCII_CHAT_PREFER_WEBRTC",
520 NULL,
521 NULL,
522 false,
523 false,
525 {0},
526 NULL},
527 {"webrtc-relay-only",
528 '\0',
530 offsetof(options_t, webrtc_relay_only),
531 &default_webrtc_relay_only_value,
532 sizeof(bool),
533 "Require TURN relay for WebRTC connections (no direct connection or TCP fallback).",
534 "NETWORK",
535 NULL,
536 false,
537 "ASCII_CHAT_WEBRTC_RELAY_ONLY",
538 NULL,
539 NULL,
540 false,
541 false,
543 {0},
544 NULL},
545 {"webrtc-skip-stun",
546 '\0',
548 offsetof(options_t, webrtc_skip_stun),
549 &default_webrtc_skip_stun_value,
550 sizeof(bool),
551 "Skip WebRTC+STUN stage, go straight to TURN relay.",
552 "NETWORK",
553 NULL,
554 false,
555 "ASCII_CHAT_WEBRTC_SKIP_STUN",
556 NULL,
557 NULL,
558 false,
559 false,
561 {0},
562 NULL},
563 {"webrtc-disable-turn",
564 '\0',
566 offsetof(options_t, webrtc_disable_turn),
567 &default_webrtc_disable_turn_value,
568 sizeof(bool),
569 "Disable WebRTC+TURN relay, use STUN only.",
570 "NETWORK",
571 NULL,
572 false,
573 "ASCII_CHAT_WEBRTC_DISABLE_TURN",
574 NULL,
575 NULL,
576 false,
577 false,
579 {0},
580 NULL},
581 {"webrtc-skip-host",
582 '\0',
584 offsetof(options_t, webrtc_skip_host),
585 &default_webrtc_skip_host_value,
586 sizeof(bool),
587 "Skip host candidates, force STUN/TURN (for testing).",
588 "NETWORK",
589 NULL,
590 false,
591 "ASCII_CHAT_WEBRTC_SKIP_HOST",
592 NULL,
593 NULL,
594 false,
595 false,
597 {0},
598 NULL},
599 {"webrtc-ice-timeout",
600 '\0',
602 offsetof(options_t, webrtc_ice_timeout_ms),
603 &default_webrtc_ice_timeout_ms_value,
604 sizeof(int),
605 "ICE gathering timeout in milliseconds.",
606 "NETWORK",
607 NULL,
608 false,
609 "ASCII_CHAT_WEBRTC_ICE_TIMEOUT",
610 NULL,
611 NULL,
612 false,
613 false,
615 {0},
616 NULL},
617 {"webrtc-reconnect-attempts",
618 '\0',
620 offsetof(options_t, webrtc_reconnect_attempts),
621 &default_webrtc_reconnect_attempts_value,
622 sizeof(int),
623 "Number of WebRTC connection retry attempts.",
624 "NETWORK",
625 NULL,
626 false,
627 "ASCII_CHAT_WEBRTC_RECONNECT_ATTEMPTS",
628 NULL,
629 NULL,
630 false,
631 false,
633 {0},
634 NULL},
635 {"stun-servers",
636 '\0',
638 offsetof(options_t, stun_servers),
640 0,
641 "Comma-separated list of WebRTC+STUN server URLs.",
642 "NETWORK",
643 NULL,
644 false,
645 "ASCII_CHAT_STUN_SERVERS",
646 NULL,
647 NULL,
648 false,
649 false,
651 {0},
652 NULL},
653 {"turn-servers",
654 '\0',
656 offsetof(options_t, turn_servers),
658 0,
659 "Comma-separated list of WebRTC+TURN server URLs.",
660 "NETWORK",
661 NULL,
662 false,
663 "ASCII_CHAT_TURN_SERVERS",
664 NULL,
665 NULL,
666 false,
667 false,
669 {0},
670 NULL},
671 {"turn-username",
672 '\0',
674 offsetof(options_t, turn_username),
676 0,
677 "Username for WebRTC+TURN authentication.",
678 "NETWORK",
679 NULL,
680 false,
681 "ASCII_CHAT_TURN_USERNAME",
682 NULL,
683 NULL,
684 false,
685 false,
687 {0},
688 NULL},
689 {"turn-credential",
690 '\0',
692 offsetof(options_t, turn_credential),
694 0,
695 "Credential/password for WebRTC+TURN authentication.",
696 "NETWORK",
697 NULL,
698 false,
699 "ASCII_CHAT_TURN_CREDENTIAL",
700 NULL,
701 NULL,
702 false,
703 false,
705 {0},
706 NULL},
707 {"turn-secret",
708 '\0',
710 offsetof(options_t, turn_secret),
711 "",
712 0,
713 "Shared secret for dynamic WebRTC+TURN credential generation (HMAC-SHA1).",
714 "NETWORK",
715 NULL,
716 false,
717 "ASCII_CHAT_TURN_SECRET",
718 NULL,
719 NULL,
720 false,
721 false,
723 {0},
724 NULL},
725
#define OPT_ENDPOINT_DISCOVERY_SERVICE
Default discovery service endpoint (what to connect to by default).
Definition options.h:560
#define OPT_TURN_SERVERS_DEFAULT
Default TURN server URLs (comma-separated).
Definition options.h:664
#define OPT_STUN_SERVERS_DEFAULT
Default STUN server URLs (comma-separated).
Definition options.h:661
#define OPT_TURN_CREDENTIAL_DEFAULT
Default TURN credential (empty = use ACDS credentials).
Definition options.h:696
#define OPT_TURN_USERNAME_DEFAULT
Default TURN username (empty = use ACDS credentials).
Definition options.h:693
@ OPTION_MODE_API_SERVER
Definition options.h:944
const char * g_compression_examples[]
Definition metadata.c:188
const char * g_reconnect_examples[]
Definition metadata.c:193
const char * g_maxclients_examples[]
Definition metadata.c:192
const void * get_default_websocket_port(asciichat_mode_t mode)
Get mode-specific default value for –websocket-port.
const void * get_default_port(asciichat_mode_t mode)
Get mode-specific default value for –port.
bool parse_port_option(const char *arg, void *dest, char **error_msg)
Parse and validate port option for CLI.
Definition parsers.c:463

◆ g_security_entries

const registry_entry_t g_security_entries[]
extern

Definition at line 19 of file lib/options/registry/security.c.

19 {
20 // SECURITY GROUP (client, server, discovery)
21 {"encrypt",
22 'E',
24 offsetof(options_t, encrypt_enabled),
25 &default_encrypt_enabled_value,
26 sizeof(bool),
27 "Explicitly enable ACIP payload encryption, including over WSS.",
28 "SECURITY",
29 NULL,
30 false,
31 "ASCII_CHAT_ENCRYPT",
32 NULL,
33 NULL,
34 false,
35 false,
37 {0},
38 NULL},
39 {"key",
40 'K',
42 offsetof(options_t, encrypt_key),
43 "",
44 0,
45 "Server identity key (SSH Ed25519 or GPG key file, gpg:FINGERPRINT, github:USER[.gpg], gitlab:USER[.gpg], or "
46 "HTTPS URL like https://example.com/key.pub or .gpg).",
47 "SECURITY",
48 NULL,
49 false,
50 "ASCII_CHAT_KEY",
51 NULL,
52 NULL,
53 false,
54 false,
56 {.input_type = OPTION_INPUT_FILEPATH},
57 NULL},
58 {"password",
59 '\0',
61 offsetof(options_t, password),
62 "",
63 0,
64 "Shared password for authentication (8-256 characters).",
65 "SECURITY",
66 NULL,
67 false,
68 "ASCII_CHAT_PASSWORD",
69 NULL,
70 NULL,
71 false,
72 false,
74 {0},
75 NULL},
76 {"no-encrypt",
77 '\0',
79 offsetof(options_t, no_encrypt),
80 &default_no_encrypt_value,
81 sizeof(bool),
82 "Disable ACIP payload encryption; configured keys/password still authenticate.",
83 "SECURITY",
84 NULL,
85 false,
86 "ASCII_CHAT_NO_ENCRYPT",
87 NULL,
88 NULL,
89 false,
90 false,
92 {0},
93 NULL},
94 {"no-auth",
95 '\0',
97 offsetof(options_t, no_auth),
98 &default_no_auth_value,
99 sizeof(bool),
100 "Disable authentication layer (--no-auth). Use with --no-encrypt to bypass ACIP entirely.",
101 "SECURITY",
102 NULL,
103 false,
104 "ASCII_CHAT_NO_AUTH",
105 NULL,
106 NULL,
107 false,
108 false,
110 {0},
111 NULL},
112 {"server-key",
113 '\0',
115 offsetof(options_t, server_key),
116 "",
117 0,
118 "Expected server public key for verification. Supports: raw base64 public key (AAAAC3Nz...), "
119 "SSH/GPG key files, gpg:FINGERPRINT, github:USER[.gpg], gitlab:USER[.gpg], "
120 "or HTTP(S) URLs like https://github.com/zfogg.[keys|gpg].",
121 "SECURITY",
122 NULL,
123 false,
124 "ASCII_CHAT_SERVER_KEY",
125 NULL,
126 NULL,
127 false,
128 false,
130 {.input_type = OPTION_INPUT_FILEPATH},
131 NULL},
132 {"client-keys",
133 '\0',
135 offsetof(options_t, client_keys),
136 "",
137 0,
138 "Allowed client keys (comma-separated). Supports: raw base64 public keys (AAAAC3Nz...), "
139 "file paths with one key per line, github:USER[.gpg], gitlab:USER[.gpg], gpg:KEYID, "
140 "or HTTP(S) URLs like https://github.com/zfogg.[keys|gpg].",
141 "SECURITY",
142 NULL,
143 false,
144 "ASCII_CHAT_CLIENT_KEYS",
145 NULL,
146 NULL,
147 false,
148 false,
150 {.input_type = OPTION_INPUT_FILEPATH},
151 NULL},
152 {"discovery-insecure",
153 '\0',
155 offsetof(options_t, discovery_insecure),
156 &default_discovery_insecure_value,
157 sizeof(bool),
158 "Skip server key verification (MITM-vulnerable, requires explicit opt-in).",
159 "SECURITY",
160 NULL,
161 false,
162 "ASCII_CHAT_DISCOVERY_INSECURE",
163 NULL,
164 NULL,
165 false,
166 false,
168 {0},
169 NULL},
170 {"discovery-service-key",
171 '\0',
173 offsetof(options_t, discovery_service_key),
174 "",
175 0,
176 "Discovery server public key for verification. Supports: raw base64 public key (AAAAC3Nz...), "
177 "SSH/GPG key files, gpg:FINGERPRINT, github:USER[.gpg], gitlab:USER[.gpg], "
178 "or HTTP(S) URLs like https://github.com/zfogg.[keys|gpg].",
179 "SECURITY",
180 NULL,
181 false,
182 "ASCII_CHAT_DISCOVERY_SERVER_KEY",
183 NULL,
184 NULL,
185 false,
186 false,
188 {0},
189 NULL},
190 {"require-server-identity",
191 '\0',
193 offsetof(options_t, require_server_identity),
194 NULL,
195 sizeof(bool),
196 "Require servers to provide signed Ed25519 identity.",
197 "SECURITY",
198 NULL,
199 false,
200 "ASCII_CHAT_REQUIRE_SERVER_IDENTITY",
201 NULL,
202 NULL,
203 false,
204 false,
206 {0},
207 NULL},
208 {"require-client-identity",
209 '\0',
211 offsetof(options_t, require_client_identity),
212 NULL,
213 sizeof(bool),
214 "Require clients to provide signed Ed25519 identity.",
215 "SECURITY",
216 NULL,
217 false,
218 "ASCII_CHAT_REQUIRE_CLIENT_IDENTITY",
219 NULL,
220 NULL,
221 false,
222 false,
224 {0},
225 NULL},
226

◆ g_terminal_entries

const registry_entry_t g_terminal_entries[]
extern

Definition at line 22 of file options/registry/terminal.c.

22 {
23 // TERMINAL GROUP (client, mirror, discovery)
24 {"width",
25 'x',
27 offsetof(options_t, width),
28 &default_width_value,
29 sizeof(int),
30 "Terminal width in characters. Can be controlled using $COLUMNS. By default your terminal width is detected at "
31 "runtime and this value is updated automatically.",
32 "TERMINAL",
33 NULL,
34 false,
35 "ASCII_CHAT_WIDTH",
36 NULL,
37 NULL,
38 false,
39 false,
41 {.numeric_range = {UI_MEDIA_MIN_COLS, 1024, 0}, .examples = g_width_examples, .input_type = OPTION_INPUT_NUMERIC},
42 NULL},
43 {"height",
44 'y',
46 offsetof(options_t, height),
47 &default_height_value,
48 sizeof(int),
49 "Terminal height in characters. Can be controlled using $ROWS. By default your terminal height is detected at "
50 "runtime and this value is updated automatically.",
51 "TERMINAL",
52 NULL,
53 false,
54 "ASCII_CHAT_HEIGHT",
55 NULL,
56 NULL,
57 false,
58 false,
60 {.numeric_range = {UI_MEDIA_MIN_ROWS, 1024, 0}, .examples = g_height_examples, .input_type = OPTION_INPUT_NUMERIC},
61 NULL},
62 {"color-mode",
63 '\0',
65 offsetof(options_t, color_mode),
66 &default_color_mode_value,
67 sizeof(terminal_color_mode_t),
68 "Terminal color level (auto, none, 16, 256, truecolor). This controls what ANSI escape codes ascii-chat will use "
69 "for console logging and display output if color is enabled. Press 'c' during rendering to cycle. See also "
70 "--color.",
71 "TERMINAL",
72 NULL,
73 false,
74 "ASCII_CHAT_COLOR_MODE",
75 NULL,
77 false,
78 false,
80 {.enum_values = g_color_mode_values,
81 .enum_descriptions = g_color_mode_descs,
82 .enum_integer_values = g_color_mode_integers,
83 .input_type = OPTION_INPUT_ENUM},
84 NULL},
85 {"show-capabilities",
86 '\0',
88 0,
89 NULL,
90 0,
91 "Show detected terminal capabilities and exit (useful for debugging and scripting).",
92 "TERMINAL",
93 NULL,
94 false,
95 NULL,
96 NULL,
97 NULL,
98 false,
99 false,
101 {0},
102 NULL},
103 {"utf8",
104 '\0',
106 offsetof(options_t, force_utf8),
107 &default_force_utf8_value,
108 sizeof(int),
109 "UTF-8 support setting: 'auto' (default, auto-detect), 'true' (force UTF-8 on), or 'false' (force UTF-8 off).",
110 "TERMINAL",
111 NULL,
112 false,
113 "ASCII_CHAT_UTF8",
114 NULL,
116 false,
117 true,
119 {.enum_values = g_utf8_setting_values,
120 .enum_descriptions = g_utf8_setting_descs,
121 .enum_integer_values = g_utf8_setting_integers,
122 .input_type = OPTION_INPUT_ENUM},
123 NULL},
124 {"strip-ansi",
125 '\0',
127 offsetof(options_t, strip_ansi),
128 &default_strip_ansi_value,
129 sizeof(bool),
130 "Strip ANSI escape sequences from output before printing. Useful for scripting and debugging.",
131 "TERMINAL",
132 NULL,
133 false,
134 "ASCII_CHAT_STRIP_ANSI",
135 NULL,
136 NULL,
137 false,
138 false,
140 {0},
141 NULL},
142 {"color",
143 '\0',
145 offsetof(options_t, color),
146 &default_color_value,
147 sizeof(int),
148 "Color output setting: 'auto' (default, smart detection), 'true' (force colors on), or 'false' (force colors "
149 "off).",
150 "TERMINAL",
151 NULL,
152 false,
153 "ASCII_CHAT_COLOR",
154 NULL,
156 false,
157 true,
159 {.enum_values = g_color_setting_values,
160 .enum_descriptions = g_color_setting_descs,
161 .enum_integer_values = g_color_setting_integers,
162 .input_type = OPTION_INPUT_ENUM},
163 NULL},
164
int color_mode
Definition fft.c:25
unsigned int height
Definition fft.c:23
unsigned int width
Definition fft.c:23
const char * g_height_examples[]
Definition metadata.c:191
const int g_color_setting_integers[]
Definition metadata.c:44
const char * g_color_mode_values[]
Definition metadata.c:63
const char * g_width_examples[]
Definition metadata.c:190
const char * g_color_setting_descs[]
Definition metadata.c:45
const char * g_utf8_setting_values[]
Definition metadata.c:53
const int g_utf8_setting_integers[]
Definition metadata.c:54
const char * g_utf8_setting_descs[]
Definition metadata.c:55
const char * g_color_setting_values[]
Definition metadata.c:43
const char * g_color_mode_descs[]
Definition metadata.c:72
const int g_color_mode_integers[]
Definition metadata.c:70
bool parse_color_setting(const char *arg, void *dest, char **error_msg)
Parse color setting option (–color flag).
Definition parsers.c:110
bool parse_color_mode(const char *arg, void *dest, char **error_msg)
Parse terminal color level option.
Definition parsers.c:160
bool parse_utf8_setting(const char *arg, void *dest, char **error_msg)
Parse UTF-8 setting option (–utf8 flag).
Definition parsers.c:141
#define UI_MEDIA_MIN_COLS
Definition too_small.h:5
#define UI_MEDIA_MIN_ROWS
Definition too_small.h:6

◆ g_webcam_entries

const registry_entry_t g_webcam_entries[]
extern

Definition at line 34 of file options/registry/webcam.c.

34 {
35 // WEBCAM GROUP (client, mirror, discovery)
36 {"webcam-index",
37 'c',
39 offsetof(options_t, webcam_index),
40 &default_webcam_index_value,
41 sizeof(unsigned short int),
42 "Webcam device index to use for video input.",
43 "WEBCAM",
44 NULL,
45 false,
46 "ASCII_CHAT_WEBCAM_INDEX",
47 NULL,
48 NULL,
49 false,
50 false,
52 {.numeric_range = {0, 10, 1}, .examples = g_webcam_examples, .input_type = OPTION_INPUT_NUMERIC},
53 NULL},
54 {"test-pattern",
55 '\0',
57 offsetof(options_t, test_pattern),
58 NULL,
59 sizeof(bool),
60 "Use synthetic video: 0 = gradient and square (default), 1 = rainbow and circle.",
61 "WEBCAM",
62 "[0|1]",
63 false,
64 "WEBCAM_DISABLED",
65 NULL,
66 parse_test_pattern,
67 false,
68 true,
70 {.enum_values = pattern_values, .input_type = OPTION_INPUT_ENUM},
71 NULL},
72 {"list-webcams",
73 '\0',
75 0,
76 NULL,
77 0,
78 "List available webcam devices by index and exit.",
79 "WEBCAM",
80 NULL,
81 false,
82 NULL,
83 NULL,
84 NULL,
85 false,
86 false,
88 {0},
89 NULL},
90
const char * g_webcam_examples[]
Definition metadata.c:194
test pattern is intentionally a small, concrete record. Fields such as image, rgba give callers the i...