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.1.tar.gz (34.1 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.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pi_sync_cli-0.5.1.tar.gz
  • Upload date:
  • Size: 34.1 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.1.tar.gz
Algorithm Hash digest
SHA256 dbb9c2d1c93f83b7edb129069af37de0449d53e8b264f51da93a77e74faf0b12
MD5 32fbb01eeca1e439d185f0fc11127e4d
BLAKE2b-256 d2f9b776b14b9d377b5601808d002c9dc02501ba8d29ae97da67b42060964823

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pi_sync_cli-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 519fd8eaba50353b1edd3fca64378ef0c32959da23d1fff54c32db19da53de9d
MD5 d3a86badb0ed40d77c34198ab0eab7bc
BLAKE2b-256 a38e2016d48d703539a0e5ab142795d37633c1765069dee3dca8eaedce183ecc

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.3

2 files

0.5.2

2 files

This release

0.5.1 This release

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