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

@rgglez/shiki-pddl

v0.0.3

Published

PDDL (Planning Domain Definition Language) TextMate grammar for Shiki, Expressive Code and Astro.

Readme

shiki-pddl

License GitHub all releases GitHub issues GitHub commit activity GitHub stars GitHub forks

@rgglez/shiki-pddl is a PDDL (Planning Domain Definition Language) TextMate grammar for Shiki, Expressive Code and any Markdown / MDX pipeline that accepts a LanguageRegistration-shaped grammar object.

Zero runtime dependencies. Ships the grammar JSON plus a typed ESM default export.

Install

npm i @rgglez/shiki-pddl
# or
bun add @rgglez/shiki-pddl
# or
pnpm add @rgglez/shiki-pddl

Usage

Shiki

import { createHighlighter } from "shiki";
import pddl from "@rgglez/shiki-pddl";

const hl = await createHighlighter({
  themes: ["github-dark"],
  langs: [pddl],
});

const html = hl.codeToHtml(src, { lang: "pddl", theme: "github-dark" });

Astro + astro-expressive-code

Works also with AstroPaper, since it uses expressive-code under the hood:

// astro.config.ts
import { defineConfig } from "astro/config";
import expressiveCode from "astro-expressive-code";
import pddl from "@rgglez/shiki-pddl";

export default defineConfig({
  integrations: [
    expressiveCode({
      themes: ["dracula", "github-light"],
      shiki: { langs: [pddl] },
    }),
  ],
});

Then in any .md / .mdx:

```pddl
(define (domain blocksworld)
  (:requirements :strips)
  (:predicates (on ?x ?y) (clear ?x) (ontable ?x) (handempty))
  (:action stack
    :parameters (?x ?y)
    :precondition (and (clear ?y) (holding ?x))
    :effect (and (not (holding ?x)) (not (clear ?y))
                 (clear ?x) (handempty) (on ?x ?y))))
```

Astro markdown.shikiConfig

import pddl from "@rgglez/shiki-pddl";

export default defineConfig({
  markdown: {
    shikiConfig: { langs: [pddl] },
  },
});

Raw grammar (no JS wrapper)

If you want the JSON directly (for build tools, editors, etc.):

import grammar from "@rgglez/shiki-pddl/grammar.json";

What gets highlighted

The grammar covers PDDL 3.1 (the variant used by IPC and most current planners), including:

  • Section headers (:requirements, :types, :predicates, :functions, :constants, :init, :goal, :metric, …)
  • Action / durative-action declarations (:action, :durative-action, :parameters, :precondition, :effect, :condition, :duration)
  • Variables (?x, ?y)
  • Logical operators (and, or, not, imply, forall, exists, when)
  • Numeric fluents and arithmetic
  • Comments (;)
  • Numbers and strings

Release (Makefile)

Semver release flow via Makefile. Requires npm login.

| Target | Description | |------------------|------------------------------------------------------------------------------| | make help | List available targets. | | make latest-tag| Print latest semver git tag (vX.Y.Z). Empty if none. | | make next-patch| Print next patch tag without writing anything. Falls back to v0.0.1. | | make tag-patch | Bump package.json patch, commit, create git tag, and push (tree must be clean). | | make build | Build dist/ via tsup. | | make publish | Build then npm publish --access public (scoped package). | | make release | Full flow: tag-patch + publish. | | make clean | Remove dist/. |

Maintenance

The grammar is adapted from jan-dolejsi/vscode-pddl. Upstream may evolve over time; periodically diff syntaxes/pddl.tmLanguage.json from the upstream repo against src/pddl.tmLanguage.json here and resync as needed.

Credits & License

See NOTICE for the full attribution and LICENSE for the MIT terms.