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

@aperturesyndicate/synx

v3.5.2

Published

SYNX: The Active Data Format. Faster than JSON, cheaper for AI tokens, built-in logic.

Readme

SYNX for JS/TS — @aperturesyndicate/synx

The official JavaScript & TypeScript parser for the SYNX format.

Install

npm install @aperturesyndicate/synx

Usage

const Synx = require('@aperturesyndicate/synx');

// Load from file
const data = Synx.loadSync('config.synx');
console.log(data.server.port); // 8080

// Parse from string
const data2 = Synx.parse('name Wario\nage 30');
console.log(data2.name); // "Wario"

TypeScript

import Synx from '@aperturesyndicate/synx';

interface Config {
  server: { port: number; host: string };
  app_name: string;
}

const data = Synx.loadSync<Config>('config.synx');
console.log(data.server.port); // typed as number

API

| Method | Description | |---|---| | Synx.parse<T>(text, options?) | Parse a .synx string → object | | Synx.loadSync<T>(path, options?) | Load & parse file (sync) | | Synx.load<T>(path, options?) | Load & parse file (async, returns Promise) | | Synx.stringify(obj, active?) | Serialize object → .synx string |

Options

{
  basePath?: string;                 // For :include resolution
  env?: Record<string, string>;      // Override env vars
  region?: string;                   // For :geo ("RU", "US", etc.)
  strict?: boolean;                  // Throw on INCLUDE_ERR/WATCH_ERR/CALC_ERR/CONSTRAINT_ERR
}

strict: true enables fail-fast behavior for production: marker runtime errors throw instead of silently remaining in the output object as error strings.

CLI

Install globally:

npm install -g @aperturesyndicate/synx

Commands

# Convert to JSON/YAML/TOML/.env
synx convert config.synx --format json
synx convert config.synx --format yaml > values.yaml
synx convert config.synx --format toml
synx convert config.synx --format env > .env

# Validate (strict mode, for CI/CD)
synx validate config.synx --strict

# Watch for changes
synx watch config.synx --format json
synx watch config.synx --exec "nginx -s reload"

# Extract JSON Schema from constraints
synx schema config.synx

Export Formats

Convert parsed SYNX to other formats programmatically:

const config = Synx.loadSync('config.synx');

Synx.toJSON(config);           // JSON (pretty)
Synx.toJSON(config, false);    // JSON (compact)
Synx.toYAML(config);           // YAML
Synx.toTOML(config);           // TOML
Synx.toEnv(config);            // KEY=VALUE
Synx.toEnv(config, 'PREFIX');  // PREFIX_KEY=VALUE

File Watcher

const handle = Synx.watch('config.synx', (config, error) => {
  if (error) return console.error(error);
  console.log('Config reloaded:', config);
}, { strict: true });

handle.close(); // stop watching

Schema Export

Extract constraints as JSON Schema:

const schema = Synx.schema(`
!active
app_name[required, min:3, max:30] TotalWario
volume[min:0, max:100, type:int] 75
`);
// { "$schema": "...", "properties": { "app_name": { ... } }, "required": ["app_name"] }

Other Languages

  • Pythonsynx-format on PyPI
  • Rustsynx on crates.io
    cargo add synx
    use synx::Synx;
      
    let data = Synx::load("config.synx")?;
    println!("{}", &data["server"]["port"]);

License

MIT — © APERTURESyndicate