🎩 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

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

pi-opensync-plugin

A pi extension that syncs sessions to OpenSync dashboards.

Requirements

  • pi >= 0.50.0
  • OpenSync account (hosted or self-hosted) and API key

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 https://github.com/joshuadavidthomas/pi-opensync-plugin
    
  • For project-local installation (auto-installs for teammates):

    pi install -l https://github.com/joshuadavidthomas/pi-opensync-plugin
    
  • To try without installing:

    pi -e https://github.com/joshuadavidthomas/pi-opensync-plugin
    
  • Or you can clone manually:

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

Configuration

Run /opensync:config in pi to interactively configure the extension.

Two options are required: convexUrl (your OpenSync deployment URL) and apiKey (your OpenSync API key).

Manual Configuration

Create ~/.config/pi-opensync-plugin/config.json:

{
  "apiKey": "osk_your_api_key_here",
  "autoSync": true,
  "convexUrl": "https://your-opensync-deployment.convex.cloud",
  "debug": false,
  "syncThinking": false,
  "syncToolCalls": false
}

Environment Variables

Environment variables take precedence over config file:

VariableDescription
PI_OPENSYNC_API_KEYYour OpenSync API key (osk_...)
PI_OPENSYNC_AUTO_SYNCEnable automatic syncing (default: true)
PI_OPENSYNC_CONVEX_URLOpenSync Convex deployment URL
PI_OPENSYNC_DEBUGEnable debug logging (default: false)
PI_OPENSYNC_THINKINGInclude thinking content (default: false)
PI_OPENSYNC_TOOL_CALLSSync tool calls (default: false)

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 29 Jan 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