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

@contextjs/context

v25.1.0

Published

ContextJS - Command-line interface for building and managing ContextJS applications.

Readme

@contextjs/context

Tests npm License

Official CLI for building and managing ContextJS projects.

Features

  • Unified command-line interface for all ContextJS-based projects
  • Fast, extensible project build and watch support
  • Seamless integration with the ContextJS ecosystem
  • Full support for TypeScript compiler flags via ctx build and ctx watch
  • Support for custom compiler extensions via --extensions or context.ctxp
  • Easily scaffold new projects from official templates (see below)

Installation

For the full CLI experience, including templates, install both @contextjs/context and @contextjs/templates globally:

npm install -g @contextjs/context @contextjs/templates

This exposes the ctx command in your terminal, with official templates automatically discovered when you run ctx new.

The @contextjs/templates package is separate so you can install only what you need: just the CLI, just the templates, or both. You can also install it locally in your project if you prefer not to install it globally.
You can also install third-party templates and commands to use, the ContextJS ecosystem is designed to be extensible.

Usage

Display help and available options

ctx

Version

ctx --version
ctx -v

New project (with templates)

Requires @contextjs/templates installed globally.

ctx new webapi myApi
ctx new webapi -n myApi
ctx new webapi --name myApi

If no project name is provided, the current folder name will be used:

ctx new webapi

Build

Build all detected projects:

ctx build

Build specific projects:

ctx build myApi1 myApi2 ...

You can pass TypeScript compiler options directly:

ctx build --noEmitOnError --target ES2022

Use a custom extension for the TypeScript compiler:

ctx build --extensions=./src/my-extension.ts

Or define extensions in context.ctxp:

{
    "compilerExtensions": ["./src/my-extension.ts"]
}

Watch

Watch and rebuild all projects on file changes:

ctx watch

Watch specific projects:

ctx watch myApi1 myApi2 ...

Include TypeScript flags with watch:

ctx watch --moduleResolution NodeNext --strict true

External extensions are supported in watch mode as well:

ctx watch --extensions=./src/my-extension.ts

Project Templates

Templates are provided by the @contextjs/templates package.

  • Install it globally to make all official templates available to the CLI.
  • When you run ctx new ..., templates are automatically discovered and listed.

You can find a list of available templates in the @contextjs/templates README.

Project commands

  • ctx new <template> --name <projectName>: Create a new project using the specified template.
  • ctx build [projectName1 projectName2 ...]: Builds one or more projects
  • ctx watch [projectName1 projectName2 ...]: Watches one or more projects for changes and rebuilds them automatically
  • ctx restore [projectName1 projectName2 ...]: Restores the project dependencies and configurations
  • ctx run [projectName1 projectName2 ...]: Runs the specified projects.
  • ctx --version: Displays the current version of the CLI
  • ctx -v: Alias for --version

Project Structure

When you create a new project using ctx new webapi myapi, the following layout is generated:

myapi/
├── context.ctxp
├── tsconfig.json
├── package.json
└── src/
    └── main.ts

All files are preconfigured to follow ContextJS conventions and integrate cleanly with the rest of the ecosystem.