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

@compilr-dev/editor-core

v0.0.1

Published

Core library for terminal markdown editors - slash commands, 418 themes, AI writing assistance

Downloads

115

Readme

@compilr-dev/editor-core

Core library for terminal markdown editors - slash commands, snippets, themes, AI writing assistance.

Features

  • 40+ Slash Commands - Notion-style commands for markdown editing
  • 23 Mermaid Templates - Instant diagram insertion
  • 418 Themes - Full Ghostty theme collection (coming soon)
  • AI Writing - Smart writing assistance (coming soon)

Installation

npm install @compilr-dev/editor-core

Quick Start

import {
  registerCommands,
  builtinCommands,
  executeCommand,
  parseCommandInput,
} from '@compilr-dev/editor-core';

// Register all built-in commands
registerCommands(builtinCommands);

// Parse user input
const input = '/mermaid flowchart';
const parsed = parseCommandInput(input);

if (parsed) {
  // Execute the command
  const context = {
    cursor: { line: 0, column: 0, offset: 0 },
    content: '',
  };

  const result = await executeCommand(parsed.name, parsed.args, context);
  console.log(result); // Mermaid flowchart template
}

Slash Commands

Content Commands

| Command | Aliases | Description | |---------|---------|-------------| | /h1 | /heading1 | Level 1 heading | | /h2 | /heading2 | Level 2 heading | | /h3 | /heading3 | Level 3 heading | | /bold | /b | Bold text | | /italic | /i, /em | Italic text | | /strikethrough | /strike, /s | Strikethrough | | /link | /a, /href | Markdown link | | /img | /image | Image reference | | /code | /codeblock, /fence | Code block | | /inlinecode | /ic, /backtick | Inline code | | /table | - | Markdown table | | /list | /ul, /bullet | Bulleted list | | /numbered | /ol, /numlist | Numbered list | | /checklist | /todo, /tasks | Task checklist | | /quote | /blockquote, /bq | Blockquote | | /hr | /divider, /separator | Horizontal rule | | /callout | /note, /admonition | Callout box | | /toc | /tableofcontents | Table of contents | | /frontmatter | /yaml, /meta | YAML frontmatter |

Mermaid Commands

| Command | Description | |---------|-------------| | /mermaid flowchart | Flowchart diagram | | /mermaid sequence | Sequence diagram | | /mermaid class | Class diagram | | /mermaid state | State diagram | | /mermaid er | ER diagram | | /mermaid gantt | Gantt chart | | /mermaid pie | Pie chart | | /mermaid radar | Radar chart | | /mermaid mindmap | Mind map | | /mermaid timeline | Timeline | | /mermaid gitgraph | Git graph | | /mermaid quadrant | Quadrant chart | | /mermaid sankey | Sankey diagram | | /mermaid xychart | XY chart | | /mermaid c4 | C4 architecture | | /mermaid architecture | Architecture diagram | | /mermaid kanban | Kanban board | | /mermaid blockdiagram | Block diagram | | /mermaid packet | Packet diagram | | /mermaid zenuml | ZenUML sequence | | /mermaid treemap | Treemap | | /mermaid journey | User journey | | /mermaid requirement | Requirements |

API

Command Registry

// Register commands
registerCommand(command: SlashCommand): void
registerCommands(commands: SlashCommand[]): void

// Query commands
getCommand(nameOrAlias: string): SlashCommand | undefined
hasCommand(nameOrAlias: string): boolean
getCommandNames(): string[]
getAllCommands(): SlashCommand[]
getCommandsByCategory(category): SlashCommand[]
searchCommands(term: string): SlashCommand[]

// Execute commands
executeCommand(name: string, args: ParsedArgs, context: CommandContext): Promise<string>
parseCommandInput(input: string): { name: string; args: ParsedArgs } | null

Creating Custom Commands

import { registerCommand, SlashCommand } from '@compilr-dev/editor-core';

const myCommand: SlashCommand = {
  name: 'greeting',
  description: 'Insert a greeting',
  category: 'content',
  aliases: ['hello', 'hi'],
  args: [{ name: 'name', description: 'Person to greet', required: false }],
  execute(args, context) {
    const name = args.positional[0] || 'World';
    return `# Hello, ${name}!\n\n`;
  },
};

registerCommand(myCommand);

License

MIT