Commit af64dfe
Fix: Remove short flags from non-boolean typer.Option definitions
Fixes #48
## Problem
CAM failed to initialize with "TypeError: Secondary flag is not valid
for non-boolean flag" when running any command. The error occurred during
Typer/Click CLI initialization.
## Root Cause
Throughout the codebase, non-boolean typer.Option() definitions incorrectly
included short flags (e.g., -c, -s, -n, -o, -b, -f, -d, -a, -l, -m).
In Click/Typer, only boolean flags can have both a long form (--flag) and
short form (-f). Non-boolean options (strings, paths, integers, etc.) can
only use long-form flags.
## Changes
- Removed short flags from all non-boolean typer.Option definitions across
12 files in cli/ and mcp/ directories
- Fixed parameter name conflict in prompts_commands.py where 'default'
parameter conflicted with boolean flag syntax
- Boolean options (with True/False as first argument) retain their short flags
## Affected Files
- cli/agents_commands.py
- cli/app.py
- cli/options.py
- cli/plugins/plugin_discovery_commands.py
- cli/plugins/plugin_install_commands.py
- cli/plugins/plugin_management_commands.py
- cli/plugins/plugin_marketplace_commands.py
- cli/prompts_commands.py
- cli/skills_commands.py
- mcp/cli.py
- mcp/install_commands.py
- mcp/server_commands.py
## Testing
Verified that CLI initializes successfully and no TypeError is raised:
```python
from code_assistant_manager.cli import app
from typer.main import get_command
cmd = get_command(app) # No error
```
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 51b49e9 commit af64dfe
12 files changed
Lines changed: 99 additions & 195 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 30 | + | |
34 | 31 | | |
35 | 32 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
39 | 36 | | |
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 40 | + | |
47 | 41 | | |
48 | 42 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 43 | + | |
53 | 44 | | |
54 | 45 | | |
55 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1113 | 1113 | | |
1114 | 1114 | | |
1115 | 1115 | | |
1116 | | - | |
| 1116 | + | |
1117 | 1117 | | |
1118 | 1118 | | |
1119 | 1119 | | |
| |||
1217 | 1217 | | |
1218 | 1218 | | |
1219 | 1219 | | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
| 1220 | + | |
1224 | 1221 | | |
1225 | 1222 | | |
1226 | 1223 | | |
| |||
1255 | 1252 | | |
1256 | 1253 | | |
1257 | 1254 | | |
1258 | | - | |
| 1255 | + | |
1259 | 1256 | | |
1260 | 1257 | | |
1261 | 1258 | | |
| |||
1388 | 1385 | | |
1389 | 1386 | | |
1390 | 1387 | | |
1391 | | - | |
| 1388 | + | |
1392 | 1389 | | |
1393 | 1390 | | |
1394 | 1391 | | |
| |||
1452 | 1449 | | |
1453 | 1450 | | |
1454 | 1451 | | |
1455 | | - | |
| 1452 | + | |
1456 | 1453 | | |
1457 | 1454 | | |
1458 | 1455 | | |
| |||
1517 | 1514 | | |
1518 | 1515 | | |
1519 | 1516 | | |
1520 | | - | |
| 1517 | + | |
1521 | 1518 | | |
1522 | 1519 | | |
1523 | 1520 | | |
| |||
1538 | 1535 | | |
1539 | 1536 | | |
1540 | 1537 | | |
1541 | | - | |
| 1538 | + | |
1542 | 1539 | | |
1543 | 1540 | | |
1544 | 1541 | | |
| |||
1556 | 1553 | | |
1557 | 1554 | | |
1558 | 1555 | | |
1559 | | - | |
| 1556 | + | |
1560 | 1557 | | |
1561 | 1558 | | |
1562 | 1559 | | |
| |||
1578 | 1575 | | |
1579 | 1576 | | |
1580 | 1577 | | |
1581 | | - | |
| 1578 | + | |
1582 | 1579 | | |
1583 | 1580 | | |
1584 | 1581 | | |
| |||
1603 | 1600 | | |
1604 | 1601 | | |
1605 | 1602 | | |
1606 | | - | |
| 1603 | + | |
1607 | 1604 | | |
1608 | 1605 | | |
1609 | 1606 | | |
| |||
1636 | 1633 | | |
1637 | 1634 | | |
1638 | 1635 | | |
1639 | | - | |
| 1636 | + | |
1640 | 1637 | | |
1641 | 1638 | | |
1642 | 1639 | | |
| |||
1652 | 1649 | | |
1653 | 1650 | | |
1654 | 1651 | | |
1655 | | - | |
| 1652 | + | |
1656 | 1653 | | |
1657 | 1654 | | |
1658 | 1655 | | |
| |||
1859 | 1856 | | |
1860 | 1857 | | |
1861 | 1858 | | |
1862 | | - | |
| 1859 | + | |
1863 | 1860 | | |
1864 | 1861 | | |
1865 | | - | |
| 1862 | + | |
1866 | 1863 | | |
1867 | 1864 | | |
1868 | 1865 | | |
| |||
1951 | 1948 | | |
1952 | 1949 | | |
1953 | 1950 | | |
1954 | | - | |
| 1951 | + | |
1955 | 1952 | | |
1956 | 1953 | | |
1957 | | - | |
| 1954 | + | |
1958 | 1955 | | |
1959 | 1956 | | |
1960 | 1957 | | |
| |||
2070 | 2067 | | |
2071 | 2068 | | |
2072 | 2069 | | |
2073 | | - | |
| 2070 | + | |
2074 | 2071 | | |
2075 | 2072 | | |
2076 | | - | |
| 2073 | + | |
2077 | 2074 | | |
2078 | 2075 | | |
2079 | 2076 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 23 | + | |
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
| |||
Lines changed: 3 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 172 | + | |
176 | 173 | | |
177 | 174 | | |
178 | 175 | | |
| |||
292 | 289 | | |
293 | 290 | | |
294 | 291 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
| 292 | + | |
299 | 293 | | |
300 | 294 | | |
301 | 295 | | |
| |||
481 | 475 | | |
482 | 476 | | |
483 | 477 | | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
| 478 | + | |
488 | 479 | | |
489 | 480 | | |
490 | 481 | | |
| |||
Lines changed: 6 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
| 376 | + | |
380 | 377 | | |
381 | 378 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
| 379 | + | |
386 | 380 | | |
387 | 381 | | |
388 | 382 | | |
| |||
490 | 484 | | |
491 | 485 | | |
492 | 486 | | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
| 487 | + | |
497 | 488 | | |
498 | 489 | | |
499 | 490 | | |
| |||
615 | 606 | | |
616 | 607 | | |
617 | 608 | | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
| 609 | + | |
622 | 610 | | |
623 | 611 | | |
624 | 612 | | |
| |||
657 | 645 | | |
658 | 646 | | |
659 | 647 | | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
| 648 | + | |
664 | 649 | | |
665 | 650 | | |
666 | 651 | | |
| |||
699 | 684 | | |
700 | 685 | | |
701 | 686 | | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
| 687 | + | |
706 | 688 | | |
707 | 689 | | |
708 | 690 | | |
| |||
Lines changed: 9 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 38 | + | |
42 | 39 | | |
43 | 40 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 41 | + | |
48 | 42 | | |
49 | 43 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 44 | + | |
54 | 45 | | |
55 | 46 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 47 | + | |
60 | 48 | | |
61 | 49 | | |
62 | 50 | | |
| |||
428 | 416 | | |
429 | 417 | | |
430 | 418 | | |
431 | | - | |
432 | | - | |
433 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
434 | 422 | | |
435 | | - | |
| 423 | + | |
436 | 424 | | |
437 | 425 | | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
| 426 | + | |
442 | 427 | | |
443 | 428 | | |
444 | 429 | | |
| |||
0 commit comments