Skip to content

feat: refine docs#531

Merged
joe0BAB merged 2 commits into
mainfrom
feat/docs
May 27, 2026
Merged

feat: refine docs#531
joe0BAB merged 2 commits into
mainfrom
feat/docs

Conversation

@joe0BAB
Copy link
Copy Markdown
Collaborator

@joe0BAB joe0BAB commented May 27, 2026

Summary

  • Extract Cobra command examples from plugins/pass/command.go, commands/set.go, commands/run.go, and commands/rm.go into sibling .md files and load them via //go:embed.
  • Wrap example shell snippets in fenced console code blocks so they render nicely in generated docs.
  • Use inline backticks for flag and value references (--force, --all, --env-file, se://, se://<ID|pattern>, NAME=VALUE) in command Long descriptions.

No behavior change — help output and examples are unchanged in content, only relocated and lightly reformatted.

joe0BAB added 2 commits May 27, 2026 15:07
Move the set, run, and rm command examples into sibling .md files and
embed them via //go:embed, mirroring the root command. Wrap example
shell snippets in fenced console blocks and use inline backticks for
flag and value references in Long descriptions.
@joe0BAB joe0BAB marked this pull request as ready for review May 27, 2026 13:17
@joe0BAB joe0BAB merged commit 4fd121d into main May 27, 2026
19 checks passed
@joe0BAB joe0BAB deleted the feat/docs branch May 27, 2026 13:22
Copy link
Copy Markdown

@docker-agent docker-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟡 NEEDS ATTENTION

This PR cleanly extracts Cobra CLI examples into embedded .md files — a nice refactor. Two issues were found in the newly-added lines:

  1. Inconsistent shell prompt prefix in examples.md — one console block is missing the leading $.
  2. Misleading se://<ID|pattern> in run.go Long description — wildcards are explicitly rejected at runtime by secrets.ParseID.

Comment thread plugins/pass/examples.md
Create a secret from STDIN:

```console
echo "my_val" | docker pass set GH_TOKEN
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] Inconsistent shell prompt prefix in console block

Every other console fenced block in examples.md uses a $ prompt prefix (lines 6, 19, 24–25, 30, 38–39), but the "Create a secret from STDIN" block on line 12 does not:

echo "my_val" | docker pass set GH_TOKEN

This makes the line look like output rather than a command to type, which will confuse users reading docker pass --help. It should be:

$ echo "my_val" | docker pass set GH_TOKEN

started and exits non-zero.`,
Short: "Run a command with `se://` environment references resolved.",
Long: "Scans the current environment (plus any `--env-file` inputs) for variables\n" +
"whose value is exactly `se://<ID|pattern>`. Each reference is resolved through the\n" +
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] se://<ID|pattern> in Long description misrepresents supported syntax

The updated Long description says:

"whose value is exactly se://<ID|pattern>"

This implies glob/wildcard patterns (e.g. se://myapp/*) are accepted. However, the underlying resolveRef function calls secrets.ParseID(name) first, which validates only [A-Za-z0-9._:-/] — the * wildcard character is explicitly excluded. Any se:// reference containing a wildcard is rejected before pattern resolution is attempted.

The original description said se://NAME, which accurately reflected the supported syntax. Consider reverting to se://<NAME> or se://<ID> to avoid misleading users who will get a cryptic error when they try se://myapp/*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants