Let fluksio status read a local installation

`runs --local` already exists for the reason status needs it: the flows and the
history are in this directory, and looking at them should not need a server.
Watching still does — an in-process engine is the command itself, so nothing
could change under it — and says so rather than sitting on a still frame.

Found setting up a sandbox that drives the SDK entirely through --local.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019V5bsYGNxcgPs4xXmTPx69
This commit is contained in:
2026-08-25 08:21:27 +02:00
co-authored by Claude Opus 5
parent 4941c2787c
commit 7c5b212f43
2 changed files with 11 additions and 1 deletions
+7 -1
View File
@@ -612,6 +612,10 @@ def cmd_status(args: argparse.Namespace) -> int:
return 0
if not sys.stdout.isatty():
return _fail("--watch needs a terminal; without one, drop it")
if getattr(args, "local", False):
# An in-process engine is this command and nothing else, so
# nothing can change under it while it watches.
return _fail("--watch wants an engine that outlives it; drop --local")
with Live(_status_screen(client), console=console) as live:
while True:
time.sleep(WATCH_INTERVAL_S)
@@ -788,7 +792,9 @@ def add_parsers(subparsers: Any) -> None:
action="store_true",
help="keep it on screen, refreshed until Ctrl-C",
)
with_engine(parser)
# `--local` for the same reason `runs` has it: the flows and the history are
# in this directory, and reading them should not need a server.
with_engine(parser, local=True)
parser.set_defaults(func=cmd_status)
parser = subparsers.add_parser("runs", help="the runs an engine has recorded")