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

cscheck-cs2-sharecode-cli

v0.1.1

Published

Standalone CLI tool to get CS demo download links from share codes (CSCheck fork)

Readme

CSCheck CS2 ShareCode CLI

CSCheck's standalone CLI tool to get Counter-Strike 2 demo download links from share codes. This tool is extracted from the CS Demo Manager project and adapted for the CSCheck ecosystem.

📦 NPM Package: cscheck-cs2-sharecode-cli
🔗 GitHub Repository: sh1dan/CSCheck-cs2-sharecode-cli

Features

  • Extract match information from CS:GO/CS2 share codes
  • Get direct download links for demo files
  • Support for both JSON and human-readable output
  • Validates download link availability
  • Works with both CS:GO and CS2 matches

Prerequisites

  • Node.js 18 or higher
  • Steam must be running and logged in
  • Counter-Strike must be closed during operation

Installation

Install from NPM (Recommended)

Global installation (CLI):

npm install -g cscheck-cs2-sharecode-cli

Then use it anywhere:

cs-sharecode info CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

Local installation (Library):

npm install cscheck-cs2-sharecode-cli

Then import in your code:

import { getDownloadLinkFromShareCode } from "cscheck-cs2-sharecode-cli/lib";

Build from Source

If you want to build from source:

npm install
npm run build
# Or for Windows (includes boiler-writter.exe):
npm run build:win

Usage

CLI Usage

If installed globally via npm:

cs-sharecode info CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
cs-sharecode demo-url CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
cs-sharecode info CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx --json
cs-sharecode info CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx --verbose

Or use with npx (without installing):

npx cscheck-cs2-sharecode-cli info CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

If built from source:

node dist/index.js info CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
node dist/index.js demo-url CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

Library Usage

import { getDownloadLinkFromShareCode, type DownloadResult } from "cscheck-cs2-sharecode-cli/lib";

const result: DownloadResult = await getDownloadLinkFromShareCode("CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx");
console.log(result.demoUrl);

Example Output

Demo URL only (demo-url command):

http://replay382.valve.net/730/003767418281950970048_1750155669.dem.bz2

Human-readable format (info command):

Match ID: 3456789012345678901
Game: cs2
Map: de_mirage
Date: 2024-01-15T14:30:00.000Z
Demo URL: https://replay123.valve.net/730/003456789012345678901_1234567890.dem.bz2
File Name: match_3456789012345678901_de_mirage_2024-01-15.dem
Share Code: CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

JSON format (info command with --json):

{
  "matchId": "3767413896789360699",
  "game": "cs2",
  "mapName": "de_inferno",
  "date": "2025-08-04T20:20:05.000Z",
  "demoUrl": "http://replay382.valve.net/730/003767418281950970048_1750155669.dem.bz2",
  "fileName": "match730_003767418281950970048_1750155669_382",
  "sharecode": "CSGO-tqboe-XUxQS-rieDD-ynNY2-KWtrD"
}

Error Handling

The tool handles various error conditions:

  • Invalid Share Code: The provided share code format is invalid
  • Steam Not Running: Steam must be running and logged in
  • No Matches Found: No match data found for the share code
  • Download Link Expired: The demo download link is no longer valid
  • Communication Errors: Issues connecting to Steam or Valve servers

How It Works

  1. Decode Share Code: Extracts match ID, reservation ID, and TV port from the share code
  2. Connect to Steam: Uses the boiler-writter tool to communicate with Steam's Game Coordinator
  3. Fetch Match Data: Retrieves match information including demo download URL
  4. Validate Link: Checks if the download link is still active
  5. Return Results: Provides match details and download information

Dependencies

This tool uses several key dependencies:

  • csgo-sharecode: For encoding/decoding CS share codes
  • csgo-protobuf: For handling Steam's protobuf messages
  • @akiver/boiler-writter: For communicating with Steam
  • commander: For CLI interface

Limitations

  • Requires Steam to be running and logged in
  • Counter-Strike must be closed during operation
  • Download links may expire after some time
  • Some older matches may not be available

Credits

This tool is based on the excellent work from CS Demo Manager by AkiVer.

License

MIT