agentctl
CLI for agent hub validation, index generation, and skill management. Implements the hub formats defined in agent-foundation.
See docs/roadmap.md for current development plans and upcoming features.
Install
Homebrew (macOS/Linux):
cargo-binstall (installs pre-built binary):
cargo (builds from source):
Binary download: grab the latest release from GitHub Releases.
Quickstart
Validate a hub directory:
Generate index.json:
Usage
agentctl --help
agentctl hub --help
Validation output
On success:
✓ Validation passed
On failure (exit code 1):
✗ skills/my-skill/SKILL.md:1: missing required field: name
✗ skills/my-skill/SKILL.md:1: missing required field: description
✗ Validation failed (2 error(s))
Generated index.json (skills)
Config Management
Inspect and modify ~/.agentctl/config.json without editing JSON by hand.
# create a default config file (errors if already exists)
# print the config file path
# print the full config as pretty JSON
# get / set scalar values
Supported keys: skills_root — overrides the default skill install root. Hub entries are managed via hub add/remove/enable/disable.
Hub Registry
Register and manage hub sources in ~/.agentctl/config.json:
Skill Management
Install, list, remove, and update skills from registered hubs.
# install from the first enabled skill hub
# install from a specific hub
# install into a named mode (path: ~/.agent/skills-dev/)
# list installed skills
# remove a skill
# update a skill (errors if no update lifecycle — use --force to reinstall)
# update all installed skills
# export current skill installations for backup/sharing
Global flags:
-q/--quiet— suppress all step output; implies--yes-y/--yes— auto-approve allrequires_approvallifecycle steps
Skills are installed to ~/.agent/skills/<name>/ and tracked in ~/.agentctl/skills.lock.json.
Each skill may include a lifecycle.yaml with install, update, and uninstall sections.
agentctl.toml
Optional file at the hub root. When present, values are used as defaults; CLI flags always take precedence.
[]
= "agent-foundation" # overrides --hub-id on generate
[]
# Replaces the default exclusion list when present.
# Supports filename patterns, directory patterns, and path wildcards.
= [
"README.md", # exact filename match
"CHANGELOG.md",
"CONTRIBUTING.md",
"ARCHIVED.md",
"draft-*.md", # filename wildcard
"rules/templates/", # directory pattern (excludes all files in directory)
"docs/internal/*.md", # path wildcard (specific pattern in directory)
]
Pattern types:
- Filename patterns:
"README.md"(exact),"draft-*.md"(wildcard) — matched case-insensitively at any path level - Directory patterns:
"templates/","rules/templates/"— excludes all files in the specified directory - Path wildcards:
"rules/*.md","docs/internal/*.md"— excludes files matching the pattern in the specific directory path
When agentctl.toml is absent or has no [generate] ignore key, the default exclusions apply: README.md, CHANGELOG.md, CONTRIBUTING.md, LICENSE*, ARCHIVED.md.
See docs/hub-config.md for full details including cache layout and TTL behaviour.
CI Integration
Example GitHub Actions workflow for a docs or skills hub:
name: Publish Index
on:
push:
branches:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Install agentctl
run: |
curl -sSL https://github.com/geronimo-iia/agentctl/releases/latest/download/x86_64-unknown-linux-gnu.tar.gz | tar xz -C /usr/local/bin
- name: Validate
run: agentctl hub validate --type docs --path .
- name: Generate index.json
run: agentctl hub generate --type docs --path . --output index.json
- name: Commit index.json
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add index.json
git diff --staged --quiet || git commit -m "chore: regenerate index.json [skip ci]"
git push
Replace --type docs with --type skills for a skills hub.
License
MIT OR Apache-2.0