Skip to content

Improve discoverability and self-documentation of @tool #40

@PerishCode

Description

@PerishCode

Problem

runseal @tool --help exposes a long flat list of built-in tools, but it is still hard to understand what is actually available and how each tool is meant to be used at low cost.

As a first-time reader, I can see names like:

  • json get
  • fs list
  • ssh script run
  • cloudflare zone dns-record update

There is some partial discoverability today: if you try certain intermediate paths such as runseal @tool json get --help or runseal @tool ssh script --help, the command returns a usage: line.

That helps a bit, but it is still not the same as having a formal, progressive help surface.

I still do not know, at low cost:

  • which paths support only fallback usage: output vs real structured help
  • what the exact argv contract is beyond the one-line summary
  • what input/output shape to expect for JSON-oriented commands
  • which commands are intended for end users vs wrapper authors
  • how to discover a namespace progressively instead of reading one large flat list

The current top-level help says:

@tool is the runseal atomic tool runtime.

That is directionally useful, but still too abstract when trying to actually learn the built-in tool surface.

Why this matters

@tool looks like an important low-level building block for wrapper authors, but the current discovery path is relatively expensive:

  1. run runseal @tool --help
  2. read a flat command inventory
  3. probe subpaths and infer behavior from usage: errors
  4. potentially go to source code to understand details

That makes the built-in tool surface harder to adopt than it needs to be.

Repro context

  • runseal v0.6.0-beta.1
  • observed on macOS
  • started from runseal --help, then runseal @tool --help
  • additional probes:
    • runseal @tool json --help -> unknown tool command: json --help
    • runseal @tool fs --help -> unknown tool command: fs --help
    • runseal @tool json get --help -> usage: runseal @tool json get <json> <path>
    • runseal @tool ssh script --help -> usage: runseal @tool ssh script run|capture --config <path> --host <host> --file <path> -- <args...>
    • runseal @tool cloudflare zone dns-record --help -> usage: runseal @tool cloudflare zone dns-record list|create|update ...

Suggested improvements

Any subset of these would help a lot:

  1. Add hierarchical help:
    • runseal @tool <namespace> --help
    • runseal @tool <namespace> <command> --help
  2. Keep the current compact usage: behavior if desired, but pair it with a richer help mode.
  3. Add short examples for each command in help output.
  4. Distinguish clearly between:
    • wrapper-author primitives
    • user-facing operational helpers
  5. Add one machine-readable listing mode, for example:
    • runseal @tool --json
    • or runseal @tool @list
  6. Add a docs page dedicated to @tool, with namespace-by-namespace examples.

Expected outcome

A user should be able to discover the built-in tool surface incrementally and answer “what can this command do, what arguments does it expect, and what does it print?” without needing to inspect the implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions