ianlucas/cs2-lib

A TypeScript library for reading and manipulating Counter-Strike 2 game data

TypeScript

41

935 commits

updated Sep 26, 2026

See the code

README

cs2-lib

A TypeScript library for manipulating Counter-Strike 2 data

This library contains items and data from Counter-Strike 2, including utility functions and classes for interacting with them using TypeScript.

Install

npm install @ianlucas/cs2-lib

Usage

import { CS2Economy, CS2_ITEMS } from "@ianlucas/cs2-lib";
import { english } from "@ianlucas/cs2-lib/translations";

CS2Economy.load({
    items: CS2_ITEMS,
    language: english
});

const item = CS2Economy.getById(307);

item.name;
//=> "AWP | Dragon Lore"

Download asset images

By default the library uses my CDN at cdn.cstrike.app for image URLs. If you need to self-host your content, you can find and download the latest images at cs2-lib-assets repository. Make sure to point the assets base URL to your website:

CS2Economy.load({
    assetsBaseUrl: "https://your-website.com/assets",
    items: CS2_ITEMS,
    language: english
});
counter-strike-2
cs2
typescript

Contributors

ianlucas

874 commits

Andreychik32

2 commits

unicbm

1 commits

ianlucas/cs2-lib

A TypeScript library for reading and manipulating Counter-Strike 2 game data

TypeScript

41

935 commits

updated Sep 26, 2026

See the code

README

cs2-lib

A TypeScript library for manipulating Counter-Strike 2 data

This library contains items and data from Counter-Strike 2, including utility functions and classes for interacting with them using TypeScript.

Install

npm install @ianlucas/cs2-lib

Usage

import { CS2Economy, CS2_ITEMS } from "@ianlucas/cs2-lib";
import { english } from "@ianlucas/cs2-lib/translations";

CS2Economy.load({
    items: CS2_ITEMS,
    language: english
});

const item = CS2Economy.getById(307);

item.name;
//=> "AWP | Dragon Lore"

Download asset images

By default the library uses my CDN at cdn.cstrike.app for image URLs. If you need to self-host your content, you can find and download the latest images at cs2-lib-assets repository. Make sure to point the assets base URL to your website:

CS2Economy.load({
    assetsBaseUrl: "https://your-website.com/assets",
    items: CS2_ITEMS,
    language: english
});
counter-strike-2
cs2
typescript

Contributors

ianlucas

874 commits

Andreychik32

2 commits

unicbm

1 commits

Languages

TypeScript

99.9%