Commit 0dcdfea
authored
feat: add CLI support with --testing, --verbose, and --port flags (#207)
* feat: add CLI support with --testing, --verbose, and --port flags
Add command-line argument parsing via clap to match aw-qt's CLI interface.
Flags:
- --testing: Run in testing mode (port 5666, separate database)
- --verbose/-v: Enable debug logging (sets AW_DEBUG)
- --port: Override the port number
The testing flag flows through to aw-server's config and database path,
using the same infrastructure that was already in place but hardcoded
to false.
Port resolution priority: CLI flag > testing default (5666) > config file.
Closes #127
* fix: clarify port priority comment to include testing default1 parent 1ed8f1f commit 0dcdfea
4 files changed
Lines changed: 67 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
21 | 40 | | |
22 | 41 | | |
23 | 42 | | |
| |||
402 | 421 | | |
403 | 422 | | |
404 | 423 | | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
405 | 431 | | |
406 | 432 | | |
407 | 433 | | |
| |||
460 | 486 | | |
461 | 487 | | |
462 | 488 | | |
463 | | - | |
| 489 | + | |
464 | 490 | | |
465 | 491 | | |
466 | 492 | | |
467 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
468 | 499 | | |
469 | 500 | | |
470 | 501 | | |
| |||
494 | 525 | | |
495 | 526 | | |
496 | 527 | | |
497 | | - | |
498 | | - | |
| 528 | + | |
499 | 529 | | |
500 | | - | |
| 530 | + | |
501 | 531 | | |
502 | 532 | | |
503 | 533 | | |
504 | | - | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
505 | 538 | | |
506 | 539 | | |
507 | | - | |
| 540 | + | |
508 | 541 | | |
509 | 542 | | |
510 | 543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
4 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
5 | 30 | | |
6 | 31 | | |
0 commit comments