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

@riff-tech/code-checkout-vscode

v1.5.1

Published

Code Checkout support for paid VSCode Extensions

Readme

code-checkout-vscode 🔐

Add professional licensing and paywalls to your VSCode extensions in minutes!

npm version License: MIT

🌟 Features

  • 🔒 Secure license validation with offline support
  • 🎯 Simple command tagging for paid vs. free features
  • 🛡️ Code obfuscation to protect your intellectual property
  • 🌐 Seamless integration with VSCode's extension ecosystem
  • ⚡ Zero-config initialization
  • 🔄 Automatic license validation with offline grace period

🌐 Platform & Tools

code-checkout-vscode is more than just an npm package - it's a complete platform for managing your software licensing:

  • 💼 Create a free account to get started
  • 🖥️ Web Dashboard - Manage licenses, track usage, and view analytics
  • 🛠️ CLI Tools - Powerful command-line interface for automation
  • 📊 Analytics - Track user engagement with your commands

Visit codecheckout.dev to learn more about the full platform capabilities.

🚀 Getting Started

The code-checkout CLI is the recommended method to implement code-checkout into your VSCode extension. There are two ways to use code-checkout:

  • Managed workflow - Use this workflow to make your commands paid features
  • Custom workflow - Use the license and checkout functions directly in your code for more control over paywalls

Initialize Your Project

  1. Install the CLI
npm install -g @riff-tech/code-checkout-vscode-cli

You can use the CLI with code-checkout --help.

  1. Initialize your VSCode extension project
code-checkout init

This will walk you through creating a Publisher & Software, setting up a Pricing Model, linking your Stripe account, and bootstrapping your project to support licensing.

  1. Install the package
npm install @riff-tech/code-checkout-vscode

Managed Workflow

Add the higher-order function and tag your commands as "paid":

import {
  tagCommand,
  injectCheckoutCommands,
  TagOptions,
} from "@riff-tech/code-checkout-vscode";

// 1. Inject code-checkout commands to handle licensing
export const activate = injectCheckoutCommands(
  (context: vscode.ExtensionContext) => {
    // Your original command
    const originalCommand = () => {
      vscode.window.showInformationMessage("Hello World");
    };

    // 2. Specify the tag options
    const tagOptions: TagOptions = {
      type: "paid",
      activationMessage: "This feature is only available in the paid version",
      activationCtaTitle: "Purchase License",
      reactivationMessage: "This feature is only available in the paid version",
      reactivationCtaTitle: "Purchase License",
    };

    // 3. Tag the command
    const paidCommand = tagCommand(context, tagOptions, originalCommand);

    // Register the command as usual
    const disposable = vscode.commands.registerCommand(
      "my-extension.paidCommand",
      paidCommand,
    );

    // Add the disposable to the context
    context.subscriptions.push(disposable);
  },
);

Manual Workflow

Checking License Status

You can use the getLicense function to check license status directly:

import { getLicense } from "@riff-tech/code-checkout-vscode";

// Get license data
const licenseData = await getLicense(context);

if (licenseData?.isValid) {
  // License is valid
  vscode.window.showInformationMessage(
    `License valid until ${licenseData.expiresOn}`,
  );
} else {
  // No valid license
  vscode.window.showWarningMessage("No valid license found");
}

// Force online validation
const validatedLicense = await getLicense(context, true);

// Check expiration
if (validatedLicense?.isExpired) {
  vscode.window.showErrorMessage("Your license has expired");
}

The getLicense function returns a LicenseData object containing:

  • isValid: Whether the license is currently valid
  • licenseKey: The active license key if one exists
  • isExpired: Whether the license has expired
  • isOnlineValidationRequired: If online validation is needed
  • lastValidated: When the license was last validated
  • machineId: Unique identifier for the current machine

Getting the Checkout URL

You can use the getCheckoutUrl function to get the checkout URL for your software:

import {
  getCheckoutUrl,
  CheckoutUrlOptions,
} from "@riff-tech/code-checkout-vscode";

// 1. Optional - set custom success and cancel URLs
const checkoutUrlOptions: CheckoutUrlOptions = {
  customSuccessUrl: "https://example.com/success", // defaults to codecheckout.dev/activate
  customCancelUrl: "https://example.com/cancel", // defaults to redirect back to IDE
};

// 2. Generate the checkout URL
const checkoutUrl = await getCheckoutUrl(context, checkoutUrlOptions);

// 3. Open the checkout URL in the default browser
await vscode.env.openExternal(vscode.Uri.parse(url));

When using custom URLs, the following query parameters will be appended:

  • key= - the license key (only for success URL)
  • ideName= - the app scheme of the IDE (vscode, cursor, etc)
  • id= - your extension ID

Example:

https://example.com/success?key=1234567890&ideName=vscode&id=publisher.my-extension

🛡️ Security Considerations

  • Code obfuscation is provided but not encryption
  • Obfuscation can be disabled by removing the code-checkout-build postcompile script
  • We recommend implementing additional security measures for highly sensitive code

📝 License

MIT © Riff Tech, LLC

🌟 Support


Made with ❤️ for the VSCode developer community