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

pinestore

v1.0.0

Published

A TypeScript client library for interacting with the Pinestore API, offering type-safe access to projects and packages.

Downloads

7

Readme

🌲 Pinestore Client

A robust and type-safe TypeScript client library for interacting with the Pinestore API. Easily manage and fetch project, user, comment, and changelog data for your applications.

npm version License: MIT TypeScript Prettier Bun

✨ Features

  • Type-Safe API Calls: Full TypeScript support for all API responses and request parameters.
  • Easy to Use: Simple, static methods for common API interactions.
  • Consistent Error Handling: Centralized error reporting for API failures.
  • Zero Dependencies: Lightweight and efficient.

Installation

npm install pinestore

or

bun add pinestore

or

yarn add pinestore

Usage

Here's a quick example of how to fetch project data:

import { Pinestore, Project, Comment, User } from 'pinestore';

async function main() {
  try {
    // Fetch a single project by ID
    const project: Project = await Pinestore.fetchProject(123);
    console.log(`Fetched Project: ${project.name} by ${project.owner_name}`);
    console.log(`Description: ${project.description_short}`);

    // Fetch all projects
    const allProjects: Project[] = await Pinestore.fetchProjects();
    console.log(`Total projects available: ${allProjects.length}`);

    // Search for projects
    const searchResults: Project[] = await Pinestore.searchProjects('my-game');
    console.log(
      `Search for "my-game" returned ${searchResults.length} results.`
    );

    // Fetch comments for a project
    const comments: Comment[] = await Pinestore.fetchComments(project.id);
    if (comments.length > 0) {
      console.log(`First comment on ${project.name}: ${comments[0].body}`);
    } else {
      console.log(`No comments found for ${project.name}.`);
    }

    // Fetch a user by Discord ID
    const user: User = await Pinestore.fetchUser('some_discord_id_here'); // Replace with actual Discord ID
    console.log(`Fetched User: ${user.name}`);
  } catch (error) {
    console.error('An error occurred:', error);
    // You can handle different error types or display user-friendly messages
  }
}

main();

API Reference

The Pinestore class provides static methods to interact with the API. All methods return a Promise.

Data Types (Interfaces)

  • Timestamp: A number representing a Unix timestamp (seconds since epoch).
  • Project: Represents a project, including details like name, owner, descriptions, download information, and various metrics.
  • Comment: Represents a comment on a project, including the author, timestamp, and body.
  • Changelog: Represents a changelog entry for a project, including timestamp and body.
  • UserConnection: Represents an external connection for a user (e.g., GitHub, website).
  • User: Represents a user, including their Discord ID, joined date, and linked connections.

Pinestore Static Methods

  • Pinestore.fetchProject(projectId: number): Promise<Project>
    • Fetches a single project by its ID.
  • Pinestore.fetchComments(projectId: number): Promise<Comment[]>
    • Fetches all comments for a given project ID.
  • Pinestore.fetchChangelog(projectId: number): Promise<Changelog>
    • Fetches the latest changelog entry for a given project ID.
  • Pinestore.fetchChangelogs(projectId: number): Promise<Changelog[]>
    • Fetches all changelog entries for a given project ID.
  • Pinestore.fetchProjects(): Promise<Project[]>
    • Fetches a list of all projects.
  • Pinestore.searchProjects(query: string): Promise<Project[]>
    • Searches for projects based on a provided query string.
  • Pinestore.fetchProjectByName(name: string): Promise<Project>
    • Fetches a single project by its exact name.
  • Pinestore.fetchUser(id: string): Promise<User>
    • Fetches a user by their Discord ID.
  • Pinestore.fetchUserProjects(userId: string): Promise<Project[]>
    • Fetches all projects owned by a specific user (identified by Discord ID).

Development

To set up the development environment and contribute:

# Clone the repository
git clone https://github.com/ivanoliverfabra/pinestore-client.git # Update with actual repo URL
cd pinestore-client

# Install dependencies
bun install # or npm install / yarn install

# Build the library
bun run build # Compiles TypeScript to JavaScript

# Development mode (watches for changes and recompiles)
bun run dev

# Run tests
bun run test

# Lint the code for style and potential errors
bun run lint

# Format the code using Prettier
bun run format

Publishing

To publish a new version to npm:

  1. Ensure all changes are committed and pushed.
  2. Update the version in package.json following semantic versioning.
  3. Make sure you are logged in to npm with the correct account:
    npm login
  4. Publish the package:
    npm publish

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/your-amazing-feature).
  3. Commit your changes (git commit -m 'feat: Add some amazing feature').
  4. Push to the branch (git push origin feature/your-amazing-feature).
  5. Open a Pull Request with a clear description of your changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Ivan Oliver Fabra