ccmd 2.0.8__tar.gz → 2.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ccmd-2.0.8/ccmd.egg-info → ccmd-2.0.9}/PKG-INFO +1 -1
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/__init__.py +1 -1
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/cli.py +99 -22
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/shell_cmds.py +11 -6
- {ccmd-2.0.8 → ccmd-2.0.9/ccmd.egg-info}/PKG-INFO +1 -1
- {ccmd-2.0.8 → ccmd-2.0.9}/pyproject.toml +1 -1
- {ccmd-2.0.8 → ccmd-2.0.9}/LICENSE +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/MANIFEST.in +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/README.md +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/__main__.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/config/__init__.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/config/paths.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/config/schema.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/__init__.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/agents/__init__.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/agents/aider.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/agents/base.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/agents/chatgpt.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/agents/claude.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/agents/codex.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/agents/cursor.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/agents/goose.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/agents/grok.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/fs.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/launcher.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/migrate.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/profiles.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/projects.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/scan.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/sessions.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/core/ssh.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/mcp/__init__.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/mcp/server.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/__init__.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/app.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/ascii.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/screens/__init__.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/screens/agents.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/screens/aliases.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/screens/browser.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/screens/hub.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/screens/project_edit.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/screens/sessions.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/screens/ssh.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/theme.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/widgets/__init__.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd/tui/widgets/spinner.py +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd.egg-info/SOURCES.txt +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd.egg-info/dependency_links.txt +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd.egg-info/entry_points.txt +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd.egg-info/requires.txt +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/ccmd.egg-info/top_level.txt +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/commands.yaml +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/requirements.txt +0 -0
- {ccmd-2.0.8 → ccmd-2.0.9}/setup.cfg +0 -0
|
@@ -20,30 +20,105 @@ from ccmd.core.sessions import SessionStore
|
|
|
20
20
|
from ccmd.core.ssh import SSHStore
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
# agent accent colors for -v lines
|
|
24
|
+
_AGENT_COLORS = {
|
|
25
|
+
"claude": "dark_orange3",
|
|
26
|
+
"grok": "bright_white",
|
|
27
|
+
"codex": "green",
|
|
28
|
+
"cursor": "medium_purple",
|
|
29
|
+
"goose": "yellow",
|
|
30
|
+
"aider": "cyan",
|
|
31
|
+
"chatgpt": "sea_green3",
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
23
35
|
def _print_cmd_rows(rows: list, *, verbose: bool = False) -> None:
|
|
36
|
+
"""Pretty list: base command only. Agent variants only with -v or single match."""
|
|
37
|
+
try:
|
|
38
|
+
from rich.console import Console
|
|
39
|
+
from rich.table import Table
|
|
40
|
+
from rich.text import Text
|
|
41
|
+
|
|
42
|
+
console = Console(highlight=False)
|
|
43
|
+
use_rich = console.is_terminal
|
|
44
|
+
except Exception:
|
|
45
|
+
use_rich = False
|
|
46
|
+
|
|
24
47
|
if not rows:
|
|
25
|
-
|
|
48
|
+
if use_rich:
|
|
49
|
+
Console().print("[dim]no matching commands[/]")
|
|
50
|
+
else:
|
|
51
|
+
print("no matching commands")
|
|
52
|
+
return
|
|
53
|
+
|
|
54
|
+
show_variants = verbose or len(rows) == 1
|
|
55
|
+
|
|
56
|
+
if use_rich:
|
|
57
|
+
console = Console(highlight=False)
|
|
58
|
+
table = Table(
|
|
59
|
+
show_header=True,
|
|
60
|
+
header_style="bold cyan",
|
|
61
|
+
border_style="bright_black",
|
|
62
|
+
box=None,
|
|
63
|
+
pad_edge=False,
|
|
64
|
+
expand=False,
|
|
65
|
+
)
|
|
66
|
+
table.add_column("cmd", style="bold bright_cyan", no_wrap=True)
|
|
67
|
+
table.add_column("project", style="white")
|
|
68
|
+
table.add_column("agent", style="magenta")
|
|
69
|
+
table.add_column("path", style="dim", overflow="ellipsis", max_width=48)
|
|
70
|
+
|
|
71
|
+
for r in rows:
|
|
72
|
+
table.add_row(
|
|
73
|
+
r["short"],
|
|
74
|
+
r["project"],
|
|
75
|
+
r["default_agent"],
|
|
76
|
+
r["path"],
|
|
77
|
+
)
|
|
78
|
+
console.print(table)
|
|
79
|
+
|
|
80
|
+
if show_variants:
|
|
81
|
+
console.print()
|
|
82
|
+
for r in rows:
|
|
83
|
+
s = r["short"]
|
|
84
|
+
console.print(
|
|
85
|
+
f" [bold bright_cyan]{s}[/] "
|
|
86
|
+
f"[dim]→[/] [white]{r['project']}[/] "
|
|
87
|
+
f"[dim]({r['default_agent']})[/]"
|
|
88
|
+
)
|
|
89
|
+
parts = []
|
|
90
|
+
for aid, fn in r["variants"].items():
|
|
91
|
+
color = _AGENT_COLORS.get(aid, "white")
|
|
92
|
+
parts.append(f"[{color}]{fn}[/{color}]")
|
|
93
|
+
console.print(" " + " ".join(parts))
|
|
94
|
+
console.print(f" [dim]{r['path']}[/]")
|
|
95
|
+
|
|
96
|
+
console.print()
|
|
97
|
+
console.print(
|
|
98
|
+
f"[dim]{len(rows)} command(s)[/] "
|
|
99
|
+
f"[dim]·[/] [bright_cyan]ccmds <name>[/][dim] for agent variants[/] "
|
|
100
|
+
f"[dim]·[/] [bright_cyan]ccmds -v[/][dim] show all variants[/]"
|
|
101
|
+
)
|
|
26
102
|
return
|
|
103
|
+
|
|
104
|
+
# plain fallback
|
|
105
|
+
print(f"{'CMD':<10} {'PROJECT':<22} {'AGENT':<10} PATH")
|
|
106
|
+
print("-" * 72)
|
|
27
107
|
for r in rows:
|
|
28
|
-
v = r["variants"]
|
|
29
108
|
print(
|
|
30
|
-
f"{r['short']:<10} {r['project']:<
|
|
31
|
-
f"
|
|
32
|
-
f"{v.get('claude',''):<10} {v.get('grok',''):<10} "
|
|
33
|
-
f"{v.get('codex',''):<10} {v.get('cursor',''):<10}"
|
|
109
|
+
f"{r['short']:<10} {r['project']:<22} "
|
|
110
|
+
f"{r['default_agent']:<10} {r['path']}"
|
|
34
111
|
)
|
|
35
|
-
if
|
|
36
|
-
print(f"{'':10} path {r['path']}")
|
|
112
|
+
if show_variants:
|
|
37
113
|
print(
|
|
38
|
-
|
|
39
|
-
+ " ".join(f"{
|
|
114
|
+
" agents: "
|
|
115
|
+
+ " ".join(f"{fn}" for fn in r["variants"].values())
|
|
40
116
|
)
|
|
41
|
-
print(f"\n{len(rows)}
|
|
117
|
+
print(f"\n{len(rows)} command(s) · ccmds <name> for agent variants · ccmds -v")
|
|
42
118
|
|
|
43
119
|
|
|
44
120
|
def _cmd_shell(args: argparse.Namespace) -> int:
|
|
45
121
|
from ccmd.core.shell_cmds import (
|
|
46
|
-
format_cmds_block,
|
|
47
122
|
install_shell_hook,
|
|
48
123
|
list_cmd_rows,
|
|
49
124
|
shell_cmds_path,
|
|
@@ -61,7 +136,8 @@ def _cmd_shell(args: argparse.Namespace) -> int:
|
|
|
61
136
|
for rc in rcs:
|
|
62
137
|
print(f"hooked {rc}")
|
|
63
138
|
print("restart shell or: source ~/.ccmd/shell_cmds.sh")
|
|
64
|
-
print("then: ccmds # list
|
|
139
|
+
print("then: ccmds # list base commands (color)")
|
|
140
|
+
print(" ccmds ana # agent variants for one project")
|
|
65
141
|
print(" ana / anac / anag …")
|
|
66
142
|
if verbose:
|
|
67
143
|
_print_cmd_rows(list_cmd_rows(), verbose=False)
|
|
@@ -74,27 +150,28 @@ def _cmd_shell(args: argparse.Namespace) -> int:
|
|
|
74
150
|
return 0
|
|
75
151
|
if sub == "list":
|
|
76
152
|
rows = list_cmd_rows(filter_text=filt)
|
|
77
|
-
|
|
78
|
-
|
|
153
|
+
# filter alone does NOT dump variants unless -v (cleaner list)
|
|
154
|
+
_print_cmd_rows(rows, verbose=verbose)
|
|
79
155
|
return 0
|
|
80
|
-
if sub == "show"
|
|
156
|
+
if sub == "show":
|
|
81
157
|
rows = list_cmd_rows(filter_text=filt)
|
|
82
158
|
_print_cmd_rows(rows, verbose=True)
|
|
83
159
|
return 0
|
|
84
160
|
print("usage: ccmd shell install|regen|list [--filter NAME] [-v]", file=sys.stderr)
|
|
85
|
-
print(" ccmds #
|
|
161
|
+
print(" ccmds # list base cmds", file=sys.stderr)
|
|
162
|
+
print(" ccmds ana # one project + agent variants", file=sys.stderr)
|
|
86
163
|
return 1
|
|
87
164
|
|
|
88
165
|
|
|
89
166
|
def _cmd_cmds(args: argparse.Namespace) -> int:
|
|
90
|
-
"""Top-level: ccmd cmds [
|
|
91
|
-
from ccmd.core.shell_cmds import list_cmd_rows
|
|
167
|
+
"""Top-level: ccmd cmds [name] [-v] — same as ccmds."""
|
|
168
|
+
from ccmd.core.shell_cmds import list_cmd_rows
|
|
92
169
|
|
|
93
170
|
filt = args.filter or args.name
|
|
171
|
+
# single-name lookup → show agent variants; bare list → base only
|
|
172
|
+
verbose = bool(args.verbose) or bool(filt)
|
|
94
173
|
rows = list_cmd_rows(filter_text=filt)
|
|
95
|
-
_print_cmd_rows(rows, verbose=
|
|
96
|
-
print(f"file: {shell_cmds_path()}")
|
|
97
|
-
print("tip: ccmds (shell function) after source ~/.ccmd/shell_cmds.sh")
|
|
174
|
+
_print_cmd_rows(rows, verbose=verbose)
|
|
98
175
|
return 0
|
|
99
176
|
|
|
100
177
|
|
|
@@ -243,23 +243,28 @@ def render_shell_cmds(projects: list, shorts: dict[str, str]) -> str:
|
|
|
243
243
|
)
|
|
244
244
|
lines.append("")
|
|
245
245
|
|
|
246
|
-
# helper: list
|
|
246
|
+
# helper: list base commands (color); pass a name for agent variants
|
|
247
247
|
lines.extend(
|
|
248
248
|
[
|
|
249
|
-
"# list
|
|
249
|
+
"# list short commands — base only; pass a name for agent variants",
|
|
250
250
|
"ccmds() {",
|
|
251
251
|
' if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then',
|
|
252
|
-
' echo "ccmds list
|
|
253
|
-
' echo "ccmds
|
|
252
|
+
' echo "ccmds list base commands (colored)"',
|
|
253
|
+
' echo "ccmds -v list base + all agent variants"',
|
|
254
|
+
' echo "ccmds <name> one project + agents (e.g. ccmds ana)"',
|
|
254
255
|
' echo "ccmds -l|--list same as bare ccmds"',
|
|
255
|
-
' echo "ccmd shell list full CLI list"',
|
|
256
256
|
" return 0",
|
|
257
257
|
" fi",
|
|
258
|
+
' if [ "$1" = "-v" ] || [ "$1" = "--verbose" ]; then',
|
|
259
|
+
' command ccmd shell list -v',
|
|
260
|
+
" return $?",
|
|
261
|
+
" fi",
|
|
258
262
|
' if [ -z "$1" ] || [ "$1" = "-l" ] || [ "$1" = "--list" ]; then',
|
|
259
263
|
' command ccmd shell list',
|
|
260
264
|
" return $?",
|
|
261
265
|
" fi",
|
|
262
|
-
'
|
|
266
|
+
' # one project → show agent subcommands',
|
|
267
|
+
' command ccmd shell show --filter "$1"',
|
|
263
268
|
"}",
|
|
264
269
|
"",
|
|
265
270
|
"# end ccmd shell cmds",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|