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

@revealui/editors

v0.1.0

Published

Editor integration system - adapters, daemon, and JSON-RPC server

Readme

@revealui/editors

Editor integration system for RevealUI - adapters, daemon, and JSON-RPC server for managing external text editors.

Overview

This package provides a unified system for integrating external text editors (VS Code, Neovim, Zed) with RevealUI. It includes:

  • Pure type definitions - TypeScript interfaces and contracts
  • Editor adapters - Implementations for specific editors
  • JSON-RPC server - Communication protocol for editor control
  • Process management - Auto-detection and lifecycle management
  • Config sync - Bidirectional configuration synchronization

Architecture

Editors are treated as external executables, never as linked libraries. Communication is data-only (commands in, results out). If an editor is uninstalled, RevealUI continues to function.

Key Components

  • EditorAdapter - Interface that all editor integrations must implement
  • EditorRegistry - Manages multiple editor adapters
  • RpcServer - JSON-RPC 2.0 server over Unix sockets
  • Auto-detection - Discovers installed editors automatically
  • Config sync - Push/pull configuration between local and SSD paths

Installation

pnpm add @revealui/editors

Usage

Basic Usage

import { EditorRegistry, ZedAdapter, VscodeAdapter, NeovimAdapter } from '@revealui/editors'

// Create registry and register adapters
const registry = new EditorRegistry()
registry.register(new ZedAdapter())
registry.register(new VscodeAdapter())
registry.register(new NeovimAdapter())

// List available editors
const editors = await registry.listAvailable()
console.log('Available editors:', editors)

// Execute command
const adapter = registry.get('vscode')
if (adapter) {
  await adapter.execute({
    type: 'open-file',
    path: '/path/to/file.ts',
    line: 42
  })
}

Type-Only Imports

import type {
  EditorAdapter,
  EditorCapabilities,
  EditorCommand,
  EditorInfo
} from '@revealui/editors/types'

JSON-RPC Server

import { RpcServer } from '@revealui/editors'

const server = new RpcServer(registry)
await server.start('~/.local/share/revealui/editor.sock')

// Server exposes these RPC methods:
// - editor.list
// - editor.info
// - editor.execute
// - editor.listRunning
// - editor.openFile
// - editor.syncConfig
// - editor.diffConfig
// - editor.installExtension

CLI Usage

# Start daemon
revealui-editors start

# List available editors
revealui-editors list

# Open file in editor
revealui-editors open /path/to/file.ts --editor vscode

# Sync configuration
revealui-editors sync vscode push
revealui-editors sync vscode pull

Supported Editors

  • VS Code (vscode) - Microsoft Visual Studio Code
  • Neovim (neovim) - Neovim text editor
  • Zed (zed) - Zed code editor

Editor Commands

type EditorCommand =
  | { type: 'open-project'; path: string }
  | { type: 'open-file'; path: string; line?: number; column?: number }
  | { type: 'apply-config'; config: Record<string, unknown> }
  | { type: 'install-extension'; extensionId: string }
  | { type: 'get-status' }
  | { type: 'get-running-instances' }
  | { type: 'sync-config'; direction: 'push' | 'pull' }
  | { type: 'diff-config' }

Editor Events

type EditorEvent =
  | { type: 'editor-opened'; editorId: string; pid?: number }
  | { type: 'editor-closed'; editorId: string }
  | { type: 'file-opened'; editorId: string; path: string }
  | { type: 'config-applied'; editorId: string }
  | { type: 'error'; editorId: string; error: string }

Configuration Management

The package supports syncing editor configurations between:

  • Local: ~/.config/<editor>/
  • SSD: /mnt/e/.revealui/<editor>/

Supported editor configs:

  • Zed: ~/.config/zed/settings.json
  • VS Code: ~/.config/Code/User/settings.json
  • Neovim: ~/.config/nvim/init.lua

Development

# Build package
pnpm build

# Run tests
pnpm test

# Run tests with coverage
pnpm test:coverage

# Type check
pnpm typecheck

# Watch mode
pnpm dev

API Reference

EditorAdapter Interface

interface EditorAdapter {
  readonly id: string
  readonly name: string
  getCapabilities(): EditorCapabilities
  getInfo(): Promise<EditorInfo>
  isAvailable(): Promise<boolean>
  execute(command: EditorCommand): Promise<EditorCommandResult>
  onEvent(handler: (event: EditorEvent) => void): () => void
  dispose(): Promise<void>
}

EditorRegistry

class EditorRegistry {
  register(adapter: EditorAdapter): void
  unregister(editorId: string): void
  get(editorId: string): EditorAdapter | undefined
  listAll(): EditorAdapter[]
  listAvailable(): Promise<EditorAdapter[]>
  dispose(): Promise<void>
}

Migration from Previous Packages

This package consolidates the previous @revealui/editor-sdk and @revealui/editor-daemon packages:

// Before (editor-sdk)
import type { EditorAdapter } from '@revealui/editor-sdk'

// After (editors)
import type { EditorAdapter } from '@revealui/editors/types'
// or
import type { EditorAdapter } from '@revealui/editors'

// Before (editor-daemon)
import { ZedAdapter, EditorRegistry } from '@revealui/editor-daemon'

// After (editors)
import { ZedAdapter, EditorRegistry } from '@revealui/editors'

License

Commercial — see LICENSE.commercial