npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@arvoretech/pi-cloud-sessions

v0.2.2

Published

PI extension that syncs your pi sessions to a cloud backend (private Git repo or iCloud Drive) so you can resume them from any machine

Readme

@arvoretech/pi-cloud-sessions

Sync your pi sessions to a cloud backend so you can start a conversation on one machine and resume it on another. The full session is synced — messages, tree, labels, and the session name — by mirroring the JSONL files pi stores under ~/.pi/agent/sessions/.

Two backends are supported:

  • git — a private Git repo you own (versioned history, free, works anywhere).
  • icloud — a folder inside iCloud Drive (zero infra, Macs on the same Apple ID).

How it works

pi stores each session as a JSONL file under <agent-dir>/sessions/--<project-path>--/<timestamp>_<uuid>.jsonl. This extension mirrors that tree to the chosen backend:

  • On startup it pulls newer sessions from the backend into your local store.
  • Every pollIntervalMs (default 60s) it pulls in the background, so sessions created on another machine show up in /resume even while pi is open.
  • Before resuming/switching to a session it pulls so the loaded session is the freshest version.
  • After each turn it pushes the current state (debounced).
  • On shutdown it flushes a final sync.

Conflict resolution is last-write-wins per file by modification time. File mtimes are preserved across machines so the newest edit wins regardless of which machine synced last. Sessions are append-only/branching, so concurrent edits to the same file are rare.

Setup

Run the setup command inside pi:

/cloud-sessions-setup

It asks for the backend and writes ~/.config/pi/cloud-sessions.json.

Git backend

Create an empty private repo (e.g. [email protected]:you/pi-sessions.git) and make sure your local git can push to it (SSH key or gh auth). Then:

// ~/.config/pi/cloud-sessions.json
{
  "provider": "git",
  "git": { "repo": "[email protected]:you/pi-sessions.git", "branch": "main" }
}

The repo is cloned to ~/.config/pi/cloud-sessions/repo and kept in sync.

iCloud backend

{
  "provider": "icloud",
  "icloud": {
    "dir": "~/Library/Mobile Documents/com~apple~CloudDocs/pi-sessions"
  }
}

Resuming on another machine

Everything is automatic — you never have to run a sync command:

  1. Use pi on machine A. Sessions push after each turn.
  2. Open pi on machine B (same project path). Startup pull brings A's sessions; background polling keeps them coming even if B was already open.
  3. Run /resume — A's session is listed. Pick it and continue.

Caveat — session must share the same cwd. Sessions are stored per working directory (--<project-path>--). For a session to appear in /resume on machine B, B must be in the same absolute project path as A. If your username/home path differs between machines, the paths won't match.

Caveat — no live two-way editing. The sync is serial: finish on one machine, continue on the other. A session already loaded in memory is not hot-reloaded when a newer version is pulled.

Commands

  • /cloud-sessions-sync — pull + push now (optional; sync is automatic).
  • /cloud-sessions-status — show config and current state.
  • /cloud-sessions-setup — configure the backend interactively.

Configuration

All options can be set in ~/.config/pi/cloud-sessions.json or via env vars:

| Setting | JSON key | Env var | Default | | -------------- | ---------------- | ---------------------------------- | ---------------------- | | Backend | provider | PI_CLOUD_SESSIONS_PROVIDER | git | | Auto push | autoPush | PI_CLOUD_SESSIONS_AUTO_PUSH | true | | Pull on start | pullOnStart | PI_CLOUD_SESSIONS_PULL_ON_START | true | | Push debounce | pushDebounceMs | PI_CLOUD_SESSIONS_DEBOUNCE_MS | 4000 | | Poll interval | pollIntervalMs | PI_CLOUD_SESSIONS_POLL_MS | 60000 (0 disables) | | Machine label | machineId | PI_CLOUD_SESSIONS_MACHINE_ID | hostname | | Git repo | git.repo | PI_CLOUD_SESSIONS_GIT_REPO | — | | Git branch | git.branch | PI_CLOUD_SESSIONS_GIT_BRANCH | main | | iCloud folder | icloud.dir | PI_CLOUD_SESSIONS_ICLOUD_DIR | iCloud Drive/pi-sessions |

Privacy

Sessions can contain anything you typed or any file content the agent read. Use a private repo and treat the backend as sensitive. There is no encryption layer — the JSONL is stored as-is.

Install

Place the built extension under a trusted pi extensions directory, or load it directly:

pi -e ./packages/cloud-sessions/dist/index.js