diff options
| author | Claude <claude@anthropic.com> | 2026-03-04 18:44:46 +0100 |
|---|---|---|
| committer | Claude <claude@anthropic.com> | 2026-03-04 18:44:46 +0100 |
| commit | f9cc162f1520d4d84dc37f9a244fae43235f1f5d (patch) | |
| tree | 0020615e7192961adcd843f067cc9cfa3d9c7b67 /src/claude/cli.py | |
| parent | 3eddbbe41ea3a912e695bf2589fc99d25381620d (diff) | |
| parent | 07c47fbdbb2cd845ac493926880f101eb79838dc (diff) | |
| download | claude-py-main.tar.gz claude-py-main.zip | |
Diffstat (limited to 'src/claude/cli.py')
| -rw-r--r-- | src/claude/cli.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/claude/cli.py b/src/claude/cli.py index d688939..47d3d0d 100644 --- a/src/claude/cli.py +++ b/src/claude/cli.py @@ -14,10 +14,16 @@ def parse_args() -> argparse.Namespace: p.add_argument("-s", "--system", default=None, help="System prompt") p.add_argument("--max-tokens", type=int, default=8192) p.add_argument("--no-stream", action="store_true", help="Disable streaming") + p.add_argument("--list-models", action="store_true", help="List available models and exit") return p.parse_args() async def run(args: argparse.Namespace) -> None: + if args.list_models: + for model_id, info in ChatClient.list_models().items(): + print(f" {model_id:<35} {info['display']}") + return + if args.prompt: prompt = " ".join(args.prompt) elif not sys.stdin.isatty(): |
