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

@etemaro/rugcheck

v1.0.3

Published

SDK for the RugCheck Token Security API

Readme


🚀 Features

  • Full API Coverage: All RugCheck API endpoints implemented with TypeScript types
  • Type Safety: Complete TypeScript definitions for all requests and responses
  • Error Handling: Structured RugCheckError class with status codes and error bodies
  • Timeout Support: Configurable request timeouts with AbortController
  • CLI Included: Ready-to-use command-line interface
  • Zero Dependencies (runtime): Uses native fetch API, no extra HTTP client
  • Production Ready: Comprehensive tests, linting, and type checking

🛠️ Installation

npm install @etemaro/rugcheck

📖 Usage

SDK Usage

import { RugCheckClient, createRugCheckClient } from "@etemaro/rugcheck";

// Using the class
const client = new RugCheckClient({
  apiKey: process.env.RUGCHECK_API_KEY,
  baseUrl: "https://api.rugcheck.xyz",
  timeout: 30000,
});

// Or use the factory function
const client = createRugCheckClient({
  apiKey: process.env.RUGCHECK_API_KEY,
});

// Quick token summary (public)
const summary = await client.tokenSummary("TokenMintAddress");
console.log(`Risk Score: ${summary.score_normalised}/100`);
console.log(`LP Locked: ${summary.lpLockedPct}%`);

// Search tokens
const results = await client.search("bonk", 20);
console.log(results);

// Get full report
const report = await client.tokenReport("TokenMintAddress", true);

// Bulk analysis (requires auth)
const bulkResults = await client.bulkSummary({
  tokens: ["mint1", "mint2", "mint3"],
  cacheOnly: false,
});

// Get verified tokens (requires paid API key)
const verified = await client.verifiedTokens(20);

CLI Usage

# Install globally
npm install -g @etemaro/rugcheck

# Or use via npx
npx @etemaro/rugcheck --help

# Common commands
npx rugcheck summary TokenMintAddress
npx rugcheck search bonk --limit 10
npx rugcheck trending
npx rugcheck verified --limit 20
npx rugcheck lockers TokenMintAddress

With API Key

# Set via environment variable
export RUGCHECK_API_KEY=your-api-key
npx rugcheck summary TokenMintAddress

# Or pass directly
npx rugcheck --api-key your-api-key summary TokenMintAddress

📚 API Reference

Constructor Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiKey | string | undefined | RugCheck API key for authenticated endpoints | | baseUrl | string | https://api.rugcheck.xyz | API base URL | | timeout | number | 30000 | Request timeout in milliseconds |

Token Analysis

tokenSummary(mint, cacheOnly?, refresh?)

Get quick risk summary for a token.

const summary = await client.tokenSummary("TokenMintAddress");
// Returns: TokenSummary

tokenReport(mint, refresh?)

Get full token risk report.

const report = await client.tokenReport("TokenMintAddress", true);
// Returns: Full report object

search(query?, limit?, page?, maxScore?)

Search tokens by name, symbol, or mint address.

const results = await client.search("bonk", 20, 0, 0);
// Returns: TokenSearchResult[]

insidersGraph(mint)

Get insider network analysis.

const graph = await client.insidersGraph("TokenMintAddress");
// Returns: Network graph data

Bulk Operations

bulkSummary(request)

Get summaries for multiple tokens (requires auth).

const summaries = await client.bulkSummary({
  tokens: ["mint1", "mint2", "mint3"],
  cacheOnly: false,
});
// Returns: TokenSummary[]

bulkReport(request)

Get detailed reports for multiple tokens (requires auth).

const reports = await client.bulkReport({
  tokens: ["mint1", "mint2"],
  cacheOnly: false,
});
// Returns: unknown[]

Token Verification

verifiedTokens(limit?, cursor?)

List RugCheck-verified tokens (requires paid API key).

const { tokens, nextCursor } = await client.verifiedTokens(20, "cursor");
// Returns: VerifiedTokensResponse

tokenValidation(mint)

Read token verification state.

const validation = await client.tokenValidation("TokenMintAddress");
// Returns: { mint, validated, website, socials }

verifyEligible(mint)

Check if token is eligible for verification.

const eligibility = await client.verifyEligible("TokenMintAddress");
// Returns: EligibilityResponse

Statistics

statsTrending(), statsRecent(), statsNewTokens(), statsVerified()

Get various token statistics.

const trending = await client.statsTrending();
const recent = await client.statsRecent();
const newTokens = await client.statsNewTokens();
const verified = await client.statsVerified();

Voting

vote(request)

Submit vote for a token (requires auth).

await client.vote({ mint: "TokenMintAddress", side: true });
// side: true = upvote, false = downvote
// Returns: { up, down, userVoted }

votes(mint)

Get voting statistics.

const stats = await client.votes("TokenMintAddress");
// Returns: { up, down, userVoted }

Domains

domains(page?, limit?, verified?)

Get registered .token domains.

const domains = await client.domains(0, 10, true);
// Returns: DomainEntry[]

domainLookup(domain)

Lookup token address for domain.

const result = await client.domainLookup("mytoken.token");
// Returns: { mint: string }

Vaults

lockers(mint), fluxLockers(mint)

Get LP vault information (requires auth).

const lockers = await client.lockers("TokenMintAddress");
// Returns: { lockers: Record<string, LockerInfo>, total: { pct, totalUSDC } }

System

ping(), maintenance(), leaderboard(page?, limit?)

System endpoints.

const pong = await client.ping();
const status = await client.maintenance();
const leaderboard = await client.leaderboard(0, 50);

🔴 Error Handling

import { RugCheckClient, RugCheckErrorClass } from "@etemaro/rugcheck";

const client = new RugCheckClient({ apiKey: process.env.RUGCHECK_API_KEY });

try {
  const summary = await client.tokenSummary("TokenMintAddress");
} catch (error) {
  if (error instanceof RugCheckErrorClass) {
    console.error(`HTTP ${error.status}: ${error.message}`);
    // Handle specific status codes
    if (error.status === 429) {
      // Rate limited - retry with backoff
    }
  } else {
    console.error("Network error:", error);
  }
}

🧪 Development

Setup

# Clone the repository
git clone https://github.com/romankurnovskii/RugCheck-CLI.git
cd rugcheck

# Install dependencies
npm install

Scripts

  • npm run build - Build for production
  • npm run type-check - Run TypeScript type checking
  • npm run test - Run tests with Vitest
  • npm run test:watch - Run tests in watch mode
  • npm run test:coverage - Run tests with coverage
  • npm run lint - Lint code with Biome
  • npm run lint:fix - Fix lint issues with Biome
  • npm run start - Run CLI in development mode

🤝 Contributing

Contributions are welcome! Please open an issue or submit a pull request.

📄 License

MIT © Etemaro

🔗 Links