open-index/open-npm huggingface dataset:
npm package: @modrinth-ts/lib
Description: TypeScript client for Labirinth, Modrinth's REST API
Latest version: 2.2.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

> [!WARNING]  
> **DEPRECATED**: Use **[@modrinth/api-client](https://github.com/modrinth/code/tree/main/packages/api-client)** instead.

<h1 align="center">
    <img src="https://github.com/modrinth-ts.png" width="75" height="auto">
    <p>@modrinth-ts/lib</p>
</h1>
<p align="center">
    <i>TypeScript client for Labirinth, Modrinth's REST API</i>
</p>

## ⬇️ Installing

```bash
npm install @modrinth-ts/lib
```

```bash
bun add @modrinth-ts/lib
```

```bash
pnpm add @modrinth-ts/lib
```

```bash
yarn add @modrinth-ts/lib
```

## 📦 Importing

### 🧩 SDK

This is the main entry point you should use.

```ts
import * as modrinth from '@modrinth-ts/lib';
```

### 🤝 Underlying client

Use this only when configuring authentication.

```ts
import { client } from '@modrinth-ts/lib/client';
```

> [!IMPORTANT]
> Refer to the [**official Labirinth documentation**](https://docs.modrinth.com/api/) for usage.

> [!IMPORTANT]
> Refer to the [**@hey-api/client-fetch documentation**](https://heyapi.dev/openapi-ts/clients/fetch#auth) for authentication setup.

> [!NOTE]  
> This client is generated using [**@hey-api/openapi-ts**](https://github.com/hey-api/openapi-ts) - consider giving them a star ⭐
npm package: @modrinth-ts/mrpack
Description: TypeScript parser for .mrpack files, Modrinth's modpacks
Latest version: 2.3.1

<h1 align="center">
    <img src="https://github.com/modrinth-ts.png" width="75" height="auto">
    <p>@modrinth-ts/mrpack</p>
</h1>
<p align="center">
    <i>TypeScript parser for .mrpack files, Modrinth's modpacks</i>
</p>

## ⬇️ Installing

```bash
npm install @modrinth-ts/mrpack
```

```bash
bun add @modrinth-ts/mrpack
```

```bash
pnpm add @modrinth-ts/mrpack
```

```bash
yarn add @modrinth-ts/mrpack
```

## 📦 Importing

### 🧩 SDK

This is the main class you should use.

```ts
import { ModPack } from '@modrinth-ts/mrpack';

const modpack = await ModPack.fromUrl('https://modrinth.com/modpack/fabulously-optimized');
const manifest = await modpack.manifest;

console.log(manifest.name); // "Fabulously Optimized"
```

### 📝 Schema

Validate an existing `modrinth.index.json` using the bundled Zod schema and get a typed value.

```ts
import { ModrinthIndexJSONSchema, type ModrinthIndexJSON } from '@modrinth-ts/mrpack/schema';

const rawManifest = await Bun.file('modrinth.index.json').json();
const manifest = ModrinthIndexJSONSchema.parse(rawManifest);

console.log(manifest.name); // "My awesome modpack"
```

## 📖 [Documentation](./DOCS.md) - Complete API reference

> [!CAUTION]
> If you implement an "import ZIP" feature or similar, make sure this field doesn't exit the Minecraft instance directory for security reasons. To do this, make sure it doesn't contain `..` or start with a drive name (i.e., `[A-Z]:/`, `[A-Z]:\`, `/`, and `\`).
> 
> Any files uploaded to Modrinth are validated automatically to ensure they do not contain this.