Skip to content

Accept global options in any position #200

@mepuka

Description

@mepuka

Problem

Global options like --compact and --full must appear before the subcommand:

# Fails
skygent query arsenal-feed --limit 3 --compact

# Works
skygent --compact query arsenal-feed --limit 3

Error: "--compact" is a global option and must appear before the subcommand"

Why this matters for agents

Every LLM agent will naturally place options after the command they apply to. The global-before-subcommand rule is unusual compared to most CLIs (e.g. git, docker, kubectl all accept flags in any position). This is the highest-friction issue for agentic use — agents hit this on their first attempt and must self-correct.

Proposed fix

Accept global options in any position by parsing them out before subcommand dispatch, or auto-relocate them when detected after the subcommand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-uxAgent/AI consumer experience improvementscliCLI interfaceuxUser experience

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions