oldwinter / oldwinter/all-cli

体验:describe 缺参不说用 catalog 列出工具

Open Beginner friendly
#60 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1
Forks
0
Avg merge
7d 23h
Merged PRs (30d)
24

Description

体验问题:describe 缺参不说用 catalog 列出工具

Skip: catalog empty search (#56), schema missing args (#58), grok not in catalog (#59), and doctor vs diagnose (#54). This is all-cli describe.

Current design

all-cli describe <tool> uses cobra.ExactArgs(1). With no ID it prints cobra's generic:

Error: accepts 1 arg(s), received 0

Unknown IDs already go through unknownToolIDError (did you mean). Missing IDs do not name all-cli catalog, which is the discovery command.

Why this is a problem
  1. Operators who found describe in --help still do not know how to get a valid ID.
  2. catalog is the list; describe is the detail. The error path does not connect them.
  3. Schema's missing-arg message was fixed separately. Describe still uses ExactArgs.
Suggested change

Replace ExactArgs with a check that returns describe needs a tool ID. List tools: all-cli catalog. Keep unknown-ID suggestions. Do not change catalog matching or the grok registry in this pass.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the all-cli describe command's argument validation and run it without a tool ID to observe the current Cobra error. Done means the missing-ID path says describe needs a tool ID. List tools: all-cli catalog, while unknown-ID suggestions and catalog matching remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.