Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dota 2 Heroes

A complete list of Dota 2 heroes as of August 2026, with names, primary attributes and image URLs sourced from the Steam CDN.

Install

npm install @jkopsala/dota2-heroes

Usage

JavaScript / TypeScript

import heroes from "@jkopsala/dota2-heroes";

// All heroes
console.log(heroes);

// Filter by attribute
const strengthHeroes = heroes.filter((h) => h.primary_attribute === "strength");

Each hero object has the shape:

{
  id: number;
  name: string;
  primary_attribute: "strength" | "agility" | "intelligence" | "charisma";
  image: string; // Steam CDN URL
}

CLI via npx

# Print all heroes as JSON
npx @jkopsala/dota2-heroes

# Filter by primary attribute
npx @jkopsala/dota2-heroes --attribute=strength

# Find a hero by name (partial, case-insensitive)
npx @jkopsala/dota2-heroes --name=invoker

# Print names only
npx @jkopsala/dota2-heroes --attribute=agility --list

# Help
npx @jkopsala/dota2-heroes --help

Contents

  • heroes.json — 127 heroes, each with id, name, primary_attribute, and image.

Running the tests

Requires Node.js 18 or later (uses the built-in node:test runner and fetch).

node --test heroes.test.js

About

Dota 2 heroes with primary attribute and image, published as npm package

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages