Skip to main content

Sync OpenCode agents and skills from an Obsidian vault to workspace directories

Project description

piagentsync

Sync OpenCode agents and skills from an Obsidian vault to workspace directories.

Install

uv add piagentsync
# or
pip install piagentsync

Quick start

  1. Initialize a new project in your vault:
piagentsync init myproject --workspace ~/workspace/myproject
  1. Pull the synced files to your workspace:
piagentsync pull myproject

Configuration

Environment variables (also configurable via .env file):

Variable Default Description
PIAGENTSYNC_VAULT_PATH ~/vault Path to Obsidian vault
PIAGENTSYNC_GLOBAL_OPENCODE_PATH ~/.config/opencode Path to global OpenCode config

CLI reference

piagentsync pull <project>

Sync a single project from vault to workspace.

Options:

  • --dry-run / --no-dry-run — preview changes without writing
  • --global / --no-global — also sync global agents
  • --all — sync all discovered projects

piagentsync status [project]

Show diff between vault and workspace.

Options:

  • --all — show status for all projects (default when no project given)

piagentsync init <project>

Scaffold a new project in the vault.

Options:

  • --workspace PATH — required, workspace directory
  • --notion-board-id TEXT — optional Notion DB ID
  • --notion-project-filter TEXT — optional Notion project filter (defaults to project slug)

--version

Print version and exit.

AGENTS.md manifest format

Each project must have an AGENTS.md file in its root with YAML frontmatter:

---
project: myproject
workspace: ~/workspace/myproject
notion_board_id: 3305f9479a8d8055b3c3e86a9006cf91
notion_project_filter: myproject
---

The body below the frontmatter is the OpenCode routing table.

Expected vault structure

vault/
├── agents/
│   └── global/
│       └── *.md
└── projects/
    └── {project}/
        ├── AGENTS.md           # manifest with frontmatter
        ├── context.md          # optional context file
        ├── decisions.md        # optional decisions log
        ├── agents/
        │   └── *.md
        └── skills/
            └── *.md

Contributing

Development setup:

uv sync
uv run pytest

Lint and format:

uv run ruff check src/ tests/
uv run ruff format src/ tests/

All commits follow Conventional Commits.

Publishing (maintainers)

This repository uses GitHub Actions for CI and automated releases.

One-time PyPI setup (trusted publisher)

  1. Enable OIDC on PyPI for the repository:

    • Publisher: GitHub Actions
    • Repository owner: Piwero
    • Repository name: piagentsync
    • Workflow filename: release.yml
    • Environment name: (leave blank)
  2. The Release workflow handles everything: bump version, create tag, build, publish to PyPI, and create a GitHub Release.

Release process

git push → ci.yml passes
   → trigger release.yml (choose MAJOR/MINOR/PATCH/RC)
       → tests re-run → changelog generated → version bumped → tag pushed
       → GitHub Release created with assets → package published to PyPI

License

MIT

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

piagentsync-0.0.3rc2.tar.gz (37.2 kB view details)

Uploaded Source

Built Distribution

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

piagentsync-0.0.3rc2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file piagentsync-0.0.3rc2.tar.gz.

File metadata

  • Download URL: piagentsync-0.0.3rc2.tar.gz
  • Upload date:
  • Size: 37.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for piagentsync-0.0.3rc2.tar.gz
Algorithm Hash digest
SHA256 d4d086431fdc544aff2c1ed07e6f175c0003e8a772e218f49309f887086857d8
MD5 02c2f738475ca94ca07fd86a9e83dfdd
BLAKE2b-256 809ea1fbcd462c341bdc457de1ca616d960ae0140c72dad96fa5bab055c32504

See more details on using hashes here.

File details

Details for the file piagentsync-0.0.3rc2-py3-none-any.whl.

File metadata

  • Download URL: piagentsync-0.0.3rc2-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for piagentsync-0.0.3rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 316f9279805e3c537083a933a16f4a884f0e820a7af24cbd4b77baf8fadec523
MD5 2b1084f9d1c897e1b8745c4152d2ad13
BLAKE2b-256 19c9b5a7694eaccdf6b8d8a652c61e2f3e8453073a0be40c6f7610a843c8c484

See more details on using hashes here.

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