Skip to content

docs(cli): document directory input and the oasf type in import help - #2032

Merged
ramizpolic merged 1 commit into
agntcy:mainfrom
AmrendraTheCoder:docs/import-help-directory
Oct 19, 2026
Merged

ramizpolic merged 1 commit into
agntcy:mainfrom
AmrendraTheCoder:docs/import-help-directory

Conversation

@AmrendraTheCoder

Copy link
Copy Markdown
Contributor

Summary

Two gaps in dirctl import --help, both about things the CLI can do but does not tell you about.

Directory input. agntcy/dir-importer#87 added directory support for the mcp, a2a and oasf import types, so --file-path can now point at a folder of *.json files instead of a single file. The help still describes it as a JSON file only.

The oasf type. This one predates that work. --type binds to a plain string which is handed straight to config.ImportType with no allowlist in the CLI:

// cli/cmd/import/config.go:162
if o.TypeFlag != "" {
    o.Type = config.ImportType(o.TypeFlag)
}

and dir-importer's config.Validate() accepts oasf. So --type=oasf has been working, but it appeared in neither the kinds list, the --type flag description, nor the command summary. There was no way to find it from the CLI.

Please do not merge yet

This documents behaviour that only ships with a dir-importer release containing agntcy/dir-importer#87. That change merged a few hours after v1.5.3 was cut, and cli/go.mod currently pins v1.5.2:

github.com/agntcy/dir-importer v1.5.2

So the directory wording is accurate against dir-importer main, but not against the version this module builds with today. Opening as a draft so it is ready to go, but it should land only after a release containing #87 and a bump here. Happy to add the go.mod bump to this PR once such a release exists, or to split the oasf half out if you would rather have that part now, since it is correct against v1.5.2 already.

Rendered output

Import kinds (--type):
  mcp            Local JSON: one MCP server object or a JSON array, or a directory of such files (--file-path)
  mcp-registry   HTTP MCP registry, e.g. v0.1 list API (--url)
  a2a            Local JSON: one A2A AgentCard or an array of cards, or a directory of such files (--file-path)
  agent-skill    Local directory: one Agent Skills folder containing SKILL.md (--file-path); see https://agentskills.io/specification
  oasf           Local JSON: records already in OASF format, or a directory of such files (--file-path); re-imports --dry-run output

For mcp, a2a and oasf, --file-path may be a directory, in which case every *.json
file directly inside it is imported. The search is not recursive, and a file that
fails to parse is reported without stopping the rest of the run.

Also adds dirctl import --type=a2a --file-path=./agent-cards/ to the examples, and updates the --file-path and --type flag descriptions to match.

Docs only, no behaviour change. Verified by building the CLI and reading back dirctl import --help.

@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-49 lines label Aug 14, 2026
@ramizpolic

Copy link
Copy Markdown
Member

If this is okay @AmrendraTheCoder, we can merge this

@AmrendraTheCoder

Copy link
Copy Markdown
Contributor Author

Hey @ramizpolic, yea sure we can merge this!

dir-importer gained directory support for the mcp, a2a and oasf import
types in agntcy/dir-importer#87, but the import command's help still
describes --file-path as a JSON file.

Separately, oasf has been a working --type for a while: --type binds to a
plain string that is handed to config.ImportType without an allowlist, and
dir-importer validates it. It was missing from the kinds list, the --type
flag text and the command summary, so there was no way to discover it from
the CLI.

Documents both, and adds a directory example.

Note: this describes behaviour that ships with a dir-importer release
containing agntcy/dir-importer#87. That change landed after v1.5.3 was cut,
and cli/go.mod currently pins v1.5.2, so this should merge only once the
dependency is released and bumped.

Signed-off-by: Amrendra Vikram Singh <[email protected]>
@AmrendraTheCoder
AmrendraTheCoder force-pushed the docs/import-help-directory branch from 605b195 to 790a43e Compare October 15, 2026 02:19
@AmrendraTheCoder
AmrendraTheCoder marked this pull request as ready for review October 15, 2026 02:19
@AmrendraTheCoder
AmrendraTheCoder requested a review from a team as a code owner October 15, 2026 02:19
@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ramizpolic
ramizpolic added this pull request to the merge queue Oct 19, 2026
Merged via the queue into agntcy:main with commit 713df64 Oct 19, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-49 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants