ascii-chat 0.11.33
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 21 of file lib/options/registry/audio.c.

21 {
22 // AUDIO GROUP (client, discovery)
23 {"audio",
24 'A',
26 offsetof(options_t, audio_enabled),
27 &default_audio_enabled_value,
28 sizeof(bool),
29 "Enable audio streaming (press 'm' during rendering to toggle).",
30 "AUDIO",
31 NULL,
32 false,
33 "ASCII_CHAT_AUDIO",
34 NULL,
35 NULL,
36 false,
37 false,
39 {0},
40 NULL},
41 {"microphone-index",
42 '\0',
44 offsetof(options_t, microphone_index),
45 &default_microphone_index_value,
46 sizeof(int),
47 "Microphone device index for audio input.",
48 "AUDIO",
49 NULL,
50 false,
51 "ASCII_CHAT_MICROPHONE_INDEX",
52 NULL,
53 NULL,
54 false,
55 false,
57 {.numeric_range = {-1, 10, 1}, .examples = g_mic_examples, .input_type = OPTION_INPUT_NUMERIC},
58 NULL},
59 {"speakers-index",
60 '\0',
62 offsetof(options_t, speakers_index),
63 &default_speakers_index_value,
64 sizeof(int),
65 "Speakers device index to use for audio output.",
66 "AUDIO",
67 NULL,
68 false,
69 "ASCII_CHAT_SPEAKERS_INDEX",
70 NULL,
71 NULL,
72 false,
73 false,
75 {.numeric_range = {-1, 10, 1}, .examples = g_speakers_examples, .input_type = OPTION_INPUT_NUMERIC},
76 NULL},
77 {"microphone-volume",
78 '\0',
80 offsetof(options_t, microphone_sensitivity),
81 &default_microphone_sensitivity_value,
82 sizeof(float),
83 "Microphone volume multiplier (0.0-1.0).",
84 "AUDIO",
85 NULL,
86 false,
87 "ASCII_CHAT_MICROPHONE_VOLUME",
88 NULL,
90 false,
91 false,
93 {.numeric_range = {0, 1, 0}},
94 NULL},
95 {"ivolume",
96 '\0',
98 offsetof(options_t, microphone_sensitivity),
99 &default_microphone_sensitivity_value,
100 sizeof(float),
101 "Alias for --microphone-volume.",
102 "AUDIO",
103 NULL,
104 false,
105 "ASCII_CHAT_IVOLUME",
106 NULL,
108 false,
109 false,
111 {.numeric_range = {0, 1, 0}},
112 NULL},
113 {"speakers-volume",
114 '\0',
116 offsetof(options_t, speakers_volume),
117 &default_speakers_volume_value,
118 sizeof(float),
119 "Speakers volume multiplier (0.0-1.0; press =/- during rendering to adjust).",
120 "AUDIO",
121 NULL,
122 false,
123 "ASCII_CHAT_SPEAKERS_VOLUME",
124 NULL,
126 false,
127 false,
129 {.numeric_range = {0, 1, 0}},
130 NULL},
131 {"volume",
132 '\0',
134 offsetof(options_t, speakers_volume),
135 &default_speakers_volume_value,
136 sizeof(float),
137 "Alias for --speakers-volume.",
138 "AUDIO",
139 NULL,
140 false,
141 "ASCII_CHAT_VOLUME",
142 NULL,
144 false,
145 false,
147 {.numeric_range = {0, 1, 0}},
148 NULL},
149 {"audio-source",
150 '\0',
152 offsetof(options_t, audio_source),
153 &default_audio_source_value,
154 sizeof(audio_source_t),
155 "Select audio shown by --waveform/--fft: all (default), call, mic, or media.",
156 "AUDIO",
157 NULL,
158 false,
159 "ASCII_CHAT_AUDIO_SOURCE",
160 NULL,
162 false,
163 false,
165 {.enum_values = g_audio_source_values,
166 .enum_descriptions = g_audio_source_descs,
167 .enum_integer_values = g_audio_source_integers,
168 .input_type = OPTION_INPUT_ENUM},
169 NULL},
170 {"audio-capture-source",
171 '\0',
173 offsetof(options_t, audio_capture_source),
174 &default_audio_capture_source_value,
176 "Select local audio capture and media playback: auto, mic, media, both, or remote.",
177 "AUDIO",
178 NULL,
179 false,
180 "ASCII_CHAT_AUDIO_CAPTURE_SOURCE",
181 NULL,
183 false,
184 false,
186 {.enum_values = g_audio_capture_source_values,
187 .enum_descriptions = g_audio_capture_source_descs,
188 .enum_integer_values = g_audio_capture_source_integers,
189 .input_type = OPTION_INPUT_ENUM},
190 NULL},
191#ifdef DEBUG
192 {"audio-analysis",
193 '\0',
195 offsetof(options_t, audio_analysis_enabled),
196 &default_audio_analysis_value,
197 sizeof(bool),
198 "Enable audio analysis (debug).",
199 "AUDIO",
200 NULL,
201 false,
202 "ASCII_CHAT_AUDIO_ANALYSIS",
203 NULL,
204 NULL,
205 false,
206 false,
208 {0},
209 NULL},
210#endif
211 {"no-audio-playback",
212 '\0',
214 offsetof(options_t, audio_no_playback),
215 &default_no_audio_playback_value,
216 sizeof(bool),
217 "Disable speakers output.",
218 "AUDIO",
219 NULL,
220 false,
221 "ASCII_CHAT_NO_AUDIO_PLAYBACK",
222 NULL,
223 NULL,
224 false,
225 false,
227 {0},
228 NULL},
229 {"encode-audio",
230 '\0',
232 offsetof(options_t, encode_audio),
233 &default_encode_audio_value,
234 sizeof(bool),
235 "Enable Opus audio encoding.",
236 "AUDIO",
237 NULL,
238 false,
239 "ASCII_CHAT_ENCODE_AUDIO",
240 NULL,
241 NULL,
242 false,
243 false,
245 {0},
246 NULL},
247 {"no-encode-audio",
248 '\0',
250 offsetof(options_t, encode_audio),
251 &default_no_encode_audio_value,
252 sizeof(bool),
253 "Disable Opus audio encoding.",
254 "AUDIO",
255 NULL,
256 false,
257 "ASCII_CHAT_NO_ENCODE_AUDIO",
258 NULL,
259 NULL,
260 false,
261 false,
263 {0},
264 NULL},
265 {"no-audio-mixer",
266 '\0',
268 offsetof(options_t, no_audio_mixer),
269 &default_no_audio_mixer_value,
270 sizeof(bool),
271 "Use simple audio mixing without ducking or compression (debug mode only).",
272 "AUDIO",
273 NULL,
274 false,
275 "ASCII_CHAT_NO_AUDIO_MIXER",
276 NULL,
277 NULL,
278 false,
279 false,
281 {0},
282 NULL},
283 {"list-microphones",
284 '\0',
286 0,
287 NULL,
288 0,
289 "List available audio input devices by index and exit.",
290 "AUDIO",
291 NULL,
292 false,
293 NULL,
294 NULL,
295 NULL,
296 false,
297 false,
299 {0},
300 NULL},
301 {"list-speakers",
302 '\0',
304 0,
305 NULL,
306 0,
307 "List available audio output devices by index and exit.",
308 "AUDIO",
309 NULL,
310 false,
311 NULL,
312 NULL,
313 NULL,
314 false,
315 false,
317 {0},
318 NULL},
319
@ OPTION_INPUT_NUMERIC
Numeric value with optional min/max/step.
Definition builder.h:179
@ OPTION_INPUT_ENUM
Choose from fixed set of enum values.
Definition builder.h:178
@ OPTION_TYPE_INT
Integer value (–count 42)
Definition builder.h:163
@ OPTION_TYPE_ACTION
Action that executes and may exit (–list-webcams, etc.)
Definition builder.h:167
@ OPTION_TYPE_CALLBACK
Custom parser function.
Definition builder.h:166
@ OPTION_TYPE_BOOL
Boolean flag (–flag, no value)
Definition builder.h:162
audio_source_t
Audio source selected for visualization.
@ OPTION_MODE_BINARY
Binary-level options (parsed before mode detection)
@ OPTION_MODE_CLIENT
Client mode (bit 1)
@ OPTION_MODE_DISCOVERY
Discovery mode (bit 4)
@ OPTION_MODE_SERVER
Server mode (bit 0)
@ OPTION_MODE_MIRROR
Mirror mode (bit 2)
const char * g_audio_capture_source_values[]
Definition metadata.c:161
const char * g_audio_source_descs[]
Definition metadata.c:157
const char * g_speakers_examples[]
Definition metadata.c:188
const int g_audio_capture_source_integers[]
Definition metadata.c:164
const char * g_audio_source_values[]
Definition metadata.c:154
const char * g_mic_examples[]
Definition metadata.c:187
const char * g_audio_capture_source_descs[]
Definition metadata.c:167
const int g_audio_source_integers[]
Definition metadata.c:156
#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:1161
bool parse_audio_capture_source(const char *arg, void *dest, char **error_msg)
Definition parsers.c:1197
bool parse_volume(const char *arg, void *dest, char **error_msg)
Custom parser for volume options (–volume, –speakers-volume, –microphone-volume)
Definition parsers.c:1095
#define bool
Definition stdbool.h:61
Consolidated options structure.

◆ g_configuration_entries

const registry_entry_t g_configuration_entries[]
extern

Definition at line 18 of file configuration.c.

18 {
19 // CONFIGURATION GROUP (binary-level)
20 {"config",
21 '\0',
23 offsetof(options_t, config_file),
24 "",
25 0,
26 "Load configuration from toml FILE.",
27 "CONFIGURATION",
28 "FILE",
29 false,
30 NULL,
31 NULL,
32 NULL,
33 false,
34 false,
36 {0},
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 {0},
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 {0},
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 {0},
91 NULL},
92
@ OPTION_TYPE_STRING
String value (–name foo)
Definition builder.h:164

◆ 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 {0},
35 NULL},
36
@ OPTION_MODE_DISCOVERY_SVC
Discovery server mode (bit 3)

◆ g_debug_entries

const registry_entry_t g_debug_entries[]
extern

Definition at line 14 of file debug.c.

14 {
15 {"sync-state",
16 '\0',
18 offsetof(options_t, debug_sync_state_time),
19 &default_debug_sync_state_time_value,
20 sizeof(double),
21 "Print synchronization primitive state with optional time offset (debug builds only).",
22 "DEBUG",
23 "TIME",
24 false, // required
25 NULL, // env_var_name
26 NULL, // validate_fn
27 NULL, // parse_fn
28 false, // owns_memory
29 true, // optional_arg
31 {0}, // metadata
32 NULL}, // action_fn
33 {"backtrace",
34 '\0',
36 offsetof(options_t, debug_backtrace_time),
37 &default_debug_backtrace_time_value,
38 sizeof(double),
39 "Print backtrace with optional time offset (debug builds only).",
40 "DEBUG",
41 "TIME",
42 false, // required
43 NULL, // env_var_name
44 NULL, // validate_fn
45 NULL, // parse_fn
46 false, // owns_memory
47 true, // optional_arg
49 {0}, // metadata
50 NULL}, // action_fn
51 {"memory-report",
52 '\0',
54 offsetof(options_t, debug_memory_report_interval),
55 &default_debug_memory_report_interval_value,
56 sizeof(double),
57 "Print memory report periodically at specified interval in seconds (debug builds only).",
58 "DEBUG",
59 "TIME",
60 false, // required
61 NULL, // env_var_name
62 NULL, // validate_fn
63 NULL, // parse_fn
64 false, // owns_memory
65 true, // optional_arg
67 {0}, // metadata
68 NULL}, // action_fn
69
@ OPTION_TYPE_DOUBLE
Floating point (–ratio 1.5)
Definition builder.h:165
@ OPTION_MODE_ALL
All modes + binary.

◆ g_display_entries

const registry_entry_t g_display_entries[]
extern

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

21 {
22 {"waveform",
23 '\0',
25 offsetof(options_t, waveform),
26 &default_waveform_value,
27 sizeof(bool),
28 "Replace the video image with a live waveform of the source selected by --audio-source.",
29 "DISPLAY",
30 NULL,
31 false,
32 "ASCII_CHAT_WAVEFORM",
33 NULL,
34 NULL,
35 false,
36 false,
38 {0},
39 NULL},
40 {"fft",
41 '\0',
43 offsetof(options_t, fft),
44 &default_fft_value,
45 sizeof(bool),
46 "Replace the video image with a live scrolling frequency display for the source selected by --audio-source.",
47 "DISPLAY",
48 NULL,
49 false,
50 "ASCII_CHAT_FFT",
51 NULL,
52 NULL,
53 false,
54 false,
56 {0},
57 NULL},
58 // DISPLAY GROUP (client, mirror, discovery)
59 {"color-filter",
60 '\0',
62 offsetof(options_t, color_filter),
63 &default_color_filter_value,
64 sizeof(color_filter_t),
65 "Apply a monochromatic color tint to grayscale video. Values: none, black, white, green, magenta, fuchsia, "
66 "orange, teal, cyan, pink, red, yellow, rainbow. Using --color-filter automatically sets --color-mode to mono.",
67 "DISPLAY",
68 NULL,
69 false,
70 "ASCII_CHAT_COLOR_FILTER",
71 NULL,
73 false,
74 false,
76 {.enum_values = g_color_filter_values,
77 .enum_descriptions = g_color_filter_descs,
78 .enum_integer_values = g_color_filter_integers,
79 .input_type = OPTION_INPUT_ENUM},
80 NULL},
81 {"render-mode",
82 'M',
84 offsetof(options_t, render_mode),
85 &default_render_mode_value,
86 sizeof(render_mode_t),
87 "Render mode of text for your client to display. Values: foreground, background, half-block. Press 'r' during "
88 "rendering to cycle.",
89 "DISPLAY",
90 NULL,
91 false,
92 "ASCII_CHAT_RENDER_MODE",
93 NULL,
95 false,
96 false,
98 {.enum_values = g_render_values,
99 .enum_descriptions = g_render_descs,
100 .enum_integer_values = g_render_integers,
101 .input_type = OPTION_INPUT_ENUM},
102 NULL},
103 {"palette",
104 'P',
106 offsetof(options_t, palette_type),
107 &default_palette_type_value,
108 sizeof(palette_type_t),
109 "Palette type with which to render images to text art. Values: standard, blocks, digital, minimal, cool, "
110 "custom. All but 'custom' are built-in presets that all look different and nice. Try them out.",
111 "DISPLAY",
112 NULL,
113 false,
114 "ASCII_CHAT_PALETTE",
115 NULL,
117 false,
118 false,
120 {.enum_values = g_palette_values,
121 .enum_descriptions = g_palette_descs,
122 .enum_integer_values = g_palette_integers,
123 .input_type = OPTION_INPUT_ENUM},
124 NULL},
125 {"palette-chars",
126 'C',
128 offsetof(options_t, palette_custom),
129 "",
130 0,
131 "Ordered sequence of characters from darkest to brightest to use with custom palette (--palette=custom) for "
132 "rendering images to text art for your client. These characters only will be used to create the rendered output. "
133 "Can be UTF-8 content (see --utf8).",
134 "DISPLAY",
135 "STRING",
136 false,
137 "ASCII_CHAT_PALETTE_CHARS",
138 NULL,
140 false,
141 false,
143 {0},
144 NULL},
145 {"stretch",
146 '\0',
148 offsetof(options_t, stretch),
149 &default_stretch_value,
150 sizeof(bool),
151 "Allow aspect ratio distortion of image for rendering ascii output. This can allow the rendered ascii to fill "
152 "your terminal.",
153 "DISPLAY",
154 NULL,
155 false,
156 "ASCII_CHAT_STRETCH",
157 NULL,
158 NULL,
159 false,
160 false,
162 {0},
163 NULL},
164 {"fps",
165 '\0',
167 offsetof(options_t, fps),
168 &default_fps_value,
169 sizeof(int),
170 "Target framerate for rendering (1-144).",
171 "DISPLAY",
172 NULL,
173 false,
174 "ASCII_CHAT_FPS",
175 NULL,
176 NULL,
177 false,
178 false,
180 {.numeric_range = {1, 144, 1}, .examples = g_fps_examples, .input_type = OPTION_INPUT_NUMERIC},
181 NULL},
182 {"snapshot",
183 'S',
185 offsetof(options_t, snapshot_mode),
186 &default_snapshot_mode_value,
187 sizeof(bool),
188 "Snapshot mode (one frame and exit).",
189 "DISPLAY",
190 NULL,
191 false,
192 "ASCII_CHAT_SNAPSHOT",
193 NULL,
194 NULL,
195 false,
196 false,
198 {0},
199 NULL},
200 {"snapshot-delay",
201 'D',
203 offsetof(options_t, snapshot_delay),
204 &default_snapshot_delay_value,
205 sizeof(double),
206 "Snapshot delay in seconds. The timer starts right before the client-side program prints the first frame. "
207 "--snapshot --snapshot-delay=0 will print the first frame and exit.",
208 "DISPLAY",
209 "SECONDS",
210 false,
211 "ASCII_CHAT_SNAPSHOT_DELAY",
212 NULL,
213 NULL,
214 false,
215 false,
217 {.numeric_range = {0, 3600, 0}, .input_type = OPTION_INPUT_NUMERIC},
218 NULL},
219 {"matrix",
220 '\0',
222 offsetof(options_t, matrix_rain),
223 &default_matrix_rain_value,
224 sizeof(bool),
225 "Enable Matrix-style digital rain effect. Works with --render-mode truecolor|256 and --color-filter [color].",
226 "DISPLAY",
227 NULL,
228 false,
229 "ASCII_CHAT_MATRIX",
230 NULL,
231 NULL,
232 false,
233 false,
235 {0},
236 NULL},
237 {"fps-counter",
238 '\0',
240 offsetof(options_t, fps_counter),
241 &default_fps_counter_value,
242 sizeof(bool),
243 "Show FPS counter overlay in top-right corner. Press '-' to toggle.",
244 "DISPLAY",
245 NULL,
246 false,
247 "ASCII_CHAT_FPS_COUNTER",
248 NULL,
249 NULL,
250 false,
251 false,
253 {0},
254 NULL},
255 {"flip-x",
256 '\0',
258 offsetof(options_t, flip_x),
259 &default_flip_x_value,
260 sizeof(bool),
261 "Flip video horizontally (X-axis). Works with webcam, files, and streams. Note: Ignored for webcam on macOS "
262 "(respects platform default like FaceTime).",
263 "DISPLAY",
264 NULL,
265 false,
266 "ASCII_CHAT_FLIP_X",
267 NULL,
268 NULL,
269 false,
270 false,
272 {0},
273 NULL},
274 {"flip-y",
275 '\0',
277 offsetof(options_t, flip_y),
278 &default_flip_y_value,
279 sizeof(bool),
280 "Flip video vertically (Y-axis). Works with webcam, files, and streams.",
281 "DISPLAY",
282 NULL,
283 false,
284 "ASCII_CHAT_FLIP_Y",
285 NULL,
286 NULL,
287 false,
288 false,
290 {0},
291 NULL},
292
palette_type_t
Built-in palette type enumeration.
Definition palette.h:84
const int g_palette_integers[]
Definition metadata.c:115
const char * g_color_filter_descs[]
Definition metadata.c:89
const char * g_palette_descs[]
Definition metadata.c:117
const char * g_color_filter_values[]
Definition metadata.c:78
const char * g_render_descs[]
Definition metadata.c:134
const int g_render_integers[]
Definition metadata.c:131
const char * g_fps_examples[]
Definition metadata.c:181
const char * g_palette_values[]
Definition metadata.c:108
const int g_color_filter_integers[]
Definition metadata.c:85
const char * g_render_values[]
Definition metadata.c:129
bool parse_render_mode(const char *arg, void *dest, char **error_msg)
Parse render mode option.
Definition parsers.c:299
bool parse_palette_type(const char *arg, void *dest, char **error_msg)
Parse palette type option.
Definition parsers.c:385
bool parse_color_filter(const char *arg, void *dest, char **error_msg)
Parse color filter option.
Definition parsers.c:269
bool parse_palette_chars(const char *arg, void *dest, char **error_msg)
Parse custom palette characters option.
Definition parsers.c:929
color_filter_t
Monochromatic color filter enumeration.
Definition terminal.h:599
render_mode_t
Render mode preferences.
Definition terminal.h:662

◆ g_general_entries

const registry_entry_t g_general_entries[]
extern

Definition at line 18 of file general.c.

18 {
19 // GENERAL GROUP (binary-level + all modes)
20 {"help",
21 'h',
23 0,
24 NULL,
25 0,
26 "Show this help message and exit.",
27 "GENERAL",
28 NULL,
29 false,
30 NULL,
31 NULL,
32 NULL,
33 false,
34 false,
37 {0},
38 NULL},
39 {"version",
40 'v',
42 0,
43 NULL,
44 0,
45 "Show version information and exit.",
46 "GENERAL",
47 NULL,
48 false,
49 NULL,
50 NULL,
51 NULL,
52 false,
53 false,
55 {0},
56 NULL},
57 {"splash-screen",
58 '\0',
60 offsetof(options_t, splash_screen),
61 &default_splash_value,
62 sizeof(bool),
63 "Enable or disable splash screen with ASCII art. Overrides CLAUDECODE environment variable.",
64 "GENERAL",
65 NULL,
66 false,
67 "ASCII_CHAT_SPLASH_SCREEN",
68 NULL,
69 NULL,
70 false,
71 true, // optional_arg: allows --splash-screen to toggle or --splash-screen=true/false
73 {0},
74 NULL},
75 {"status-screen",
76 '\0',
78 offsetof(options_t, status_screen),
79 &default_status_screen_value,
80 sizeof(bool),
81 "Enable or disable live status screen display. Overrides non-interactive terminal checks.",
82 "GENERAL",
83 NULL,
84 false,
85 "ASCII_CHAT_STATUS_SCREEN",
86 NULL,
87 NULL,
88 false,
89 true, // optional_arg: allows --status-screen to toggle or --status-screen=true/false
91 {0},
92 NULL},
93 {"keepawake",
94 '\0',
96 offsetof(options_t, enable_keepawake),
97 &default_enable_keepawake_value,
98 sizeof(bool),
99 "Explicitly enable system sleep prevention (keepawake mode).",
100 "GENERAL",
101 NULL,
102 false,
103 "ASCII_CHAT_KEEPAWAKE",
104 NULL,
105 NULL,
106 false,
107 false,
109 {0},
110 NULL},
111 {"no-keepawake",
112 '\0',
114 offsetof(options_t, disable_keepawake),
115 &default_disable_keepawake_value,
116 sizeof(bool),
117 "Disable system sleep prevention (allow OS to sleep).",
118 "GENERAL",
119 NULL,
120 false,
121 "ASCII_CHAT_NO_KEEPAWAKE",
122 NULL,
123 NULL,
124 false,
125 false,
127 {0},
128 NULL},
129 {"check-update",
130 '\0',
132 0,
133 NULL,
134 0,
135 "Check for updates from GitHub releases and exit.",
136 "GENERAL",
137 NULL,
138 false,
139 NULL,
140 NULL,
141 NULL,
142 false,
143 false,
145 {0},
146 NULL},
147 {"no-check-update",
148 '\0',
150 offsetof(options_t, no_check_update),
151 &default_no_check_update_value,
152 sizeof(bool),
153 "Disable automatic update checks at startup.",
154 "GENERAL",
155 NULL,
156 false,
157 "ASCII_CHAT_NO_CHECK_UPDATE",
158 NULL,
159 NULL,
160 false,
161 false,
163 {0},
164 NULL},
165

◆ g_logging_entries

const registry_entry_t g_logging_entries[]
extern

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

21 {
22 // LOGGING GROUP (binary-level)
23 {"log-file",
24 'L',
26 offsetof(options_t, log_file),
27 NULL, // Use mode_default_getter instead
28 0,
29#ifndef NDEBUG
30 "Set FILE as path for log file (default: current directory; filenames: server.log, client.log, mirror.log, "
31 "acds.log, discovery.log).",
32#else
33 "Set FILE as path for log file (default: $TMPDIR/ascii-chat/ or %TEMP%\\ascii-chat\\; filenames: server.log, "
34 "client.log, mirror.log, acds.log, discovery.log).",
35#endif
36 "LOGGING",
37 "FILE",
38 false,
39 "ASCII_CHAT_LOG_FILE",
40 NULL,
42 false,
43 false,
44#ifndef NDEBUG
46#else
48#endif
49 {0},
51 {"log-level",
52 '\0',
54 offsetof(options_t, log_level),
55 &default_log_level_value,
56 sizeof(log_level_t),
57 "Set log level: dev, debug, info, warn, error, fatal. Logs at or above this level are written.",
58 "LOGGING",
59 NULL,
60 false,
61 "ASCII_CHAT_LOG_LEVEL",
62 NULL,
64 false,
65 false,
67 {.enum_values = g_log_level_values,
68 .enum_descriptions = g_log_level_descs,
69 .enum_integer_values = g_log_level_integers,
70 .input_type = OPTION_INPUT_ENUM},
71 NULL},
72 {"verbose",
73 'V',
75 offsetof(options_t, verbose_level),
76 0,
77 sizeof(unsigned short int),
78 "Increase log verbosity (stackable: -VV, -VVV).",
79 "LOGGING",
80 NULL,
81 false,
82 "ASCII_CHAT_VERBOSE",
83 NULL,
85 false,
86 true,
88 {0},
89 NULL},
90 {"quiet",
91 'q',
93 offsetof(options_t, quiet),
94 &default_quiet_value,
95 sizeof(bool),
96 "Disable console logging (log to file only).",
97 "LOGGING",
98 NULL,
99 false,
100 "ASCII_CHAT_QUIET",
101 NULL,
102 NULL,
103 false,
104 false,
106 {0},
107 NULL},
108 {"grep",
109 '\0',
111 offsetof(options_t, grep_pattern),
112 NULL, // Default is empty string - not meaningful to display in help
113 sizeof(char *),
114 "Filter console logs with perl compatible regular expressions or fixed strings. "
115 "Format 1: /pattern/flags (with flags). Format 2: pattern (plain regex, no flags). "
116 "Flags (format 1 only): i(case-insensitive), m(multiline), s(dotall), x(extended), g(global highlight), "
117 "I(invert match), F(fixed string), A<n>(n lines after), B<n>(n lines before), C<n>(n lines of context). "
118 "Multiple --grep allowed (OR).",
119 "LOGGING",
120 "PATTERN",
121 false,
122 "ASCII_CHAT_GREP",
123 NULL,
124 NULL,
125 false,
126 false,
128 {.examples = (const char *[]){"ERROR", "client\\.c", "network.*failed", NULL}},
129 NULL},
130 {"color-scheme",
131 '\0',
133 offsetof(options_t, color_scheme_name),
135 sizeof(((options_t *)0)->color_scheme_name),
136 "Color scheme for logging output. Built-in schemes: pastel, nord, solarized, dracula, gruvbox, "
137 "monokai, base16-default. All schemes with light variants auto-adapt to terminal background.",
138 "LOGGING",
139 "NAME",
140 false,
141 "ASCII_CHAT_COLOR_SCHEME",
142 NULL,
143 NULL,
144 false,
145 false,
147 {.input_type = OPTION_INPUT_STRING},
148 NULL},
149 {"json",
150 '\0',
152 offsetof(options_t, json),
153 &default_json_value,
154 sizeof(bool),
155 "Enable JSON logging (machine-readable NDJSON format). Disabled by default (text format).",
156 "LOGGING",
157 NULL,
158 false,
159 "ASCII_CHAT_JSON",
160 NULL,
161 NULL,
162 false,
163 false,
165 {0},
166 NULL},
167 {"log-template",
168 '\0',
170 offsetof(options_t, log_template),
171 NULL,
172 sizeof(((options_t *)0)->log_template),
173 "Custom log format string. Format specifiers: %time(fmt) - time with strftime format (see man 3 strftime); "
174 "%level - log level (DEV/DEBUG/INFO/WARN/ERROR/FATAL); %level_aligned - level padded to 5 chars; "
175 "%file - full file path; %file_relative - file path relative to project root; %line - line number; "
176 "%func - function name; %tid - thread ID; %message - log message; "
177 "%color(LEVEL, text) - colorize text using LEVEL's color from current scheme. "
178 "Escape %% for literal %, \\\\ for literal backslash.",
179 "LOGGING",
180 "TEMPLATE",
181 false,
182 "ASCII_CHAT_LOG_TEMPLATE",
183 NULL,
184 NULL,
185 false,
186 false,
188 {.input_type = OPTION_INPUT_STRING},
189 NULL},
190 {"log-format-console",
191 '\0',
193 offsetof(options_t, log_format_console_only),
194 NULL,
195 sizeof(bool),
196 "Apply custom log template (--log-template) only to console output (file logs use default format). See "
197 "--log-template "
198 "for supported format specifiers.",
199 "LOGGING",
200 NULL,
201 false,
202 "ASCII_CHAT_LOG_FORMAT_CONSOLE",
203 NULL,
204 NULL,
205 false,
206 false,
208 {0},
209 NULL},
210
@ OPTION_INPUT_STRING
Free-form text input.
Definition builder.h:180
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:646
#define OPT_COLOR_SCHEME_NAME_DEFAULT
Default color scheme name (pastel)
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:972
bool parse_log_file(const char *arg, void *dest, char **error_msg)
Custom parser for log file paths (–log-file, -L)
Definition parsers.c:1127
bool parse_log_level(const char *arg, void *dest, char **error_msg)
Parse log level option.
Definition parsers.c:448

◆ g_media_entries

const registry_entry_t g_media_entries[]
extern

Definition at line 37 of file media.c.

37 {
38 // Media File Streaming Options
39 {"file",
40 'f',
42 offsetof(options_t, media_file),
43 "",
44 0,
45 "Stream from media file or stdin (use '-' for stdin). Supported formats: see man ffmpeg-formats; codecs: see man "
46 "ffmpeg-codecs.",
47 "MEDIA",
48 NULL,
49 false,
50 "ASCII_CHAT_FILE",
51 NULL,
52 NULL,
53 false,
54 false,
56 {0},
57 NULL},
58 {"url",
59 'u',
61 offsetof(options_t, media_url),
62 "",
63 0,
64 "Stream from network URL. Direct HTTP/HTTPS/RTSP streams use FFmpeg; complex sites (YouTube, TikTok, etc.) use "
65 "yt-dlp. Supported formats: see man ffmpeg-formats; codecs: see man ffmpeg-codecs; sites: yt-dlp "
66 "https://github.com/yt-dlp/yt-dlp/blob/master/README.md#supported-sites.",
67 "MEDIA",
68 NULL,
69 false,
70 "ASCII_CHAT_URL",
71 NULL,
72 NULL,
73 false,
74 false,
76 {0},
77 NULL},
78 {"loop",
79 'l',
81 offsetof(options_t, media_loop),
82 &default_media_loop_value,
83 sizeof(bool),
84 "Loop media file playback (not supported for --url).",
85 "MEDIA",
86 NULL,
87 false,
88 "ASCII_CHAT_LOOP",
89 NULL,
90 NULL,
91 false,
92 false,
94 {0},
95 NULL},
96 {"pause",
97 '\0',
99 offsetof(options_t, pause),
100 &default_pause_value,
101 sizeof(bool),
102 "Start playback paused (toggle with spacebar, requires --file or --url).",
103 "MEDIA",
104 NULL,
105 false,
106 "ASCII_CHAT_PAUSE",
107 NULL,
108 NULL,
109 false,
110 false,
112 {0},
113 NULL},
114 {"seek",
115 's',
117 offsetof(options_t, media_seek_timestamp),
118 &default_media_seek_value,
119 sizeof(double),
120 "Seek to timestamp before playback (format: seconds, MM:SS, or HH:MM:SS.ms).",
121 "MEDIA",
122 NULL,
123 false,
124 "ASCII_CHAT_SEEK",
125 NULL,
127 false,
128 false,
130 {.examples = g_seek_examples, .input_type = OPTION_INPUT_STRING},
131 NULL},
132 {"yt-dlp-options",
133 '\0',
135 offsetof(options_t, yt_dlp_options),
136 NULL,
137 sizeof(((options_t *)0)->yt_dlp_options),
138 "Arbitrary yt-dlp options passed to the extraction subprocess for URL resolution. "
139 "Examples: --no-warnings or --proxy socks5://127.0.0.1:1080 or --cookies-from-browser=firefox.",
140 "MEDIA",
141 NULL,
142 false,
143 "ASCII_CHAT_YT_DLP_OPTIONS",
144 NULL,
145 NULL,
146 false,
147 false,
149 {0},
150 NULL},
151 {"video-codec",
152 '\0',
154 offsetof(options_t, video_codec),
155 "hevc",
156 sizeof(((options_t *)0)->video_codec),
157 "Video codec for streaming (raw, hevc). raw=uncompressed RGB, hevc=H.265 compression. Default: hevc.",
158 "MEDIA",
159 "CODEC",
160 false,
161 "ASCII_CHAT_VIDEO_CODEC",
162 NULL,
163 NULL,
164 false,
165 false,
167 {0},
168 NULL},
169
170#define RENDER_FILE_MODES (OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY)
171
172 {"render-file",
173 '\0',
175 offsetof(options_t, render_file),
176 "",
177 sizeof(((options_t *)0)->render_file),
178 "Render ASCII frames to stdout or video/image file. Use '-' for stdout; extension determines format: "
179 ".mp4, .mov, .webm, .avi, .gif, .png, .jpg.",
180 "MEDIA",
181 "PATH",
182 false,
183 "ASCII_CHAT_RENDER_FILE",
184 NULL,
185 NULL,
186 false,
187 false,
189 {0},
190 NULL},
191
192 {"render-theme",
193 '\0',
195 offsetof(options_t, render_theme),
196 &default_render_theme_value,
197 sizeof(int),
198 "Terminal color scheme for rendered output: dark, light, auto.",
199 "MEDIA",
200 "THEME",
201 false,
202 "ASCII_CHAT_RENDER_THEME",
203 NULL,
205 false,
206 false,
208 {.enum_values = g_render_theme_values, .enum_descriptions = g_render_theme_descs, .input_type = OPTION_INPUT_ENUM},
209 NULL},
210
211 {"render-font",
212 '\0',
214 offsetof(options_t, render_font),
215 "",
216 sizeof(((options_t *)0)->render_font),
217 "Font for render-file output: bundled names (matrix or default), system font names, or absolute .ttf/.otf path. "
218 "Default: default (bundled DejaVu Sans Mono). "
219 "Examples: matrix, default, JetBrains Mono, Nerd Font Mono, /path/to/font.ttf.",
220 "MEDIA",
221 "FONT",
222 false,
223 "ASCII_CHAT_RENDER_FONT",
224 NULL,
225 NULL,
226 false,
227 false,
229 {0},
230 NULL},
231
232 {"render-font-size",
233 '\0',
235 offsetof(options_t, render_font_size),
236 &default_render_font_size_value,
237 sizeof(double),
238 "Font size in points for render-file output (default: 12.0, must be > 0, fractional sizes supported e.g. 10.5).",
239 "MEDIA",
240 "SIZE",
241 false,
242 "ASCII_CHAT_RENDER_FONT_SIZE",
243 validate_render_font_size,
244 NULL,
245 false,
246 false,
248 {.input_type = OPTION_INPUT_NUMERIC},
249 NULL},
250
#define RENDER_FILE_MODES
const char * g_render_theme_values[]
Definition metadata.c:145
const char * g_seek_examples[]
Definition metadata.c:189
const char * g_render_theme_descs[]
Definition metadata.c:147
bool parse_timestamp(const char *arg, void *dest, char **error_msg)
Custom parser for –seek flag.
Definition parsers.c:1010
bool parse_render_theme(const char *arg, void *dest, char **error_msg)
Parse render theme option for pixel rendering.
Definition parsers.c:346

◆ g_network_entries

const registry_entry_t g_network_entries[]
extern

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

21 {
22 // NETWORK GROUP - port and client management
23 {"port",
24 'p',
26 offsetof(options_t, port),
27 NULL, // Use mode_default_getter instead
28 sizeof(int),
29 "Port to host a server or discovery-service on, or port to connect to a server as a client (default: 27224 for "
30 "server/client, 27225 for discovery-service).",
31 "NETWORK",
32 NULL,
33 false,
34 "ASCII_CHAT_PORT",
35 NULL,
37 false,
38 false,
40 {.numeric_range = {1, 65535, 1}, .input_type = OPTION_INPUT_NUMERIC},
42 {"websocket-port",
43 '\0',
45 offsetof(options_t, websocket_port),
46 NULL, // Use mode_default_getter instead
47 sizeof(int),
48 "WebSocket server port (default: 27226 for server, 27227 for discovery-service, 443 when TLS cert+key provided).",
49 "NETWORK",
50 NULL,
51 false,
52 "ASCII_CHAT_WEBSOCKET_PORT",
53 NULL,
54 NULL,
55 false,
56 false,
58 {.numeric_range = {1, 65535, 1}, .input_type = OPTION_INPUT_NUMERIC},
60 {"websocket-tls-cert",
61 '\0',
63 offsetof(options_t, websocket_tls_cert),
64 NULL,
66 "WebSocket TLS certificate file path for WSS (secure WebSocket) support (server/discovery-service only).",
67 "NETWORK",
68 NULL,
69 false,
70 "ASCII_CHAT_WEBSOCKET_TLS_CERT",
71 NULL,
72 NULL,
73 false,
74 false,
76 {.input_type = OPTION_INPUT_STRING},
77 NULL},
78 {"websocket-tls-key",
79 '\0',
81 offsetof(options_t, websocket_tls_key),
82 NULL,
84 "WebSocket TLS private key file path for WSS (secure WebSocket) support (server/discovery-service only).",
85 "NETWORK",
86 NULL,
87 false,
88 "ASCII_CHAT_WEBSOCKET_TLS_KEY",
89 NULL,
90 NULL,
91 false,
92 false,
94 {.input_type = OPTION_INPUT_STRING},
95 NULL},
96 {"websocket-tls-key-password",
97 '\0',
99 offsetof(options_t, websocket_tls_key_password),
100 NULL,
102 "Password for password-protected WebSocket TLS private key (use ASCII_CHAT_WEBSOCKET_TLS_KEY_PASSWORD env var for "
103 "security).",
104 "NETWORK",
105 NULL,
106 false,
107 "ASCII_CHAT_WEBSOCKET_TLS_KEY_PASSWORD",
108 NULL,
109 NULL,
110 false,
111 false,
113 {.input_type = OPTION_INPUT_STRING},
114 NULL},
115 {"max-clients",
116 '\0',
118 offsetof(options_t, max_clients),
119 &default_max_clients_value,
120 sizeof(int),
121 "Maximum concurrent clients.",
122 "NETWORK",
123 NULL,
124 false,
125 "ASCII_CHAT_MAX_CLIENTS",
126 NULL,
127 NULL,
128 false,
129 false,
131 {.numeric_range = {1, 99, 1}, .examples = g_maxclients_examples, .input_type = OPTION_INPUT_NUMERIC},
132 NULL},
133 {"reconnect-attempts",
134 '\0',
136 offsetof(options_t, reconnect_attempts),
137 &default_reconnect_attempts_value,
138 sizeof(int),
139 "Number of reconnection attempts before giving up (-1=infinite, 0=none).",
140 "NETWORK",
141 NULL,
142 false,
143 "ASCII_CHAT_RECONNECT_ATTEMPTS",
144 NULL,
145 NULL,
146 false,
147 false,
149 {.numeric_range = {-1, 99, 1}, .examples = g_reconnect_examples, .input_type = OPTION_INPUT_NUMERIC},
150 NULL},
151 {"port-forwarding",
152 '\0',
154 offsetof(options_t, enable_upnp),
155 &default_enable_upnp_value,
156 sizeof(bool),
157 "Use UPnP/NAT-PMP port mapping to open a port in your router to ascii-chat (might fail with some routers).",
158 "NETWORK",
159 NULL,
160 false,
161 "ASCII_CHAT_PORT_FORWARDING",
162 NULL,
163 NULL,
164 false,
165 false,
167 {0},
168 NULL},
169 {"scan",
170 '\0',
172 offsetof(options_t, lan_discovery),
173 &default_lan_discovery_value,
174 sizeof(bool),
175 "Scan for servers on local network via mDNS.",
176 "NETWORK",
177 NULL,
178 false,
179 "ASCII_CHAT_SCAN",
180 NULL,
181 NULL,
182 false,
183 false,
185 {0},
186 NULL},
187
188 // NETWORK GROUP - compression options
189 {"compression-level",
190 '\0',
192 offsetof(options_t, compression_level),
193 &default_compression_level_value,
194 sizeof(int),
195 "zstd compression level (1-9).",
196 "NETWORK",
197 NULL,
198 false,
199 "ASCII_CHAT_COMPRESSION_LEVEL",
200 NULL,
201 NULL,
202 false,
203 false,
205 {.numeric_range = {1, 9, 1}, .examples = g_compression_examples, .input_type = OPTION_INPUT_NUMERIC},
206 NULL},
207 {"no-compress",
208 '\0',
210 offsetof(options_t, no_compress),
211 &default_no_compress_value,
212 sizeof(bool),
213 "Disable compression.",
214 "NETWORK",
215 NULL,
216 false,
217 "ASCII_CHAT_NO_COMPRESS",
218 NULL,
219 NULL,
220 false,
221 false,
223 {0},
224 NULL},
225
226 // NETWORK GROUP - discovery service options
227 {"discovery-service",
228 '\0',
230 offsetof(options_t, discovery_server),
232 0,
233 "Discovery service endpoint (IP address or hostname).",
234 "NETWORK",
235 NULL,
236 false,
237 "ASCII_CHAT_DISCOVERY_SERVER",
238 NULL,
239 NULL,
240 false,
241 false,
243 {0},
244 NULL},
245 {"discovery-service-port",
246 '\0',
248 offsetof(options_t, discovery_port),
249 &default_discovery_port_value,
250 sizeof(int),
251 "Discovery service port (1-65535).",
252 "NETWORK",
253 NULL,
254 false,
255 "ASCII_CHAT_DISCOVERY_SERVICE_PORT",
256 NULL,
257 NULL,
258 false,
259 false,
261 {0},
262 NULL},
263 {"discovery-service-url",
264 '\0',
266 offsetof(options_t, discovery_service_url),
267 NULL,
269 "Discovery service WebSocket URL (ws:// or wss://). Mutually exclusive with --discovery-service-port.",
270 "NETWORK",
271 NULL,
272 false,
273 "ASCII_CHAT_DISCOVERY_SERVICE_URL",
274 NULL,
275 NULL,
276 false,
277 false,
279 {0},
280 NULL},
281 {"discovery-expose-ip",
282 '\0',
284 offsetof(options_t, discovery_expose_ip),
285 &default_discovery_expose_ip_value,
286 sizeof(bool),
287 "Allow public IP disclosure in discovery sessions (requires confirmation).",
288 "NETWORK",
289 NULL,
290 false,
291 "ASCII_CHAT_DISCOVERY_EXPOSE_IP",
292 NULL,
293 NULL,
294 false,
295 false,
297 {0},
298 NULL},
299 {"discovery",
300 '\0',
302 offsetof(options_t, discovery),
303 &default_discovery_value,
304 sizeof(bool),
305 "Enable discovery session registration.",
306 "NETWORK",
307 NULL,
308 false,
309 "ASCII_CHAT_DISCOVERY",
310 NULL,
311 NULL,
312 false,
313 false,
315 {0},
316 NULL},
317
318 // NETWORK GROUP - WebRTC options
319 {"webrtc",
320 '\0',
322 offsetof(options_t, webrtc),
323 &default_webrtc_value,
324 sizeof(bool),
325 "Make calls using WebRTC p2p connections.",
326 "NETWORK",
327 NULL,
328 false,
329 "ASCII_CHAT_WEBRTC",
330 NULL,
331 NULL,
332 false,
333 false,
335 {0},
336 NULL},
337 {"no-webrtc",
338 '\0',
340 offsetof(options_t, no_webrtc),
341 &default_no_webrtc_value,
342 sizeof(bool),
343 "Disable WebRTC, use direct TCP only.",
344 "NETWORK",
345 NULL,
346 false,
347 "ASCII_CHAT_NO_WEBRTC",
348 NULL,
349 NULL,
350 false,
351 false,
353 {0},
354 NULL},
355 {"prefer-webrtc",
356 '\0',
358 offsetof(options_t, prefer_webrtc),
359 &default_prefer_webrtc_value,
360 sizeof(bool),
361 "Try WebRTC before direct TCP.",
362 "NETWORK",
363 NULL,
364 false,
365 "ASCII_CHAT_PREFER_WEBRTC",
366 NULL,
367 NULL,
368 false,
369 false,
371 {0},
372 NULL},
373 {"webrtc-relay-only",
374 '\0',
376 offsetof(options_t, webrtc_relay_only),
377 &default_webrtc_relay_only_value,
378 sizeof(bool),
379 "Require TURN relay for WebRTC connections (no direct connection or TCP fallback).",
380 "NETWORK",
381 NULL,
382 false,
383 "ASCII_CHAT_WEBRTC_RELAY_ONLY",
384 NULL,
385 NULL,
386 false,
387 false,
389 {0},
390 NULL},
391 {"webrtc-skip-stun",
392 '\0',
394 offsetof(options_t, webrtc_skip_stun),
395 &default_webrtc_skip_stun_value,
396 sizeof(bool),
397 "Skip WebRTC+STUN stage, go straight to TURN relay.",
398 "NETWORK",
399 NULL,
400 false,
401 "ASCII_CHAT_WEBRTC_SKIP_STUN",
402 NULL,
403 NULL,
404 false,
405 false,
407 {0},
408 NULL},
409 {"webrtc-disable-turn",
410 '\0',
412 offsetof(options_t, webrtc_disable_turn),
413 &default_webrtc_disable_turn_value,
414 sizeof(bool),
415 "Disable WebRTC+TURN relay, use STUN only.",
416 "NETWORK",
417 NULL,
418 false,
419 "ASCII_CHAT_WEBRTC_DISABLE_TURN",
420 NULL,
421 NULL,
422 false,
423 false,
425 {0},
426 NULL},
427 {"webrtc-skip-host",
428 '\0',
430 offsetof(options_t, webrtc_skip_host),
431 &default_webrtc_skip_host_value,
432 sizeof(bool),
433 "Skip host candidates, force STUN/TURN (for testing).",
434 "NETWORK",
435 NULL,
436 false,
437 "ASCII_CHAT_WEBRTC_SKIP_HOST",
438 NULL,
439 NULL,
440 false,
441 false,
443 {0},
444 NULL},
445 {"webrtc-ice-timeout",
446 '\0',
448 offsetof(options_t, webrtc_ice_timeout_ms),
449 &default_webrtc_ice_timeout_ms_value,
450 sizeof(int),
451 "ICE gathering timeout in milliseconds.",
452 "NETWORK",
453 NULL,
454 false,
455 "ASCII_CHAT_WEBRTC_ICE_TIMEOUT",
456 NULL,
457 NULL,
458 false,
459 false,
461 {0},
462 NULL},
463 {"webrtc-reconnect-attempts",
464 '\0',
466 offsetof(options_t, webrtc_reconnect_attempts),
467 &default_webrtc_reconnect_attempts_value,
468 sizeof(int),
469 "Number of WebRTC connection retry attempts.",
470 "NETWORK",
471 NULL,
472 false,
473 "ASCII_CHAT_WEBRTC_RECONNECT_ATTEMPTS",
474 NULL,
475 NULL,
476 false,
477 false,
479 {0},
480 NULL},
481 {"stun-servers",
482 '\0',
484 offsetof(options_t, stun_servers),
486 0,
487 "Comma-separated list of WebRTC+STUN server URLs.",
488 "NETWORK",
489 NULL,
490 false,
491 "ASCII_CHAT_STUN_SERVERS",
492 NULL,
493 NULL,
494 false,
495 false,
497 {0},
498 NULL},
499 {"turn-servers",
500 '\0',
502 offsetof(options_t, turn_servers),
504 0,
505 "Comma-separated list of WebRTC+TURN server URLs.",
506 "NETWORK",
507 NULL,
508 false,
509 "ASCII_CHAT_TURN_SERVERS",
510 NULL,
511 NULL,
512 false,
513 false,
515 {0},
516 NULL},
517 {"turn-username",
518 '\0',
520 offsetof(options_t, turn_username),
522 0,
523 "Username for WebRTC+TURN authentication.",
524 "NETWORK",
525 NULL,
526 false,
527 "ASCII_CHAT_TURN_USERNAME",
528 NULL,
529 NULL,
530 false,
531 false,
533 {0},
534 NULL},
535 {"turn-credential",
536 '\0',
538 offsetof(options_t, turn_credential),
540 0,
541 "Credential/password for WebRTC+TURN authentication.",
542 "NETWORK",
543 NULL,
544 false,
545 "ASCII_CHAT_TURN_CREDENTIAL",
546 NULL,
547 NULL,
548 false,
549 false,
551 {0},
552 NULL},
553 {"turn-secret",
554 '\0',
556 offsetof(options_t, turn_secret),
557 "",
558 0,
559 "Shared secret for dynamic WebRTC+TURN credential generation (HMAC-SHA1).",
560 "NETWORK",
561 NULL,
562 false,
563 "ASCII_CHAT_TURN_SECRET",
564 NULL,
565 NULL,
566 false,
567 false,
569 {0},
570 NULL},
571
#define OPT_ENDPOINT_DISCOVERY_SERVICE
Default discovery service endpoint (what to connect to by default)
#define OPT_TURN_SERVERS_DEFAULT
Default TURN server URLs (comma-separated)
#define OPT_STUN_SERVERS_DEFAULT
Default STUN server URLs (comma-separated)
#define OPTIONS_BUFF_SIZE
Buffer size for option string values.
#define OPT_TURN_CREDENTIAL_DEFAULT
Default TURN credential (empty = use ACDS credentials)
#define OPT_TURN_USERNAME_DEFAULT
Default TURN username (empty = use ACDS credentials)
const char * g_compression_examples[]
Definition metadata.c:180
const char * g_reconnect_examples[]
Definition metadata.c:185
const char * g_maxclients_examples[]
Definition metadata.c:184
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:512

◆ g_security_entries

const registry_entry_t g_security_entries[]
extern

Definition at line 18 of file security.c.

18 {
19 // SECURITY GROUP (client, server, discovery)
20 {"encrypt",
21 'E',
23 offsetof(options_t, encrypt_enabled),
24 &default_encrypt_enabled_value,
25 sizeof(bool),
26 "Enable end-to-end encryption (requires the other party to be encrypted as well).",
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 {0},
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 encryption (requires the other party to be unencrypted as well).",
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 {0},
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 {0},
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 21 of file options/registry/terminal.c.

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

◆ g_webcam_entries

const registry_entry_t g_webcam_entries[]
extern

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

19 {
20 // WEBCAM GROUP (client, mirror, discovery)
21 {"webcam-index",
22 'c',
24 offsetof(options_t, webcam_index),
25 &default_webcam_index_value,
26 sizeof(unsigned short int),
27 "Webcam device index to use for video input.",
28 "WEBCAM",
29 NULL,
30 false,
31 "ASCII_CHAT_WEBCAM_INDEX",
32 NULL,
33 NULL,
34 false,
35 false,
37 {.numeric_range = {0, 10, 1}, .examples = g_webcam_examples, .input_type = OPTION_INPUT_NUMERIC},
38 NULL},
39 {"test-pattern",
40 '\0',
42 offsetof(options_t, test_pattern),
43 &default_test_pattern_value,
44 sizeof(bool),
45 "Use test pattern instead of webcam.",
46 "WEBCAM",
47 NULL,
48 false,
49 "WEBCAM_DISABLED",
50 NULL,
51 NULL,
52 false,
53 false,
55 {0},
56 NULL},
57 {"list-webcams",
58 '\0',
60 0,
61 NULL,
62 0,
63 "List available webcam devices by index and exit.",
64 "WEBCAM",
65 NULL,
66 false,
67 NULL,
68 NULL,
69 NULL,
70 false,
71 false,
73 {0},
74 NULL},
75
const char * g_webcam_examples[]
Definition metadata.c:186