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

@neurotic.cloud/sdk

v2.0.1

Published

SDK for Neurotic API

Readme

Neurotic SDK

The Neurotic SDK provides a convenient way to interact with the Neurotic API, enabling actions, mutations, and queries. This README provides an overview of the SDK's usage and functionality.

Installation

To install the SDK, use npm or yarn:

npm install @neurotic.cloud/sdk

or

yarn add @neurotic.cloud/sdk

Usage

Import the necessary modules:

import { Mode, SDK } from '@neurotic.cloud/sdk';

Configuration

Create an instance of the SDK with your network, API key, and mode (optional):

const sdk = new SDK('network-identifier', 'your-api-key', Mode.Development); // Mode can be 'local', 'development', or 'production'

API Methods

Files

Interact with files in your system:

// Get all files with optional filters, sorting, and selection
const allFiles = await sdk.files().getAll({ filter: [['name', 'like', 'example%']] });

// Get a single file by its ID with optional selection
const file = await sdk.files().getOne(1, { select: ['id', 'name'] });

// Get a list of files with optional filters, sorting, and selection
const files = await sdk.files().getList(0, 100, { filter: [['name', 'like', 'example%']] });

// Get the first file from a list with optional filters, sorting, and selection
const firstFile = await sdk.files().getFirstOfList({ sort: 'created_at' });

// Upload a new file of type File
const uploadedFile = await sdk.files().create(file);

// Update an existing file
const updatedFile = await sdk.files().update(1, { name: 'newName.txt' });

// Delete a file
const deleteResponse = await sdk.files().delete(1);

Dataset

Interact with datasets and records:

// Define a dataset and its collection
const dataset = sdk.dataset('dataset-identifier').collection('collection-identifier');

// Get all records in the dataset with optional filters, sorting, expansion, and selection
const allRecords = await dataset.getAll({ filter: [['status', '=', 'active']], expand: ['relatedData'] });

// Get a single record by its ID with optional expansion and selection
const record = await dataset.getOne('record-id', { expand: ['relatedData'], select: ['id', 'name'] });

// Get a list of records with optional filters, sorting, expansion, and selection
const records = await dataset.getList(0, 100, { filter: [['status', '=', 'active']], sort: 'name', expand: ['relatedData'] });

// Get the first record from a list with optional filters, sorting, expansion, and selection
const firstRecord = await dataset.getFirstOfList({ sort: 'created_at', expand: ['relatedData'] });

// Create a new record
const newRecord = await dataset.create({ name: 'New Record', status: 'active' });

// Update an existing record
const updatedRecord = await dataset.update('record-id', { status: 'inactive' });

// Delete a record
const deleteRecordResponse = await dataset.delete('record-id');

Error Handling

The SDK includes error handling for network issues and API errors. If an error occurs, the error message will be logged to the console, and the response data will be returned.

Example:

try {
  const response = await sdk.files().getOne(1);
  console.log(response);
} catch (error) {
  console.error('An error occurred:', error);
}

Modes

The SDK operates in three different modes:

  • local: Interacts with a local instance.
  • development: Connects to the development server (neurotic.laravel.cloud).
  • production: Connects to the production server (app.neurotic.cloud).

These modes help manage different environments and ensure that the correct API endpoints are used.

Contributing

If you'd like to contribute to the SDK, please fork the repository and use a feature branch. Pull requests are warmly welcome.

License

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