ascii-chat
Binary v0.16.50-198-g78f51665f
Library lib/v0.3.2-2240-g78f51665f
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 lib/options/registry/categories.h.

Variable Documentation

◆ g_audio_entries

const registry_entry_t g_audio_entries[]
extern

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

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

◆ g_configuration_entries

const registry_entry_t g_configuration_entries[]
extern

Definition at line 20 of file configuration.c.

20 {{"config",
21 '\0',
23 offsetof(options_t, config_file),
24 "",
26 "Load configuration from toml FILE.",
27 "CONFIGURATION",
28 "FILE",
29 false,
30 NULL,
31 NULL,
32 NULL,
33 false,
34 false,
36 {.input_type = OPTION_INPUT_FILEPATH},
37 NULL},
38 {"config-create",
39 '\0',
41 0,
42 NULL,
43 0,
44 "Create default config file and write to FILE or stdout if not specified.",
45 "CONFIGURATION",
46 "[FILE]",
47 false,
48 NULL,
49 NULL,
50 NULL,
51 false,
52 false,
54 {.input_type = OPTION_INPUT_FILEPATH},
55 NULL},
56 {"completions",
57 '\0',
59 0,
60 NULL,
61 0,
62 "Generate shell completions (bash, fish, zsh, powershell) and output to stdout (or optional file path).",
63 "CONFIGURATION",
64 "SHELL [FILE]",
65 false,
66 NULL,
67 NULL,
68 NULL,
69 false,
70 false,
72 {.enum_values = g_completion_shell_values, .input_type = OPTION_INPUT_ENUM},
73 NULL},
74 {"man-page-create",
75 '\0',
77 0,
78 NULL,
79 0,
80 "Generate man page and write to FILE or stdout if not specified.",
81 "CONFIGURATION",
82 "[FILE]",
83 false,
84 NULL,
85 NULL,
86 NULL,
87 false,
88 false,
90 {.input_type = OPTION_INPUT_FILEPATH},
91 NULL},
92
@ OPTION_INPUT_FILEPATH
File path completion.
Definition builder.h:190
@ OPTION_TYPE_STRING
String value (–name foo).
Definition builder.h:173
#define OPTIONS_BUFF_SIZE
Buffer size for option string values.
Definition options.h:305
const char * g_completion_shell_values[]
Definition metadata.c:153

◆ g_database_entries

const registry_entry_t g_database_entries[]
extern

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

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:938

◆ 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:174
@ OPTION_MODE_ALL
All modes + binary.
Definition options.h:943

◆ g_display_entries

const registry_entry_t g_display_entries[]
extern

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

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

◆ 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,
82 {0},
83 NULL},
84 {"version", 'v', OPTION_TYPE_ACTION, 0, NULL, 0, "Show version information and exit.", "GENERAL", NULL, false, NULL, NULL, NULL, false, false, OPTION_MODE_BINARY, {0}, NULL},
85 {"splash-screen",
86 '\0',
88 offsetof(options_t, splash_screen),
89 &default_splash_value,
90 sizeof(bool),
91 "Enable or disable splash screen with ASCII art. Overrides CLAUDECODE environment variable.",
92 "GENERAL",
93 NULL,
94 false,
95 "ASCII_CHAT_SPLASH_SCREEN",
96 NULL,
97 NULL,
98 false,
99 true, // optional_arg: allows --splash-screen to toggle or --splash-screen=true/false
101 {0},
102 NULL},
103 {"status-screen",
104 '\0',
106 offsetof(options_t, status_screen),
107 &default_status_screen_value,
108 sizeof(bool),
109 "Enable or disable live status screen display. Overrides non-interactive terminal checks.",
110 "GENERAL",
111 NULL,
112 false,
113 "ASCII_CHAT_STATUS_SCREEN",
114 NULL,
115 NULL,
116 false,
117 true, // optional_arg: allows --status-screen to toggle or --status-screen=true/false
119 {0},
120 NULL},
121 {"keepawake",
122 '\0',
124 offsetof(options_t, enable_keepawake),
125 &default_enable_keepawake_value,
126 sizeof(bool),
127 "Explicitly enable system sleep prevention (keepawake mode).",
128 "GENERAL",
129 NULL,
130 false,
131 "ASCII_CHAT_KEEPAWAKE",
132 NULL,
133 NULL,
134 false,
135 false,
137 {0},
138 NULL},
139 {"no-keepawake",
140 '\0',
142 offsetof(options_t, disable_keepawake),
143 &default_disable_keepawake_value,
144 sizeof(bool),
145 "Disable system sleep prevention (allow OS to sleep).",
146 "GENERAL",
147 NULL,
148 false,
149 "ASCII_CHAT_NO_KEEPAWAKE",
150 NULL,
151 NULL,
152 false,
153 false,
155 {0},
156 NULL},
157 {"check-update", '\0', OPTION_TYPE_ACTION, 0, NULL, 0, "Check for updates from GitHub releases and exit.", "GENERAL", NULL, false, NULL, NULL, NULL, false, false, OPTION_MODE_BINARY, {0}, NULL},
158 {"no-check-update",
159 '\0',
161 offsetof(options_t, no_check_update),
162 &default_no_check_update_value,
163 sizeof(bool),
164 "Disable automatic update checks at startup.",
165 "GENERAL",
166 NULL,
167 false,
168 "ASCII_CHAT_NO_CHECK_UPDATE",
169 NULL,
170 NULL,
171 false,
172 false,
174 {0},
175 NULL},
176
@ OPTION_MODE_MCP_SERVER
Definition options.h:940

◆ 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, .enum_descriptions = g_log_level_descs, .enum_integer_values = g_log_level_integers, .input_type = OPTION_INPUT_ENUM},
257 NULL},
258 {"verbose",
259 'V',
261 offsetof(options_t, verbose_level),
262 0,
263 sizeof(unsigned short int),
264 "Increase log verbosity (stackable: -VV, -VVV).",
265 "LOGGING",
266 NULL,
267 false,
268 "ASCII_CHAT_VERBOSE",
269 NULL,
271 false,
272 true,
274 {0},
275 NULL},
276 {"quiet",
277 'q',
279 offsetof(options_t, quiet),
280 &default_quiet_value,
281 sizeof(bool),
282 "Disable console logging (log to file only).",
283 "LOGGING",
284 NULL,
285 false,
286 "ASCII_CHAT_QUIET",
287 NULL,
288 NULL,
289 false,
290 false,
292 {0},
293 NULL},
294 {"grep",
295 '\0',
297 offsetof(options_t, grep_pattern),
298 NULL, // Default is empty string - not meaningful to display in help
299 sizeof(char *),
300 "Filter console logs with perl compatible regular expressions or fixed strings. "
301 "Format 1: /pattern/flags (with flags). Format 2: pattern (plain regex, no flags). "
302 "Flags (format 1 only): i(case-insensitive), m(multiline), s(dotall), x(extended), g(global highlight), "
303 "I(invert match), F(fixed string), A<n>(n lines after), B<n>(n lines before), C<n>(n lines of context). "
304 "Multiple --grep allowed (OR).",
305 "LOGGING",
306 "PATTERN",
307 false,
308 "ASCII_CHAT_GREP",
309 NULL,
310 NULL,
311 false,
312 false,
314 {.examples = (const char *[]){"ERROR", "client\\.c", "network.*failed", NULL}},
315 NULL},
316 {"color-scheme",
317 '\0',
319 offsetof(options_t, color_scheme_name),
321 sizeof(((options_t *)0)->color_scheme_name),
322 "Color scheme for logging output. Built-in schemes: pastel, nord, solarized, dracula, gruvbox, "
323 "monokai, base16-default. All schemes with light variants auto-adapt to terminal background.",
324 "LOGGING",
325 "NAME",
326 false,
327 "ASCII_CHAT_COLOR_SCHEME",
328 NULL,
329 NULL,
330 false,
331 false,
333 {.input_type = OPTION_INPUT_STRING},
334 NULL},
335 {"json",
336 '\0',
338 offsetof(options_t, json),
339 &default_json_value,
340 sizeof(bool),
341 "Enable JSON logging (machine-readable NDJSON format). Disabled by default (text format).",
342 "LOGGING",
343 NULL,
344 false,
345 "ASCII_CHAT_JSON",
346 NULL,
347 NULL,
348 false,
349 false,
351 {0},
352 NULL},
353 {"log-template",
354 '\0',
356 offsetof(options_t, log_template),
357 NULL,
358 sizeof(((options_t *)0)->log_template),
359 "Custom log format string. Format specifiers: %time(fmt) - time with strftime format (see man 3 strftime); "
360 "%level - log level (DEV/DEBUG/INFO/WARN/ERROR/FATAL); %level_aligned - level padded to 5 chars; "
361 "%file - full file path; %file_relative - file path relative to project root; %line - line number; "
362 "%func - function name; %tid - thread ID; %message - log message; "
363 "%color(LEVEL, text) - colorize text using LEVEL's color from current scheme. "
364 "Escape %% for literal %, \\\\ for literal backslash.",
365 "LOGGING",
366 "TEMPLATE",
367 false,
368 "ASCII_CHAT_LOG_TEMPLATE",
369 NULL,
370 NULL,
371 false,
372 false,
374 {.input_type = OPTION_INPUT_STRING},
375 NULL},
376 {"log-format-console",
377 '\0',
379 offsetof(options_t, log_format_console_only),
380 NULL,
381 sizeof(bool),
382 "Apply custom log template (--log-template) only to console output (file logs use default format). See "
383 "--log-template "
384 "for supported format specifiers.",
385 "LOGGING",
386 NULL,
387 false,
388 "ASCII_CHAT_LOG_FORMAT_CONSOLE",
389 NULL,
390 NULL,
391 false,
392 false,
394 {0},
395 NULL},
396
log_level_t
Logging levels enumeration.
Definition types.h:33
#define log_file(...)
File-only logging - writes to log file only, no stderr output.
Definition log/log.h:687
#define OPT_OTEL_ENDPOINT_DEFAULT
Debug and Dev builds export to the local Spaniel Compose collector.
Definition options.h:349
#define OPT_COLOR_SCHEME_NAME_DEFAULT
Default color scheme name (pastel).
Definition options.h:365
const char * g_log_level_descs[]
Definition metadata.c:25
const int g_log_level_integers[]
Definition metadata.c:24
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:900
bool parse_log_file(const char *arg, void *dest, char **error_msg)
Custom parser for log file paths (–log-file, -L).
Definition parsers.c:1055
bool parse_log_level(const char *arg, void *dest, char **error_msg)
Parse log level option.
Definition parsers.c:383

◆ g_media_entries

const registry_entry_t g_media_entries[]
extern

Definition at line 95 of file media.c.

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

◆ g_network_entries

const registry_entry_t g_network_entries[]
extern

Definition at line 50 of file lib/options/registry/network.c.

50 {{.long_name = "webtransport-public-url",
51 .type = OPTION_TYPE_STRING,
52 .offset = offsetof(options_t, webtransport_public_url),
53 .default_value_size = OPTIONS_BUFF_SIZE,
54 .help_text = "Public HTTPS WebTransport endpoint advertised after discovery authentication.",
55 .group = "NETWORK",
56 .env_var_name = "ASCII_CHAT_WEBTRANSPORT_PUBLIC_URL",
58 .metadata = {.input_type = OPTION_INPUT_STRING}},
59 {.long_name = "discovery-quic",
60 .type = OPTION_TYPE_BOOL,
61 .offset = offsetof(options_t, discovery_quic),
62 .default_value = &default_quic_audio_datagrams,
63 .default_value_size = sizeof(bool),
64 .help_text = "Connect to a disclosed discovery host using its advertised native QUIC endpoint.",
65 .group = "NETWORK",
66 .env_var_name = "ASCII_CHAT_DISCOVERY_QUIC",
67 .mode_bitmask = OPTION_MODE_DISCOVERY},
68 {.long_name = "quic-fallback-port",
69 .type = OPTION_TYPE_INT,
70 .offset = offsetof(options_t, quic_fallback_port),
71 .default_value_size = sizeof(int),
72 .help_text = "TCP fallback port after QUIC timeout (requires --server-key; 0 disables fallback).",
73 .group = "NETWORK",
74 .env_var_name = "ASCII_CHAT_QUIC_FALLBACK_PORT",
76 .metadata = {.numeric_range = {0, 65535, 1}, .input_type = OPTION_INPUT_NUMERIC}},
77 {.long_name = "quic-audio-datagrams",
78 .type = OPTION_TYPE_BOOL,
79 .offset = offsetof(options_t, quic_audio_datagrams),
80 .default_value = &default_quic_audio_datagrams,
81 .default_value_size = sizeof(bool),
82 .help_text = "Prefer QUIC datagrams for audio when negotiated; otherwise use reliable streams.",
83 .group = "NETWORK",
84 .env_var_name = "ASCII_CHAT_QUIC_AUDIO_DATAGRAMS",
86 {.long_name = "quic-visual-datagrams",
87 .type = OPTION_TYPE_BOOL,
88 .offset = offsetof(options_t, quic_visual_datagrams),
89 .default_value = &default_quic_audio_datagrams,
90 .default_value_size = sizeof(bool),
91 .help_text = "Prefer QUIC datagrams for visual media when negotiated; otherwise use reliable streams.",
92 .group = "NETWORK",
93 .env_var_name = "ASCII_CHAT_QUIC_VISUAL_DATAGRAMS",
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,
179 {.numeric_range = {1, 65535, 1}, .input_type = OPTION_INPUT_NUMERIC},
181 {"tls-cert",
182 '\0',
184 offsetof(options_t, tls_cert),
185 NULL,
187 "TLS certificate file path for secure network listeners.",
188 "NETWORK",
189 NULL,
190 false,
191 "ASCII_CHAT_TLS_CERT",
192 NULL,
193 NULL,
194 false,
195 false,
197 {.input_type = OPTION_INPUT_STRING},
198 NULL},
199 {"tls-key",
200 '\0',
202 offsetof(options_t, tls_key),
203 NULL,
205 "TLS private key file path for secure network listeners.",
206 "NETWORK",
207 NULL,
208 false,
209 "ASCII_CHAT_TLS_KEY",
210 NULL,
211 NULL,
212 false,
213 false,
215 {.input_type = OPTION_INPUT_STRING},
216 NULL},
217 {"tls-key-password",
218 '\0',
220 offsetof(options_t, tls_key_password),
221 NULL,
223 "Password for password-protected TLS private key (use ASCII_CHAT_TLS_KEY_PASSWORD env var for "
224 "security).",
225 "NETWORK",
226 NULL,
227 false,
228 "ASCII_CHAT_TLS_KEY_PASSWORD",
229 NULL,
230 NULL,
231 false,
232 false,
234 {.input_type = OPTION_INPUT_STRING},
235 NULL},
236 {.long_name = "tls-ca-file",
237 .type = OPTION_TYPE_STRING,
238 .offset = offsetof(options_t, tls_ca_file),
239 .default_value_size = OPTIONS_BUFF_SIZE,
240 .help_text = "CA certificate file for secure network client verification (default: system trust).",
241 .group = "NETWORK",
242 .env_var_name = "ASCII_CHAT_TLS_CA_FILE",
244 .metadata = {.input_type = OPTION_INPUT_STRING}},
245 {"max-clients",
246 '\0',
248 offsetof(options_t, max_clients),
249 &default_max_clients_value,
250 sizeof(int),
251 "Maximum concurrent clients.",
252 "NETWORK",
253 NULL,
254 false,
255 "ASCII_CHAT_MAX_CLIENTS",
256 NULL,
257 NULL,
258 false,
259 false,
261 {.numeric_range = {1, 99, 1}, .examples = g_maxclients_examples, .input_type = OPTION_INPUT_NUMERIC},
262 NULL},
263 {"reconnect-attempts",
264 '\0',
266 offsetof(options_t, reconnect_attempts),
267 &default_reconnect_attempts_value,
268 sizeof(int),
269 "Number of reconnection attempts before giving up (-1=infinite, 0=none).",
270 "NETWORK",
271 NULL,
272 false,
273 "ASCII_CHAT_RECONNECT_ATTEMPTS",
274 NULL,
275 NULL,
276 false,
277 false,
279 {.numeric_range = {-1, 99, 1}, .examples = g_reconnect_examples, .input_type = OPTION_INPUT_NUMERIC},
280 NULL},
281 {"port-forwarding",
282 '\0',
284 offsetof(options_t, enable_upnp),
285 &default_enable_upnp_value,
286 sizeof(bool),
287 "Map active TCP/WebSocket listeners and native WebRTC UDP ports with UPnP/NAT-PMP (router support required).",
288 "NETWORK",
289 NULL,
290 false,
291 "ASCII_CHAT_PORT_FORWARDING",
292 NULL,
293 NULL,
294 false,
295 false,
297 {0},
298 NULL},
299 {"scan",
300 '\0',
302 offsetof(options_t, lan_discovery),
303 &default_lan_discovery_value,
304 sizeof(bool),
305 "Scan for servers on local network via mDNS.",
306 "NETWORK",
307 NULL,
308 false,
309 "ASCII_CHAT_SCAN",
310 NULL,
311 NULL,
312 false,
313 false,
315 {0},
316 NULL},
317
318 // NETWORK GROUP - compression options
319 {"compression-level",
320 '\0',
322 offsetof(options_t, compression_level),
323 &default_compression_level_value,
324 sizeof(int),
325 "zstd compression level (1-9).",
326 "NETWORK",
327 NULL,
328 false,
329 "ASCII_CHAT_COMPRESSION_LEVEL",
330 NULL,
331 NULL,
332 false,
333 false,
335 {.numeric_range = {1, 9, 1}, .examples = g_compression_examples, .input_type = OPTION_INPUT_NUMERIC},
336 NULL},
337 {"no-compress",
338 '\0',
340 offsetof(options_t, no_compress),
341 &default_no_compress_value,
342 sizeof(bool),
343 "Disable compression.",
344 "NETWORK",
345 NULL,
346 false,
347 "ASCII_CHAT_NO_COMPRESS",
348 NULL,
349 NULL,
350 false,
351 false,
353 {0},
354 NULL},
355
356 // NETWORK GROUP - discovery service options
357 {"discovery-service",
358 '\0',
360 offsetof(options_t, discovery_server),
362 0,
363 "Discovery service URL, including an optional port (for example, ws://host:27225 or wss://host:443).",
364 "NETWORK",
365 NULL,
366 false,
367 "ASCII_CHAT_DISCOVERY_SERVER",
368 NULL,
369 NULL,
370 false,
371 false,
373 {0},
374 NULL},
375 {"discovery-service-port",
376 '\0',
378 offsetof(options_t, discovery_port),
379 &default_discovery_port_value,
380 sizeof(int),
381 "Override the port in --discovery-service (1-65535).",
382 "NETWORK",
383 NULL,
384 false,
385 "ASCII_CHAT_DISCOVERY_SERVICE_PORT",
386 NULL,
387 NULL,
388 false,
389 false,
391 {.numeric_range = {1, 65535, 1}, .input_type = OPTION_INPUT_NUMERIC},
392 NULL},
393 {"discovery-expose-ip",
394 '\0',
396 offsetof(options_t, discovery_expose_ip),
397 &default_discovery_expose_ip_value,
398 sizeof(bool),
399 "Allow public IP disclosure in discovery sessions (requires confirmation).",
400 "NETWORK",
401 NULL,
402 false,
403 "ASCII_CHAT_DISCOVERY_EXPOSE_IP",
404 NULL,
405 NULL,
406 false,
407 false,
409 {0},
410 NULL},
411 {"discovery",
412 '\0',
414 offsetof(options_t, discovery),
415 &default_discovery_value,
416 sizeof(bool),
417 "Enable discovery session registration.",
418 "NETWORK",
419 NULL,
420 false,
421 "ASCII_CHAT_DISCOVERY",
422 NULL,
423 NULL,
424 false,
425 false,
427 {0},
428 NULL},
429
430 // NETWORK GROUP - WebRTC options
431 {.long_name = "webrtc-bind-address",
432 .type = OPTION_TYPE_STRING,
433 .offset = offsetof(options_t, webrtc_bind_address),
434 .default_value = "",
435 .default_value_size = OPTIONS_BUFF_SIZE,
436 .help_text = "Bind WebRTC ICE sockets to a local IPv4 or IPv6 address (default: all interfaces).",
437 .group = "NETWORK",
438 .env_var_name = "ASCII_CHAT_WEBRTC_BIND_ADDRESS",
439 .validate_fn = validate_webrtc_bind_address,
441 {"websocket-port",
442 '\0',
444 offsetof(options_t, websocket_port),
445 NULL, // Use mode_default_getter instead
446 sizeof(int),
447 "WebSocket server port (default: 27226 for server, 27227 for discovery-service, 443 when TLS cert+key provided).",
448 "NETWORK",
449 NULL,
450 false,
451 "ASCII_CHAT_WEBSOCKET_PORT",
452 NULL,
453 NULL,
454 false,
455 false,
457 {.numeric_range = {1, 65535, 1}, .input_type = OPTION_INPUT_NUMERIC},
459 {"no-webrtc",
460 '\0',
462 offsetof(options_t, no_webrtc),
463 &default_no_webrtc_value,
464 sizeof(bool),
465 "Disable WebRTC, use direct TCP only.",
466 "NETWORK",
467 NULL,
468 false,
469 "ASCII_CHAT_NO_WEBRTC",
470 NULL,
471 NULL,
472 false,
473 false,
475 {0},
476 NULL},
477 {"prefer-webrtc",
478 '\0',
480 offsetof(options_t, prefer_webrtc),
481 &default_prefer_webrtc_value,
482 sizeof(bool),
483 "Try WebRTC before direct TCP.",
484 "NETWORK",
485 NULL,
486 false,
487 "ASCII_CHAT_PREFER_WEBRTC",
488 NULL,
489 NULL,
490 false,
491 false,
493 {0},
494 NULL},
495 {"webrtc-relay-only",
496 '\0',
498 offsetof(options_t, webrtc_relay_only),
499 &default_webrtc_relay_only_value,
500 sizeof(bool),
501 "Require TURN relay for WebRTC connections (no direct connection or TCP fallback).",
502 "NETWORK",
503 NULL,
504 false,
505 "ASCII_CHAT_WEBRTC_RELAY_ONLY",
506 NULL,
507 NULL,
508 false,
509 false,
511 {0},
512 NULL},
513 {"webrtc-skip-stun",
514 '\0',
516 offsetof(options_t, webrtc_skip_stun),
517 &default_webrtc_skip_stun_value,
518 sizeof(bool),
519 "Skip WebRTC+STUN stage, go straight to TURN relay.",
520 "NETWORK",
521 NULL,
522 false,
523 "ASCII_CHAT_WEBRTC_SKIP_STUN",
524 NULL,
525 NULL,
526 false,
527 false,
529 {0},
530 NULL},
531 {"webrtc-disable-turn",
532 '\0',
534 offsetof(options_t, webrtc_disable_turn),
535 &default_webrtc_disable_turn_value,
536 sizeof(bool),
537 "Disable WebRTC+TURN relay, use STUN only.",
538 "NETWORK",
539 NULL,
540 false,
541 "ASCII_CHAT_WEBRTC_DISABLE_TURN",
542 NULL,
543 NULL,
544 false,
545 false,
547 {0},
548 NULL},
549 {"webrtc-skip-host",
550 '\0',
552 offsetof(options_t, webrtc_skip_host),
553 &default_webrtc_skip_host_value,
554 sizeof(bool),
555 "Skip host candidates, force STUN/TURN (for testing).",
556 "NETWORK",
557 NULL,
558 false,
559 "ASCII_CHAT_WEBRTC_SKIP_HOST",
560 NULL,
561 NULL,
562 false,
563 false,
565 {0},
566 NULL},
567 {"webrtc-ice-timeout",
568 '\0',
570 offsetof(options_t, webrtc_ice_timeout_ms),
571 &default_webrtc_ice_timeout_ms_value,
572 sizeof(int),
573 "ICE gathering timeout in milliseconds.",
574 "NETWORK",
575 NULL,
576 false,
577 "ASCII_CHAT_WEBRTC_ICE_TIMEOUT",
578 NULL,
579 NULL,
580 false,
581 false,
583 {0},
584 NULL},
585 {"stun-servers",
586 '\0',
588 offsetof(options_t, stun_servers),
590 0,
591 "Comma-separated list of WebRTC+STUN server URLs.",
592 "NETWORK",
593 NULL,
594 false,
595 "ASCII_CHAT_STUN_SERVERS",
596 NULL,
597 NULL,
598 false,
599 false,
601 {0},
602 NULL},
603 {"turn-servers",
604 '\0',
606 offsetof(options_t, turn_servers),
608 0,
609 "Comma-separated list of WebRTC+TURN server URLs.",
610 "NETWORK",
611 NULL,
612 false,
613 "ASCII_CHAT_TURN_SERVERS",
614 NULL,
615 NULL,
616 false,
617 false,
619 {0},
620 NULL},
621 {"turn-username",
622 '\0',
624 offsetof(options_t, turn_username),
626 0,
627 "Username for WebRTC+TURN authentication.",
628 "NETWORK",
629 NULL,
630 false,
631 "ASCII_CHAT_TURN_USERNAME",
632 NULL,
633 NULL,
634 false,
635 false,
637 {0},
638 NULL},
639 {"turn-credential",
640 '\0',
642 offsetof(options_t, turn_credential),
644 0,
645 "Credential/password for WebRTC+TURN authentication.",
646 "NETWORK",
647 NULL,
648 false,
649 "ASCII_CHAT_TURN_CREDENTIAL",
650 NULL,
651 NULL,
652 false,
653 false,
655 {0},
656 NULL},
657 {"turn-secret",
658 '\0',
660 offsetof(options_t, turn_secret),
661 "",
662 0,
663 "Shared secret for dynamic WebRTC+TURN credential generation (HMAC-SHA1).",
664 "NETWORK",
665 NULL,
666 false,
667 "ASCII_CHAT_TURN_SECRET",
668 NULL,
669 NULL,
670 false,
671 false,
673 {0},
674 NULL},
675
#define OPT_ENDPOINT_DISCOVERY_SERVICE
Default discovery service endpoint (what to connect to by default).
Definition options.h:555
#define OPT_TURN_SERVERS_DEFAULT
Default TURN server URLs (comma-separated).
Definition options.h:663
#define OPT_STUN_SERVERS_DEFAULT
Default STUN server URLs (comma-separated).
Definition options.h:660
#define OPT_TURN_CREDENTIAL_DEFAULT
Default TURN credential (empty = use ACDS credentials).
Definition options.h:695
#define OPT_TURN_USERNAME_DEFAULT
Default TURN username (empty = use ACDS credentials).
Definition options.h:692
@ OPTION_MODE_API_SERVER
Definition options.h:941
const char * g_compression_examples[]
Definition metadata.c:142
const char * g_reconnect_examples[]
Definition metadata.c:147
const char * g_maxclients_examples[]
Definition metadata.c:146
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:447

◆ g_security_entries

const registry_entry_t g_security_entries[]
extern

Definition at line 20 of file options/registry/security.c.

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

◆ g_terminal_entries

const registry_entry_t g_terminal_entries[]
extern

Definition at line 22 of file lib/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, .enum_descriptions = g_color_mode_descs, .enum_integer_values = g_color_mode_integers, .input_type = OPTION_INPUT_ENUM},
81 NULL},
82 {"show-capabilities",
83 '\0',
85 0,
86 NULL,
87 0,
88 "Show detected terminal capabilities and exit (useful for debugging and scripting).",
89 "TERMINAL",
90 NULL,
91 false,
92 NULL,
93 NULL,
94 NULL,
95 false,
96 false,
98 {0},
99 NULL},
100 {"utf8",
101 '\0',
103 offsetof(options_t, force_utf8),
104 &default_force_utf8_value,
105 sizeof(int),
106 "UTF-8 support setting: 'auto' (default, auto-detect), 'true' (force UTF-8 on), or 'false' (force UTF-8 off).",
107 "TERMINAL",
108 NULL,
109 false,
110 "ASCII_CHAT_UTF8",
111 NULL,
113 false,
114 true,
116 {.enum_values = g_utf8_setting_values, .enum_descriptions = g_utf8_setting_descs, .enum_integer_values = g_utf8_setting_integers, .input_type = OPTION_INPUT_ENUM},
117 NULL},
118 {"strip-ansi",
119 '\0',
121 offsetof(options_t, strip_ansi),
122 &default_strip_ansi_value,
123 sizeof(bool),
124 "Strip ANSI escape sequences from output before printing. Useful for scripting and debugging.",
125 "TERMINAL",
126 NULL,
127 false,
128 "ASCII_CHAT_STRIP_ANSI",
129 NULL,
130 NULL,
131 false,
132 false,
134 {0},
135 NULL},
136 {"color",
137 '\0',
139 offsetof(options_t, color),
140 &default_color_value,
141 sizeof(int),
142 "Color output setting: 'auto' (default, smart detection), 'true' (force colors on), or 'false' (force colors "
143 "off).",
144 "TERMINAL",
145 NULL,
146 false,
147 "ASCII_CHAT_COLOR",
148 NULL,
150 false,
151 true,
153 {.enum_values = g_color_setting_values, .enum_descriptions = g_color_setting_descs, .enum_integer_values = g_color_setting_integers, .input_type = OPTION_INPUT_ENUM},
154 NULL},
155
int color_mode
Definition fft.c:26
unsigned int height
Definition fft.c:24
unsigned int width
Definition fft.c:24
const char * g_height_examples[]
Definition metadata.c:145
const int g_color_setting_integers[]
Definition metadata.c:38
const char * g_color_mode_values[]
Definition metadata.c:54
const char * g_width_examples[]
Definition metadata.c:144
const char * g_color_setting_descs[]
Definition metadata.c:39
const char * g_utf8_setting_values[]
Definition metadata.c:45
const int g_utf8_setting_integers[]
Definition metadata.c:46
const char * g_utf8_setting_descs[]
Definition metadata.c:47
const char * g_color_setting_values[]
Definition metadata.c:37
const char * g_color_mode_descs[]
Definition metadata.c:56
const int g_color_mode_integers[]
Definition metadata.c:55
bool parse_color_setting(const char *arg, void *dest, char **error_msg)
Parse color setting option (–color flag).
Definition parsers.c:105
bool parse_color_mode(const char *arg, void *dest, char **error_msg)
Parse terminal color level option.
Definition parsers.c:151
bool parse_utf8_setting(const char *arg, void *dest, char **error_msg)
Parse UTF-8 setting option (–utf8 flag).
Definition parsers.c:132
#define UI_MEDIA_MIN_COLS
Definition too_small.h:9
#define UI_MEDIA_MIN_ROWS
Definition too_small.h:10

◆ 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(((options_t *)0)->webcam_index),
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", '\0', OPTION_TYPE_ACTION, 0, NULL, 0, "List available webcam devices by index and exit.", "WEBCAM", NULL, false, NULL, NULL, NULL, false, false, OPTION_MODE_BINARY, {0}, NULL},
73
const char * g_webcam_examples[]
Definition metadata.c:148
test pattern is intentionally a small, concrete record. Fields such as image, rgba give callers the i...