🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

pi-opensync-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pi-opensync-plugin

Pi extension to sync sessions to OpenSync dashboards

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
2
-87.5%
Maintainers
1
Weekly downloads
 
Created
Source

pi-opensync-plugin

A pi coding agent extension that syncs sessions to OpenSync dashboards.

Requirements

Features

  • Real-time sync: Sessions and messages sync as you work
  • Fork support: Forked sessions create new OpenSync sessions with [Fork::parentId] prefix
  • Configurable: Choose what to sync (tool calls, thinking content)
  • Non-intrusive: Silent failures, optional debug logging

Installation

Install as a pi package globally:

pi install npm:pi-opensync-plugin

For project-local installation (auto-installs for teammates), use the -l flag when calling pi install:

pi install -l npm:pi-opensync-plugin

To try without installing, pass the -e flag to temporarily add it to your extensions for the duration of a session:

pi -e npm:pi-opensync-plugin

For any of the above commands, you can also use the repository URL in place of the NPM package to install:

pi install git:github.com/joshuadavidthomas/pi-opensync-plugin
# or the full URL
pi install https://github.com/joshuadavidthomas/pi-opensync-plugin

For manual installation, clone the repository to any place pi coding agent looks for extensions:

git clone https://github.com/joshuadavidthomas/pi-opensync-plugin ~/.pi/agent/extensions/pi-opensync-plugin

Configuration

Once installed, run /opensync:config in pi to interactively configure the extension. At a minimum, the Convex URL and API key from OpenSync is required -- both can be found on the settings page.

The config file is located at ~/.config/pi-opensync-plugin/config.json.

Available Options

Config FileEnvironment VariableDescriptionDefaultRequired?
apiKeyPI_OPENSYNC_API_KEYYour OpenSync API key (osk_...)
autoSyncPI_OPENSYNC_AUTO_SYNCEnable automatic syncingtrue
convexUrlPI_OPENSYNC_CONVEX_URLOpenSync Convex deployment URL
debugPI_OPENSYNC_DEBUGEnable debug loggingfalse
syncThinkingPI_OPENSYNC_THINKINGInclude thinking contentfalse
syncToolCallsPI_OPENSYNC_TOOL_CALLSSync tool callsfalse

How It Works

The extension listens to pi's lifecycle events and syncs data to OpenSync:

  • Session Start: Creates a new session in OpenSync with project info
  • User Input: Syncs each user message in real-time
  • Assistant Response: Syncs assistant messages with token usage
  • Session End: Finalizes the session with duration and totals

Fork Handling

When you fork a session in pi (/fork), the extension:

  • Creates a new OpenSync session with title prefix [Fork::parentId]
  • Batch-syncs all existing messages from the fork point
  • Continues real-time syncing for new messages

This means forked sessions contain the complete conversation history, which is intentional for traceability.

Development

bun install            # Install dependencies
bun run test           # Run tests
bun run test:watch     # Run tests in watch mode
bun run typecheck      # Type check

License

pi-opensync-plugin is licensed under the MIT license. See the LICENSE file for more information.

Keywords

pi-package

FAQs

Package last updated on 04 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts