Skip to main content

Fetch and deploy AI agent resources from git repos to local tool directories

Project description

agpack

PyPI CI Python 3.11+ Ruff mypy License: GPL-3.0 Sponsor

Declare your AI agent resources in a YAML file, run agpack sync, and they get deployed to every coding tool you use.

agpack fetches skills, commands, agents, and MCP server configs from git repos and copies them to the right places for Claude Code, OpenCode, Codex, Cursor, and GitHub Copilot.

Why

Every AI coding tool has its own directory structure for skills, its own config format for MCP servers, its own spot for custom commands. If you use more than one tool -- or share resources across projects -- you end up manually copying files and keeping multiple configs in sync.

agpack replaces that with a single agpack.yml that describes what you want and where it comes from.

Install

# Recommended: install as an isolated tool
pipx install agpack
# or
uv tool install agpack

# Or with plain pip
pip install agpack

Requires Python 3.11+ and git on PATH.

Quick start

agpack init          # creates agpack.yml with commented-out examples

Edit agpack.yml:

name: my-project
version: 0.1.0

targets:
  - claude
  - opencode

dependencies:
  skills:
    - url: https://github.com/PhilippTh/agent-assets
      path: skills/article-review
    - url: https://github.com/PhilippTh/agent-assets
      path: skills/deep-dive
      ref: v1.2.0

  commands:
    - url: https://github.com/PhilippTh/agent-assets
      path: commands/review.md

  agents:
    - url: https://github.com/PhilippTh/agent-assets
      path: agents/backend-expert.md

  mcp:
    - name: filesystem
      command: npx
      args: ["-y", "@modelcontextprotocol/server-filesystem", "."]

Then:

agpack sync

That's it. Skills get copied to .claude/skills/, .opencode/skills/, etc. Commands and agents go to their respective directories. MCP server definitions get merged into each tool's config file.

How dependencies work

The url field takes any valid git clone URL. HTTPS, SSH, local paths -- whatever git understands:

# GitHub over HTTPS
- url: https://github.com/owner/repo
  path: skills/my-skill

# GitLab over SSH
- url: git@gitlab.com:myorg/myrepo.git
  path: skills/my-skill

# Azure DevOps
- url: https://dev.azure.com/myorg/myproject/_git/myrepo
  path: skills/my-skill

# Pinned to a tag
- url: https://github.com/owner/repo
  path: skills/my-skill
  ref: v1.0.0

# Pinned to a commit
- url: https://github.com/owner/repo
  path: skills/my-skill
  ref: abc1234

Authentication is handled entirely by your system git config -- SSH keys, credential helpers, whatever you already have set up.

Where things go

Target Skills Commands Agents MCP Config
Claude .claude/skills/<name>/ .claude/commands/<file> .claude/agents/<file> .mcp.json
OpenCode .opencode/skills/<name>/ .opencode/commands/<file> .opencode/agents/<file> opencode.json
Codex .agents/skills/<name>/ -- -- .codex/config.toml
Cursor .cursor/skills/<name>/ -- .cursor/agents/<file> .cursor/mcp.json
Copilot .github/skills/<name>/ .github/prompts/<file> .github/agents/<file> .vscode/mcp.json

Unsupported resource types (--) are skipped silently. MCP server definitions are merged into each tool's config file without touching servers agpack didn't create.

Commands

agpack sync

Fetches everything and deploys it. Run it again after changing agpack.yml -- removed dependencies get cleaned up automatically.

agpack sync [--dry-run] [--verbose] [--config PATH]

agpack status

Shows what's installed vs what's configured:

Skills:
  ✓ article-review       (https://github.com/PhilippTh/agent-resources @ abc1234)
  ✗ new-skill            (not yet synced)

Commands:
  ✓ review.md            (https://github.com/PhilippTh/agent-resources @ abc1234)

MCP:
  ✓ filesystem           → .mcp.json, opencode.json

agpack init

Creates a starter agpack.yml with commented-out examples.

Environment variables

Use ${VAR_NAME} syntax in config values to reference environment variables. agpack resolves them at sync time.

mcp:
  - name: context7
    command: npx
    args: ["-y", "@context7/mcp-server"]
    env:
      CONTEXT7_API_KEY: ${CONTEXT7_API_KEY}

Variables are resolved from two sources, in order:

  1. A .env file in the project root (same directory as agpack.yml)
  2. Your shell environment

The .env file takes precedence when a variable is defined in both places. If a referenced variable is not found in either source, sync fails with an error.

Example .env file:

# API keys — add .env to .gitignore!
CONTEXT7_API_KEY=sk-abc123
OPENAI_API_KEY=sk-xyz789

The .env parser supports KEY=VALUE, "quoted" and 'quoted' values, # comments, blank lines, and export prefixes.

How it works under the hood

  1. Loads agpack.yml, validates it
  2. Reads .agpack.lock.yml to see what was previously installed
  3. Cleans up files from dependencies you've removed
  4. For each dependency: shallow-clones the repo (with sparse checkout when a path is set), copies files to all target directories
  5. Merges MCP configs into each tool's config file
  6. Writes an updated lockfile

Every file write is atomic (write-to-temp-then-rename). agpack never partially writes a file and never deletes anything it didn't create.

License

GPL-3.0 -- see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agpack-0.1.7.tar.gz (88.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agpack-0.1.7-py3-none-any.whl (33.0 kB view details)

Uploaded Python 3

File details

Details for the file agpack-0.1.7.tar.gz.

File metadata

  • Download URL: agpack-0.1.7.tar.gz
  • Upload date:
  • Size: 88.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agpack-0.1.7.tar.gz
Algorithm Hash digest
SHA256 c0fe58eeb2084c303e21d818953f852ed11a285ea31f3a614a879de5c2c0e638
MD5 3e298fa295cb25cd917c38068d34ae48
BLAKE2b-256 5efc2870ec81607a8a3ad8e5a87fe2bcc8c3a2684e0d8af8d45f4085b16f8920

See more details on using hashes here.

Provenance

The following attestation bundles were made for agpack-0.1.7.tar.gz:

Publisher: release.yml on PhilippTh/agpack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agpack-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: agpack-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 33.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agpack-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 048505abfdee91de438c938d405e33985fa8df64fe2c641d07449d5ef333ccd9
MD5 97c54b8c270066c4dd609d6d58b04aa5
BLAKE2b-256 f204b45723460633fe9e098f886042f57c927d8f39016abdaad76813f2e88676

See more details on using hashes here.

Provenance

The following attestation bundles were made for agpack-0.1.7-py3-none-any.whl:

Publisher: release.yml on PhilippTh/agpack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page