# gorsejs

> TypeScript SDK for Gorse recommender system.

Latest version **0.5.0** (published 2025-11-24) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install gorsejs
pnpm add gorsejs
yarn add gorsejs
bun add gorsejs
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2025-11-24 |
| First published | 2022-09-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 83 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Nicolò Veronese |
| Maintainers | zhenghaoz |
| Keywords | typescript, gorse, machine-learning, collaborative-filtering, recommender-system |

## Links

- npm: https://www.npmjs.com/package/gorsejs
- Repository: https://github.com/gorse-io/gorse-js
- npm.io page: https://npm.io/package/gorsejs

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^1.6.2
- [dotenv](https://npm.io/package/dotenv.md) ^16.3.1
- [axios-logger](https://npm.io/package/axios-logger.md) ^2.7.1

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.5.0 (latest) — 2025-11-24
- 0.4.8 — 2023-08-03
- 0.4.7 — 2023-05-07
- 0.4.6 — 2022-11-20
- 0.4.5 — 2022-10-08
- 0.4.4 — 2022-09-27
- 0.4.3 — 2022-09-04

## README

# gorse.js

TypeScript SDK for Gorse recommender system.

[![CI](https://github.com/gorse-io/gorse-js/actions/workflows/ci.yml/badge.svg)](https://github.com/gorse-io/gorse-js/actions/workflows/ci.yml)
[![](https://img.shields.io/npm/v/gorsejs)](https://www.npmjs.com/package/gorsejs)
[![npm](https://img.shields.io/npm/dm/gorsejs)](https://www.npmjs.com/package/gorsejs)

## Install

- Install with npm:

```bash
npm install gorsejs
```
- Install with yarn:

```bash
yarn add gorsejs
```

## Usage

```ts
import { Gorse } from "gorsejs";

const client = new Gorse({
  endpoint: "http://127.0.0.1:8088",
  secret: "gorse",
});

// Insert a user
await client.insertUser({
  UserId: "bob",
  Labels: { role: "dev", lang: "ts" },
  Comment: "frontend developer"
});

// Insert an item
await client.upsertItem({
  ItemId: "repo:vuejs/vue",
  Categories: ["framework", "frontend"],
  Labels: { stars: 100000 },
  Timestamp: "2024-01-01T00:00:00Z",
  Comment: "Vue.js repository"
});

// Insert feedback
await client.insertFeedbacks([
  { FeedbackType: "star", UserId: "bob", ItemId: "repo:vuejs/vue", Value: 1, Timestamp: "2024-01-02T00:00:00Z", Comment: "" },
  { FeedbackType: "star", UserId: "bob", ItemId: "repo:d3/d3", Value: 1, Timestamp: "2024-01-03T00:00:00Z", Comment: "" },
  { FeedbackType: "star", UserId: "bob", ItemId: "repo:moment/moment", Value: 1, Timestamp: "2024-01-04T00:00:00Z", Comment: "" }
]);

// Get recommendations
await client.getRecommend({ userId: "bob", cursorOptions: { n: 5 } });
```

---
_Source: https://npm.io/package/gorsejs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
