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.6.tar.gz (87.8 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.6-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agpack-0.1.6.tar.gz
  • Upload date:
  • Size: 87.8 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.6.tar.gz
Algorithm Hash digest
SHA256 7fc9bf07103ee30404959a17342fba4c68db4af5573f3fd8f10a73a344595861
MD5 cfe43e8b0c127f6f43eb1f53ce904c3a
BLAKE2b-256 5a0c855d7a1d8a54ff01517f891a12929b01cf113cd9144d3b445711b461d576

See more details on using hashes here.

Provenance

The following attestation bundles were made for agpack-0.1.6.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.6-py3-none-any.whl.

File metadata

  • Download URL: agpack-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 32.6 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 147963ec0d5e7cb62e7fabfa7e40a424292744eb94a9c62a7367c1ba7cd9dea0
MD5 4e82f2c4dd0e842b42714c3d8e304031
BLAKE2b-256 934f57029c241cd299ee9fb133822dfd460498878d491277781979416451fb10

See more details on using hashes here.

Provenance

The following attestation bundles were made for agpack-0.1.6-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