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

@helixlife-ai/newidea

v0.1.11

Published

CLI for NewIdea AI tools

Downloads

910

Readme

newidea-cli

Newidea AI 平台的命令行工具,面向人类用户和 Agent 使用。

安装

要求 Node.js 20 或更高版本。

npm install -g @helixlife-ai/newidea

安装后,全局命令 newidea 即可使用。

登录授权

newidea login

执行后 CLI 会向后端请求授权链接,提取其中的 session_id 保存到本地(~/.config/newidea/session.txt),并默认自动打开浏览器。授权完成后可运行 newidea status 验证登录状态;如果希望命令等待浏览器授权完成后再退出,可使用 newidea login --wait。后续所有 API 请求都会自动携带 Authorization: Bearer <session_id>

无浏览器环境可使用 newidea login --no-open --json 获取 link_url 后手动打开。

多 Agent 隔离:同一台机器上多个 Agent(如 Cursor、OpenCode)运行时,可通过 --profile <name> 为每个 Agent 创建独立的 session 目录(~/.config/newidea/profiles/<name>/session.txt),避免 session 互相覆盖。授权链接会自动带上 &profile=<name>,授权页面可据此提示当前是哪个 Agent 在申请授权。

newidea login --profile cursor
newidea invocation start ... --profile cursor

如果会话过期(HTTP 401),CLI 会自动清除本地 session 并提示:

您的登录授权已过期,请重新执行 newidea login

支持的命令

登录与状态

| 命令 | 说明 | |------|------| | newidea login | 登录并保存会话 | | newidea logout | 退出登录,清除本地会话 | | newidea status | 查看当前登录状态 |

工具/应用

| 命令 | 说明 | |------|------| | newidea tool list | 分页查询 tools 列表 | | newidea tool list --page 1 --size 10 | 指定页码和每页数量 | | newidea tool list --search "搜索词" | 按工具名称或描述搜索 | | newidea tool categories | 获取应用分类列表 | | newidea skill list --page 1 --limit 20 | 按角色、分类与关键词分页查询 Skill | | newidea skill list --role_id <uuid> --category_id <uuid> --keyword "搜索词" | 筛选 Skill | | newidea skill role | 查询角色、分类及去重 Skill 数 | | newidea skill count | 查询未软删除 Skill 总数及热门 Skill UUID | | newidea skill download <skill-id> | 使用 skill listskill count 返回的 Skill UUID 获取签名下载链接 | | newidea skill downloads --skill-id <uuid> --skill-id <uuid> | 批量去重计数后下载 Skill zip 包 | | newidea skill downloads --skill-id <uuid> -o ./skills.zip | 指定批量下载 zip 输出路径 |

异步执行

| 命令 | 说明 | |------|------| | newidea invocation start <tool-id> --input "你好" | 开始异步执行任务,返回 session_idrun_record_id | | newidea invocation start <tool-id> --input "继续" --session-id <session-id> --parent-record-id <run-record-id> | 复用已有会话并基于父级执行记录继续对话 | | newidea invocation start --input "继续" --continue-last | 使用最近一次本地异步执行记录继续对话 | | newidea invocation start --input "继续" --continue-from <run-record-id> | 使用指定本地异步执行记录继续对话 | | newidea invocation process <run-record-id> | 查询执行进度、最终状态和产物链接 | | newidea invocation progress <run-record-id> | invocation process 的别名 | | newidea invocation list | 查看本地保存的异步执行记录 | | newidea invocation last | 查看最近一次异步执行记录 |

配置管理

| 命令 | 说明 | |------|------| | newidea config set <key> <value> | 设置配置项,持久化到 ~/.config/newidea/config.json | | newidea config get <key> | 获取配置项的解析值(优先级:环境变量 > 配置文件 > 默认值) |

支持的配置项:base-urlapi-urlcompletion-url

历史记录

| 命令 | 说明 | |------|------| | newidea history list | 获取历史执行记录(后端 API 暂不支持) | | newidea history list --starred | 只显示收藏的记录(后端 API 暂不支持) |

JSON 输出模式

所有命令都支持 --json 标志,输出结构化 JSON,便于 Agent 解析:

newidea tool list --json
newidea skill list --json
newidea invocation start <tool-id> --input "你好" --json

环境变量

| 变量 | 说明 | 默认值 | |------|------|--------| | NEWIDEA_BASE_URL | 用户中心基础地址 | https://uc.newidea.pro | | NEWIDEA_API_URL | API 前缀 | https://agent-service.newidea.pro/api/v1 | | NEWIDEA_COMPLETION_URL | 文本生成 API 前缀 | https://uc.newidea.pro/api/v1 | | NEWIDEA_PROFILE | Profile 名称(内部使用,由 --profile flag 自动设置) | - |

开发

npm install
npm run dev -- <command>
# 例如
npm run dev -- tool list --json