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

@cubie-ai/plugin-jupiter

v0.1.1

Published

Plugin Jupiter: A MAIAR plugin that wraps the jupiter api

Downloads

5

Readme

@cubie/plugin-jupiter

This package is part of the Cubie plugin repository for the (Maiar)[https://maiar.dev] ecosystem, designed to work seamlessly with @maiar-ai/core.

Documentation

For detailed documentation, examples, and API reference, visit: https://maiar.dev/docs

Configuration

The Jupiter plugin requires the following configuration

interface PluginJupiterConfig {
  apiKey?: string; // Your jupiter x-api-key
  store?: (tokens: JupiterTokenResponse[]) => Promise<void>; // An optional method for storing the remote token list to a internal database/store
  load?: (params: LoadJupiterTokenParams) => Promise<JupiterTokenResponse[]>; // An optional method to load and search the synced token list by token name and symbol
}

Required Configuration

All the configurations fields are optional

Optional Configuration

  • apiKey: This is your Jupiter x-api-key. Optional (default: '')
  • store: A function that accepts a list of JupiterTokenResponse objects and stores them in a database or filesystem
  • loader: A function that accepts an object {name?: string, symbol?: string} that can be used to search the tokens stored by store()

Plugin Information

Actions

  • get_contract_address: Get the contract address of a token when provided the token name or symbol. This method requires that JupiterService was provided with store and loader methods
  • get_quote: Fetch a quote between 2 input mints when provided with an amount. The swapDirection in this method may be inferred due to the nature of the users request.
  • get_price: Get the price of a list of input mints with an optional vsToken that can be supplied to use as the base of the price (default: usd).
  • get_token_info: Get standard token info when supplied with a contract / mint address.

For more detailed examples and advanced usage, visit our documentation.

Examples

Creation

First you create a storage/loader functions for the token information. In this example we are mocking up a memory store.

const memoryStore: JupiterTokenResponse[] = [];

// mock a storage function to store data
async function storeData(data: JupiterTokenResponse[]) {
  memoryStory.push(...data);
}

// mock a loader function from an external storage source
async function loadData(params: LoadJupiterTokenParams) {
  return (
    params &&
    memoryStory.filter(
      (token) =>
        (params.name &&
          token.name.toLocaleLowerCase() === params.name.toLocaleLowerCase()) ||
        (params.ticker &&
          token.symbol.toLocaleLowerCase() ===
            params.ticker.toLocaleLowerCase())
    )
  );
}

Then you want to initialize your agent runtime, and pass the storeData() and loadData() methods into the new PluginJupiter() call.

import { createRuntime } from "@maiar-ai/core";

// Import providers
import { OpenAIProvider } from "@maiar-ai/model-openai";
import { SQLiteProvider } from "@maiar-ai/memory-sqlite";

// Import all plugins
import { PluginTextGeneration } from "@maiar-ai/plugin-text";
import { PluginTime } from "@maiar-ai/plugin-time";
import { PluginCharacter } from "@maiar-ai/plugin-character";
// Create and start the agent
const runtime = createRuntime({
  model: new OpenAIProvider({
    model: "gpt-4o",
    apiKey: process.env.OPENAI_API_KEY as string,
  }),
  memory: new SQLiteProvider({
    dbPath: path.join(process.cwd(), "data", "conversations.db"),
  }),
  plugins: [
    new PluginTextGeneration(),
    new PluginTime(),
    new PluginCharacter({
      character: fs.readFileSync(
        path.join(process.cwd(), "character.xml"),
        "utf-8"
      ),
    }),
    new PluginJupiter({
      store: storeData,
      load: loadData,
    }),
  ],
});

Now you can start your agents and test it out.

// Start the runtime if this file is run directly
if (require.main === module) {
  console.log("Starting agent...");
  runtime.start().catch((error) => {
    console.error("Failed to start agent:", error);
    process.exit(1);
  });

  // Handle shutdown gracefully
  process.on("SIGINT", async () => {
    console.log("Shutting down agent...");
    await runtime.stop();
    process.exit(0);
  });
}

Demo

Video

https://github.com/user-attachments/assets/56f3a360-0633-40ed-a48a-e72a52a4c093

Running the demo

Start by creating an .env file with 2 properties

Configuration

OPEN_API_KEY=
TELEGRAM_BOT_TOKEN=

Installation

Next you need to install the dependencies:

pnpm install

Running the project

Run the project with

pnpm start