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

accp

v2.0.1

Published

The code is generated automatically by referring to the pattern file. Includes MCP server for LLM integration.

Readme

accp

Auto Create Code with Pattern files.

npm version license

Define your API in .api files, then generate any language — TypeScript, Flutter, Swagger, and more — through customizable pattern files. Includes an MCP server for LLM integration.

.api / .code / .struct  →  accp --compile  →  pattern/*.js  →  Generated code

Installation

npm install accp -g

Quick Start

# 1. Create example project
accp --examples my-project

# 2. Compile
cd my-project && accp --compile

Project Structure

| Folder | Extension | Description | | --------- | ---------- | -------------------------------- | | api/ | .api | API endpoint definitions | | code/ | .code | Error codes and translations | | struct/ | .struct | Data structures used in API | | pattern/| .js | Code generation templates |

All folders are required.

Syntax

.api — API Endpoints

API Syntax

.code — Error Codes

CODE Syntax

.struct — Data Structures

STRUCT Syntax

Compile

Compile Demo

CLI

| Command | Description | | -------------------- | ------------------------------ | | accp --compile | Compile and generate code | | accp --examples <dir> | Create example project |

Pattern Files

Pattern files receive OBJ (compiled data) and GEN (file writer) as arguments:

module.exports = function (OBJ, GEN) {
  const file = new GEN("output/api.ts");
  file.open();
  file.print("// generated code\n");
  file.close();
};

GEN Methods

| Method | Description | | ------------------- | ------------------------------------ | | new GEN(path) | Create instance (auto-creates dirs) | | .open(encoding?) | Start writing (default: utf8) | | .print(string) | Append content | | .close() | Flush buffer to file |

OBJ Structure

OBJ = {
  API: [{
    BASE: String,          // base path
    NAME: String,          // class name
    MARK: String,          // description
    FUNC: [{
      CODE: Int,           // endpoint code
      NAME: String,        // function name
      DESC: String,        // description
      (GET|PUT|POST|PATCH|DELETE): String,  // method: path
      PARAM: [String],     // path parameters
      COMP: Boolean,       // completion status
      PROC: [{ CODE, NAME }],              // related endpoints
      MARK: [{ NAME, MARK }],              // comments
      REQ: [{ NAME, MARK, CLASS, ARRAY, OPTION }],  // request fields
      RES: [{ ... }],      // response fields (same as REQ)
      OPT: { key: Boolean } // user-defined options
    }]
  }],

  CODE: [{
    NAME: String,
    MARK: String,
    CODE: [{ CODE: Int, NAME: String, MARK: { lang: String } }]
  }],

  STRUCT: [{
    NAME: String,
    MARK: String,
    DATA: [{ ... }]        // same as REQ fields
  }]
}

MCP Server

accp includes an MCP server (accp-mcp) for integration with LLM tools like Claude Code.

Setup

Add to your Claude Code settings (~/.claude/settings.json):

{
  "mcpServers": {
    "accp": {
      "command": "accp-mcp"
    }
  }
}

Available Tools

| Tool | Description | | ------------------- | ---------------------------------------------- | | accp_compile | Parse .api/.code/.struct into JSON (OBJ) | | accp_generate | Compile and run pattern files to generate code | | accp_validate | Check syntax without generating | | accp_list_patterns| List available pattern files | | accp_read_file | Read an accp source file | | accp_write_file | Write an accp source file | | accp_parse_string | Parse accp syntax from a string |

VS Code Extension

accp language support — syntax highlighting and snippets for .api, .code, .struct files.

Snippets: API, CODE, STRUCT

Built-in Types

Int Float Double String Boolean Data

Programmatic Usage

const accp = require('accp');

The core.js module exposes the compiler for use in Node.js applications.

License

MIT