Skip to main content

pi-sync

pi-sync keeps your pi agent config the same across hosts. It copies the declarative parts of ~/.pi/agent to another machine over rsync, and it reads your ssh config, so the aliases in ~/.ssh/config work as host names.

pi-sync tinfoil                  # copy config and extensions to tinfoil
pi-sync --config laptop          # copy only models.json and settings.json
pi-sync --pull --all tinfoil     # copy tinfoil's config back to this machine
pi-sync --dry-run --all a b      # report what would change, without copying
pi-sync update                   # update pi-sync itself

install

pipx install pi-sync-cli

The PyPI package is pi-sync-cli, and it installs the pi-sync command. uv tool install pi-sync-cli works the same way.

To install from source, run:

pipx install git+ssh://git@github.com/say4n/pi-sync

pi-sync requires Python 3.10 or later.

what syncs

pi-sync copies the declarative parts of the agent directory, and nothing else.

group what it copies
--config models.json and settings.json
--extensions the extensions/ directory
--auth auth.json, which holds API keys. This group is opt-in, and pi-sync warns you before it copies secrets.

--all copies --config and --extensions. It is the default when you pass no group flag.

pi-sync leaves host-local state alone: sessions/, npm/, models-store.json, ayu/, bin/, and trust.json stay where they are.

flags

flag effect
--all, --config, --extensions, --auth set what pi-sync copies
--pull copy from the host to this machine instead of the other way
--delete make extensions/ match the source exactly, including deletions
--dry-run report changes without copying anything
-x, --exclude PATTERN skip files that match the pattern. Repeat the flag to add more patterns.
--install install pi on hosts that do not have it, without prompting
--uninstall remove pi from the host instead of copying config. Your config stays.
--update-pi update pi on each host before copying config
--local-dir set the local agent directory. The default is $PI_CODING_AGENT_DIR, or ~/.pi/agent.
--remote-dir set the agent directory on the host. The default is ~/.pi/agent.
-v, --verbose print each rsync command and its output

To copy to more than one host, pass more than one name: pi-sync a b c. The command exits with a non-zero status when it cannot copy to a host. Each file pi-sync overwrites on the destination is kept beside the new one as <name>.backup.

developing

For the layout, the tests, and the release process, see DEVELOPMENT.md.

Download files

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

Source Distribution

pi_sync_cli-0.5.3.tar.gz (35.6 kB view details)

Uploaded Source

Built Distribution

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

pi_sync_cli-0.5.3-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file pi_sync_cli-0.5.3.tar.gz.

File metadata

  • Download URL: pi_sync_cli-0.5.3.tar.gz
  • Upload date:
  • Size: 35.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","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 pi_sync_cli-0.5.3.tar.gz
Algorithm Hash digest
SHA256 c8f6bf79abf546bd9f8b78b066e6349f715e51bb9386fa98fa4fc775ffbbb292
MD5 7de6528d355da4d9857dfa6cf1881ec9
BLAKE2b-256 77a96a5891b5ff7babe296eb50f2ed0f9e72162959bbd2087b43d3244851051e

See more details on using hashes here.

File details

Details for the file pi_sync_cli-0.5.3-py3-none-any.whl.

File metadata

  • Download URL: pi_sync_cli-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","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 pi_sync_cli-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6c2013a2c634cbab9f562252bd17584233a9248b5436c0a225ebe58929228bc4
MD5 9acc6b0509d19d71df02e9687e7e9e4a
BLAKE2b-256 d036c58b78b7f00fb8e5bff091ac1599837db713887d5a20895428471f84cea1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.3 This release

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page