CLI: open --host mN and agent --host mN go to the global --host (another daemon) #61

Closed
opened 2026-10-02 12:10:04 +00:00 by jhgaylor · 1 comment
Owner

Found during #55 (M27).

illogical open --host m2 :3000 and illogical agent --host m3 … don't reach the subcommand's host (a machine): clap gives --host to the global flag (--host NAME: talk to another daemon), so the CLI tries to look up a host named m2 in the host list:

$ illogical --socket /nonexistent open --host m1 :5173
illogical: looking up --host in the local daemon's host list: …

docs/cli.md documents illogical open --host m2 :3000, so the documented form doesn't work. M27's illogical edit uses --machine mN for this reason. Fix: rename the subcommands' flag (--machine, keeping a hidden alias isn't possible while the global one exists), or have the global --host not be global for these subcommands.

Found during #55 (M27). `illogical open --host m2 :3000` and `illogical agent --host m3 …` don't reach the subcommand's `host` (a machine): clap gives `--host` to the global flag (`--host NAME`: talk to another daemon), so the CLI tries to look up a host named `m2` in the host list: ``` $ illogical --socket /nonexistent open --host m1 :5173 illogical: looking up --host in the local daemon's host list: … ``` docs/cli.md documents `illogical open --host m2 :3000`, so the documented form doesn't work. M27's `illogical edit` uses `--machine mN` for this reason. Fix: rename the subcommands' flag (`--machine`, keeping a hidden alias isn't possible while the global one exists), or have the global `--host` not be global for these subcommands.
Author
Owner

Fixed in af36338 (released in 0.6.0): open and agent take --machine mN like edit and the MCP tools. --host is always another daemon; a failed host lookup on open/edit/agent --host mN says to use --machine. docs/cli.md updated, with a parse unit test.

Fixed in af36338 (released in 0.6.0): `open` and `agent` take `--machine mN` like `edit` and the MCP tools. `--host` is always another daemon; a failed host lookup on `open/edit/agent --host mN` says to use `--machine`. docs/cli.md updated, with a parse unit test.
jhgaylor referenced this issue from a commit 2026-10-02 17:01:03 +00:00
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jhgaylor/illogical#61
No description provided.