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

@vikacg/js-sdk

v1.0.1

Published

VikACG browser SDK

Readme

@vikacg/js-sdk

VikACG 浏览器 SDK,用于初始化维咔 Web 端点并打开对应的 SMP 应用。

VikACG browser SDK for selecting a VikACG web endpoint and opening the related SMP app.

该包面向浏览器运行时。

This package is designed for browser runtime.

安装 / Installation

npm i @vikacg/js-sdk #npm
yarn add @vikacg/js-sdk #yarn
pnpm add @vikacg/js-sdk #pnpm
bun i @vikacg/js-sdk #bun

快速开始 / Quick Start

import { createVikACGIncetance } from "@vikacg/js-sdk";

const vikacg = createVikACGIncetance("SMPxxxx");

await vikacg.init();

console.log(vikacg.isRead);

vikacg.openMP({
  path: "/pages/index",
  query: {
    from: "web",
  },
});

appID 为必填项。传入 xxxx 或 SMPxxxx 都会被规范化为 SMPXXXX。

appID is required. Both xxxx and SMPxxxx are normalized to SMPXXXX.


实例 API / Instance API

createVikACGIncetance(appID, options?)

创建一个 VikACG JS SDK 实例。

Create a VikACG JS SDK instance.

| 参数 Option | 类型 Type | 默认值 Default | 说明 Description | |---|---|---|---| | appID | string | - | 必填,VikACG/SMP 应用 ID / Required VikACG/SMP app ID |

vikacg.init(options?)

同时请求所有维咔 Web 端点。第一个成功响应的端点会立即成为 selectedEndpoint,未完成的测速请求会被取消。

Requests all VikACG web endpoints concurrently. The first successful endpoint becomes selectedEndpoint immediately, and pending tests are aborted.

成功后 isRead / isReady 会变为 true。

After success, isRead / isReady becomes true.

vikacg.onReady(callback)

在实例已经准备好时异步触发回调;如果还未准备好,则等待 init() 成功后触发。返回值是取消监听函数。

Runs the callback asynchronously when the instance is already ready, or waits until init() succeeds. Returns an unsubscribe function.

vikacg.openMP(options?)

打开 smp:// 对应 APP,并默认在新标签页打开维咔 Web 启动页。

Opens the matching smp:// app and, by default, opens the VikACG web launcher page in a new tab.

smp:// 会通过当前标签页的 window.location.href 唤起;关联 Web 页面会通过 window.open() 打开。

smp:// is launched through window.location.href in the current tab; the related web page is opened with window.open().

smp://SMPxxxx/path?query
https://selected-vikacg-web-origin/mp/SMPxxxx/path?query

MCP 文档 / MCP Docs

启动 VikACG JS SDK 文档 MCP(Model Context Protocol)服务器,为 AI 编程助手提供 API 文档搜索与查询能力。

Start the VikACG JS SDK documentation MCP (Model Context Protocol) server, providing API doc search and query capabilities for AI coding assistants.

pnpm build
node dist/bin/index.js mcp

已安装包的 MCP 配置示例:

MCP configuration for an installed package:

{
  "mcpServers": {
    "vikacg-js-sdk": {
      "command": "vikacg-js-sdk",
      "args": ["mcp"]
    }
  }
}

MCP 服务提供以下工具 / The MCP server provides the following tools:

  • vikacg_search_docs - 按关键词搜索 API 文档 / Search API docs by keyword
  • vikacg_get_doc - 获取指定 API 的详细文档 / Get detailed doc for a specific API
  • vikacg_list_capabilities - 列出可用的 SDK 能力 / List available SDK capabilities