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

@ray-inner/cli-core

v0.3.1-alpha.8

Published

Core library for Raydium CLI: Zod schemas, error catalog, signer, rpc pool, config

Readme

@ray-inner/cli-core

License: GPL v3+ npm version

Core library for the Raydium CLI. Provides the Zod SSOT (single source of truth) for command schemas, the service layer that wraps @raydium-io/raydium-sdk-v2, an error catalog, and the four-path agent tool registry (MCP / OpenAI / Anthropic / JSON Schema).

Consumed transitively by @ray-inner/cli (the human-facing terminal CLI) and @ray-inner/mcp (the MCP stdio server). You can also import it directly for programmatic Raydium access with end-to-end type safety.


Installation

Most users do not install this package directly — it ships as a dependency of @ray-inner/cli and @ray-inner/mcp. For third-party Node.js integrations (Persona Carol in the PRD), install explicitly:

npm install @ray-inner/cli-core
# or
pnpm add @ray-inner/cli-core

Requirements: Node.js ≥ 20 LTS, TypeScript ≥ 5.0 (if using types).


Dual ESM + CJS Entry Points

Both module systems are supported via conditional exports in package.json.

ESM:

import { z, PoolListInput, RaydiumCliError, CODES } from '@ray-inner/cli-core';
import { listPools } from '@ray-inner/cli-core/services/pool';
import { Config } from '@ray-inner/cli-core/config';

CommonJS:

const { PoolListInput, RaydiumCliError, CODES } = require('@ray-inner/cli-core');
const { listPools } = require('@ray-inner/cli-core/services/pool');
const { Config } = require('@ray-inner/cli-core/config');

Public Surface

Granular subpath exports keep bundle size tight. Import only what you need.

| Subpath | What you get | | ------------------------------------- | ----------------------------------------------------------------------------------------- | | @ray-inner/cli-core | Root barrel: schemas, errors, signer, rpc, config, getSdkVersion | | @ray-inner/cli-core/schemas | All Zod input/output schemas (pool, swap, cpmm, clmm, launchpad, wallet, tx, config, farm, amm, portfolio, sol, token, market) | | @ray-inner/cli-core/schemas/<domain>| Per-domain schemas, e.g. schemas/swap, schemas/clmm | | @ray-inner/cli-core/errors | RaydiumCliError, error CODES, CATALOG, mapSdkError, deriveExitCode | | @ray-inner/cli-core/signer | Signer factories: inline / external / file / pubkey / agent | | @ray-inner/cli-core/rpc | RPC endpoint pool + p-retry failover | | @ray-inner/cli-core/config | Config persistence (AES-256-GCM keystore) + KeychainConfig | | @ray-inner/cli-core/services/pool | listPools, getPoolInfo, searchPools | | @ray-inner/cli-core/services/swap | tradeV2 aggregator, quote cache, slippage policy | | @ray-inner/cli-core/services/cpmm | CPMM quote/swap/add/remove/create/collect-fee | | @ray-inner/cli-core/services/clmm | CLMM positions/info/open/increase/decrease/close/harvest/swap/lock/create/init-reward/collect-reward/set-reward | | @ray-inner/cli-core/services/launchpad | Bonding-curve info/create/buy/sell/claim-vesting/collect-creator-fee | | @ray-inner/cli-core/services/wallet | create / import / balance / address / transfer / unlock / lock / status / list / use | | @ray-inner/cli-core/services/tx | decode, simulate, send, getStatus, refreshBlockhash | | @ray-inner/cli-core/services/config | getConfigValue, setConfigValue, lockConfig, unlockConfig, describeConfigKeys | | @ray-inner/cli-core/services/schema | Dump the agent tool registry (mcp / openai / anthropic / jsonschema) | | @ray-inner/cli-core/services/farm | Farm info/list/deposit/withdraw/harvest/create/restart-reward/add-reward/withdraw-reward | | @ray-inner/cli-core/services/amm | AMM v4 info/add/remove/swap/create/migrate/create-with-market | | @ray-inner/cli-core/services/portfolio | scanPortfolio, harvestAll | | @ray-inner/cli-core/services/sol | wrapSol, unwrapSol | | @ray-inner/cli-core/services/token | resolveToken, searchTokens, getTokenInfo | | @ray-inner/cli-core/services/market | createMarket | | @ray-inner/cli-core/services/meta | getCapabilities — live tool count + domain capability map | | @ray-inner/cli-core/agent/* | Four-path tool adapters: mcp-tools, openai-tools, anthropic-tools |


Quickstart

import { PoolInfoInput } from '@ray-inner/cli-core/schemas';
import { getPoolInfo } from '@ray-inner/cli-core/services/pool';
import { RaydiumCliError, CODES } from '@ray-inner/cli-core/errors';

// 1. Validate caller input at the boundary (recommended Zod pattern).
const input = PoolInfoInput.parse({ poolId: 'Hp4kNR5...' });

// 2. Inject your own `RaydiumClient` adapter (or reuse the SDK loader
//    from services/pool/ports). Dependency injection keeps the domain
//    layer free from I/O — required for testability.
const client = /* RaydiumClient adapter */;

try {
  const info = await getPoolInfo(client, input);
  console.log(info.spotPrice, info.tvlUsd);
} catch (err) {
  if (err instanceof RaydiumCliError && err.code === CODES.POOL_NOT_FOUND) {
    // structured error — use `err.category` / `err.retryable` / `err.suggestion`
  }
  throw err;
}

Design Notes

  • Immutable everywhere: every schema and every service output is frozen. Mutations must go through new-object construction.
  • Fail loud: required inputs never silently default. readEnvConfig throws on missing RPC endpoints; Config.unlock throws on password mismatch.
  • Amounts as lamports: all on-chain amounts cross boundaries as z.string().regex(/^\d+$/). UI formatting is the caller's job.
  • SDK pinned: @raydium-io/raydium-sdk-v2 >= 0.2.35-alpha (see sdk-version.ts). Each release notes the SDK commit SHA.

License

Distributed under the GNU General Public License v3.0 or later (GPL-3.0-or-later).

Because Raydium SDK v2 itself is GPL-3.0, anything consuming @ray-inner/cli-core inherits GPL's copyleft obligations. If that's incompatible with your project, the PRD reserves an HTTP-proxy path (R5 Path B) as a future escape hatch — not available in v0.1.x.

Links