From 2209a9c1e8b5359bcb0d8ee29da995dc3903a090 Mon Sep 17 00:00:00 2001 From: Safi Date: Mon, 18 May 2026 14:54:04 +0100 Subject: [PATCH] =?UTF-8?q?treat=20graphify=20=20as=20graphify=20ext?= =?UTF-8?q?ract=20=20=E2=80=94=20fix=20unknown=20command=20for=20dir?= =?UTF-8?q?ect=20path=20invocation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- graphify/__main__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/graphify/__main__.py b/graphify/__main__.py index b56dfef6..fa112ee5 100644 --- a/graphify/__main__.py +++ b/graphify/__main__.py @@ -2882,6 +2882,13 @@ def main() -> None: f"est. cost (~{backend}): ${cost:.4f}" ) + elif Path(cmd).exists() or cmd in (".", "..") or cmd.startswith(("./", "../", "/", "~")): + # User ran `graphify ` directly — treat as `graphify extract `. + # Common when following the PowerShell note in README (`graphify .`) or + # copy-pasting skill invocations without the leading slash. + sys.argv.insert(2, sys.argv[1]) + sys.argv[1] = "extract" + main() else: print(f"error: unknown command '{cmd}'", file=sys.stderr) print("Run 'graphify --help' for usage.", file=sys.stderr)