Skip to content

bug(cli): support conventional command-level --help #200

Closed

Description

@KalebCole

Problem

partiful events create --help fails as an invalid invocation:

FLAG_UNKNOWN
The command contains an unknown flag.

The CLI has no conventional command-level help path. Users have to know that partiful schema events.create is the intended discovery mechanism, but the error does not direct them there.

This is especially painful on a mutation command with a two-step plan/apply protocol. A user trying to understand --plan or --apply cannot ask the command itself for help.

Reproduction

With v3.0.0:

partiful events create --help

Actual result: FLAG_UNKNOWN and a nonzero exit.

Expected result: usage, flags, examples, and an explanation of the plan/apply workflow.

The same expectation should apply to every command and command group:

partiful --help
partiful events --help
partiful events create --help
partiful help events create

Source-level cause

The CLI uses a custom command parser. --help is not registered as a global flag or command flag, so it reaches the normal unknown-flag branch. Schema introspection exists, but it is not exposed through the standard help convention.

Proposed behavior

  • Support -h and --help at the root, command-group, and leaf-command levels.
  • Support partiful help [command path] as an equivalent form.
  • Generate leaf help from the same command definitions or schemas used by partiful schema so the two surfaces cannot drift.
  • Include purpose, syntax, flags, required fields, examples, exit behavior, and mutation safety semantics.
  • Help must not require authentication or network access.
  • Help requests should exit 0.
  • If full help cannot be implemented immediately, intercept -h and --help and direct users to the exact schema command instead of returning FLAG_UNKNOWN.

Acceptance criteria

  • partiful events create --help exits 0.
  • Output documents --plan, --apply, and whether the original payload must be repeated.
  • Root, group, and leaf help all work.
  • Tests cover -h, --help, and help <command>.
  • Unknown flags still return FLAG_UNKNOWN.

Related but not duplicate: #113 concerns incomplete schema coverage. This issue concerns the missing conventional help interface, including commands that already have schemas.

  • hermes 🤖

Activity

  1. added
    bug
    documentation
    on Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions