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

tmio

v1.0.10

Published

Trackmania.io API client

Readme

tmio

A TypeScript client for the Trackmania.io API. Easily fetch data about players, campaigns, clubs, leaderboards, maps, competitions, TOTD (Track of the Day), and COTD (Cup of the Day).

Features

  • Fully typed API responses using TypeBox
  • Supports custom fetch implementations (e.g. Tauri, Bun, etc.)
  • Covers all major endpoints of Trackmania.io

Installation

npm install tmio

Usage

Fetch a seasonal campaign

import { Campaign } from "tmio";

const { data: campaign, err } = await Campaign.fetchSeason("101585");

if (!err) {
    console.log("Fetched campaign:", campaign);
}

Fetch a club by ID

import { Club } from "tmio";

const { data: club, err } = await Club.fetch("150");

if (!err) {
    console.log("Fetched club:", club);
}

Search for clubs

import { Club } from "tmio";

const { data: clubs, err } = await Club.search("arab league");

if (!err) {
    console.log("Found clubs:", clubs);
}

Fetch leaderboard for a map

import { Leaderboard } from "tmio";

const { data: leaderboard, err } = await Leaderboard.fetch(
    "Kn63nCh9bkaRHcZZsrtf_KcLMH2",
    "0676571d-3907-4dcb-8068-df28684e6a03",
    { length: 100, offset: 0 }
);

if (!err) {
    console.log("Leaderboard:", leaderboard);
}

Fetch personal best (requires auth token)

import { Leaderboard } from "tmio";

const { data: personalBest, err } = await Leaderboard.fetchPersonalBest(
    "Kn63nCh9bkaRHcZZsrtf_KcLMH2",
    "0676571d-3907-4dcb-8068-df28684e6a03",
    "Trackmania.io AUTH_TOKEN"
);

if (!err) {
    console.log("Personal best:", personalBest);
}

Fetch map details

import { Map } from "tmio";

const { data: map, err } = await Map.fetch("Kn63nCh9bkaRHcZZsrtf_KcLMH2");

if (!err) {
    console.log("Map details:", map);
}

Fetch Track of the Day

import { TOTD } from "tmio";

const { data: totd, err } = await TOTD.fetch(0);

if (!err) {
    console.log("Track of the Day:", totd);
}

Fetch Cup of the Day

import { COTD } from "tmio";

const { data: cotd, err } = await COTD.fetch(0);

if (!err) {
    console.log("Cup of the Day:", cotd);
}

Fetch competitions

import { Competition } from "tmio";

const { data: competitions, err } = await Competition.fetchCompetitions(0);

if (!err) {
    console.log("Competitions:", competitions);
}

Use a custom fetch implementation (e.g. Tauri)

import { useCustomFetch } from "tmio";
import { fetch as tauriFetch } from "@tauri-apps/api/http";
 
// Set the custom fetch function to Tauri's fetch
useCustomFetch(tauriFetch);

// Now all API calls will use Tauri's fetch instead of the default fetch
Campaign.fetchSeason('101585').then(function(campaign) {
    console.log(campaign);
});

API Coverage

  • Players: fetch by ID, search, group
  • Campaigns: seasonal, weekly, club campaigns
  • Clubs: fetch by ID, search
  • Leaderboards: global, personal bests
  • Maps: fetch by ID
  • TOTD: Track of the Day
  • COTD: Cup of the Day
  • Competitions: details, leaderboard, matches

Type Safety

All responses are validated and typed using TypeBox schemas. See the src/models directory for schema definitions.

License

MIT

Links