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

xscode-sdk

v0.0.11

Published

An npm package to integrate xs:code Chat

Readme

xs:code VSCode chat SDK npm package

If you are developing a VSCode extension, you can easily add xs:code's chat and search features as a built in feature in your extension. xs:code Chat allows your users to chat with xs:code Aces directly from VSCode, and get paid support for any coding problem.

For more information about integrating xs:code into your product, see: https://xscode.com/api-integration

Getting started

First install the package

npm install xscode-sdk

On the extension.ts file add the following code:

import {XScodeChatPanel} from 'xscode-sdk';

To open the chat panel, use the following code:

export function activate(context: vscode.ExtensionContext) {
    // register xscode-sdk
    XScodeChatPanel.registerChat(context);

    context.subscriptions.push(
        vscode.commands.registerCommand('xscodeChat.open', async () => {
            const xsToken: string = context.globalState.get('xsToken') || '';
            const searchTerm: string = context.globalState.get('xsTerm') || '';
            if (!xsToken) {
               XScodeChatPanel.authenticationWithXScode(context);
            } else {
               XScodeChatPanel.createOrShow(context, searchTerm, vendorId);
            }
        }),
        vscode.commands.registerCommand('xscodeChat.close', async () => {
            XScodeChatPanel.unRegisterChat(context);
        })
    );

See "methods" for information about the methods used in this code snippet and their parameters.

For example, to add a hover element to open the chat widget with a mouse click, use this code:

    vscode.languages.registerHoverProvider(
        ['*'],
        new class implements vscode.HoverProvider {
            provideHover(
                _document: vscode.TextDocument,
                _position: vscode.Position,
                _token: vscode.CancellationToken
            ): vscode.ProviderResult<vscode.Hover> {
                const commentCommandUri = vscode.Uri.parse(`command:xscodeChat.open`);
                const contents = new vscode.MarkdownString(`need help? [Chat with an Expert](${commentCommandUri})`);
                contents.isTrusted = true;
                return new vscode.Hover(contents);
            }
        }()
    );

Methods

The are 4 available methods on XScodeChatPanel:

Register

registerChat() will register the xscode-sdk and listen to the response token from authentication.

Syntax: XScodeChatPanel.registerChat(context);

Authentication

authenticationWithXScode()  opens xscode.com for authenticating users.

Syntax: XScodeChatPanel.authenticationWithXScode(context);

Create or show the chat panel

createOrShow() opens the chat panel inside vscode.

Syntax: XScodeChatPanel.createOrShow(context, searchTerm, vendorId);

Parameters:

  • searchTerm - You can pass the searchTerm parameter to open the chat in search mode with the specific keywords. Pass one string with several keywords separated by spaces.If the searchTerm is not passed, the chat will open in its default mode. See "search terms" below for more information.
  • vendorId - To be eligble for revenue sharing, you need to pass a vendor id provided by xs:code. See "Vendor ID" below for more information.

Logout and close the chat panel

unRegisterChat() will log-out the user and close the chat panel.

Syntax: XScodeChatPanel.unRegisterChat(context);

Search terms

The xs:code SDK expects one or more (up to 5) topics of expertise, and will retrieve the best matches for those topics. More topics will retrieve better, more focused results. The topic list is quiet extensive (more than 7,000 topics and growing by the day), and includes most programming languages, frameworks, databases, programming concepts and open source products. We suggest running a few test queries before implementation, to see what results you are getting and adjust the topics (and how many of them you are sending as a query) to fit your specific needs.

Vendor ID and revenue sharing

To be eligible for revenue sharing from users who made purchases via your extension, you'll need to submit a valid vendor id when opening the chat widget with the createOrShow() command.

Please apply for a vendor id at: https://xscode.com/api-partner-registration/

Support

For help with integrating xs:code in your extension, contact support at [email protected]