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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sylphx/coding

v1.5.0

Published

This CLI tool is designed to download official Sylphx mode configurations from a specified URL and intelligently synchronize them with a local `custom_modes.yaml` file used by applications like Roo Cline.

Readme

Instruction Updater CLI (@sylphx/instruction-updater)

This CLI tool is designed to download official Sylphx mode configurations from a specified URL and intelligently synchronize them with a local custom_modes.yaml file used by applications like Roo Cline.

Features

  • Fetches a complete list of official Sylphx mode objects (including slug, name, roleDefinition, customInstructions, groups) from a dedicated API endpoint.
  • Reads the local custom_modes.yaml file.
  • Intelligently synchronizes official modes:
    • Updates existing official modes (slug sylphx or starting with sylphx_) if their content (roleDefinition or customInstructions) differs from the remote version.
    • Adds new official modes from the remote source if they don't exist locally.
    • Removes local official modes that are no longer present in the remote source (considered obsolete).
    • Preserves all user-defined custom modes (those with slugs not matching the official pattern).
  • Writes the synchronized list of modes back to the local custom_modes.yaml file.
  • Provides a check command to list local modes and display their synchronization status against the official source.
  • CLI output is enhanced with colors and formatting for better readability.

Prerequisites

  • Node.js (version 18 or higher recommended for built-in fetch).
  • pnpm (for package management within this monorepo).

Installation (within Monorepo)

This package is part of a pnpm monorepo. Dependencies are typically managed from the monorepo root.

To build the tool:

# From monorepo root
pnpm --filter @sylphx/instruction-updater build

This will use tsup to compile the TypeScript source code into the packages/instruction-updater/dist directory.

Usage

The CLI provides two main commands: update and check.

update Command

Synchronizes local custom_modes.yaml with the official Sylphx modes.

Local execution from monorepo root:

# Ensure the tool is built first
pnpm --filter @sylphx/instruction-updater build

# Run the update command
node packages/instruction-updater/dist/cli.js update

Using pnpm script (from packages/instruction-updater directory):

pnpm start:cli update 

(Note: start:cli in package.json is node ./dist/cli.js, so update is the subcommand)

Using pnpm exec (from monorepo root, after pnpm install):

pnpm --filter @sylphx/instruction-updater exec instruction-updater update

Options for update:

  • -u, --url <url>: Specify a custom URL to download the official modes configuration from. Defaults to: https://playbook.sylphx.com/api/get-sylphx-modes-config
  • -o, --output <path>: Specify a custom local path for the custom_modes.yaml file. Defaults to: C:\Users\<YourUser>\AppData\Roaming\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\custom_modes.yaml

check Command

Lists local custom modes and displays their synchronization status with official Sylphx modes.

Local execution from monorepo root:

# Ensure the tool is built first
pnpm --filter @sylphx/instruction-updater build

# Run the check command
node packages/instruction-updater/dist/cli.js check

Using pnpm script (from packages/instruction-updater directory):

pnpm start:cli check

Using pnpm exec (from monorepo root, after pnpm install):

pnpm --filter @sylphx/instruction-updater exec instruction-updater check

Options for check:

  • -u, --url <url>: Specify a custom URL to fetch the official modes configuration for comparison.
  • -l, --local-path <path>: Specify a custom local path for the custom_modes.yaml file to check.

Development

  • Source code is located in packages/instruction-updater/src.
  • Build the package using pnpm build within the packages/instruction-updater directory, or pnpm --filter @sylphx/instruction-updater build from the monorepo root.

Testing (Future Work)

Unit tests should be implemented using Vitest to cover:

  • downloader.ts: Mock HTTP requests and test fetching/parsing of the modes configuration.
  • file-handler.ts: Test reading, writing, and the core synchronizeModes logic with various scenarios (new modes, updated modes, removed modes, user-defined modes).
  • cli.ts: Test command parsing and option handling.

Integration tests could also be added to test the end-to-end flow.

To run tests (once implemented):

# From packages/instruction-updater directory
pnpm test

# Or from monorepo root
pnpm --filter @sylphx/instruction-updater test