Skip to content

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

Draft
AmrendraTheCoder wants to merge 1 commit into
agntcy:mainfrom
AmrendraTheCoder:docs/import-help-directory
Draft

docs(cli): document directory input and the oasf type in import help#2032
AmrendraTheCoder wants to merge 1 commit into
agntcy:mainfrom
AmrendraTheCoder:docs/import-help-directory

Conversation

@AmrendraTheCoder

Copy link
Copy Markdown

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.

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 <76041208+AmrendraTheCoder@users.noreply.github.com>
@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-49 lines label Aug 14, 2026
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.

1 participant