Skip to content

Commit 4d6ea48

Browse files
refactor(cli): consolidate output commands into results + query
Reduce CLI surface from 7 overlapping commands to 2 focused ones: - `results` becomes a sub-app with subcommands: summary (default), timeline, segment <attr>, agent <id>. Absorbs `report run` functionality via agent mode JSON output. - `query` absorbs `export` (agents/edges/states with --to for JSONL), `inspect` (summary/network/network-status), and gains study folder auto-detection (no more --study-db flag). SQL argument is now positional. Delete: report.py, export.py, inspect.py, migrate.py (dead code). Closes #72 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6b98206 commit 4d6ea48

10 files changed

Lines changed: 845 additions & 906 deletions

File tree

docs/commands.md

Lines changed: 140 additions & 153 deletions
Large diffs are not rendered by default.

extropy/cli/app.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ def main_callback(
147147
_show_cost = show
148148
if _show_cost:
149149
atexit.register(_print_cost_footer)
150+
# Pre-warm pricing cache so cost display uses fresh prices
151+
try:
152+
from ..core.cost.pricing import _ensure_cache_loaded
153+
154+
_ensure_cache_loaded()
155+
except Exception:
156+
pass # Best-effort; falls through to hardcoded fallback
150157

151158

152159
# Import commands to register them with the app
@@ -161,10 +168,6 @@ def main_callback(
161168
estimate,
162169
results,
163170
config_cmd,
164-
inspect,
165171
query,
166-
report,
167-
export,
168172
chat,
169-
migrate,
170173
)

extropy/cli/commands/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,8 @@
1111
estimate,
1212
results,
1313
config_cmd,
14-
inspect,
1514
query,
16-
report,
17-
export,
1815
chat,
19-
migrate,
2016
)
2117

2218
__all__ = [
@@ -30,10 +26,6 @@
3026
"estimate",
3127
"results",
3228
"config_cmd",
33-
"inspect",
3429
"query",
35-
"report",
36-
"export",
3730
"chat",
38-
"migrate",
3931
]

extropy/cli/commands/export.py

Lines changed: 0 additions & 112 deletions
This file was deleted.

0 commit comments

Comments
 (0)