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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rascaljs/ai-cli

v1.0.6

Published

一个结合ollama本地ai模型的前端开发工具。该工具集成了组件和 hooks 生成、提交信息自动化以及代码审查等功能,帮助开发者在保持高代码质量的同时,简化和加速开发流程。

Downloads

4

Readme

@rascaljs/ai-cli

一个结合ollama本地ai模型的前端开发工具。该工具集成了组件和 hooks 生成、提交信息自动化以及代码审查等功能,帮助开发者在保持高代码质量的同时,简化和加速开发流程。

Usage

install

pnpm i @rascaljs/ai-cli -g
ai init
ollama pull <model>
ai setModel -> Choose the model you need

Use command

pnpm ai -h

命令介绍

| 命令 | 作用 | | --------------------- | ------------------------------------------------------------------------------------------------------- | | init | 初始化 AI cli | | set | 设置全局配置键和值。参数: key: 配置键 value: 要设置的值示例: ai set OLLAMA_MODEL llama2:latest | | hooks | 添加新的 Hooks。参数: name: Hooks 的名称示例: ai hooks useCustomHook | | get | 获取全局配置值。参数: key: 要检索的配置键示例: ai get username | | component [path] | 添加新组件。参数: name: 组件名称 path: (可选)添加组件的路径示例: ai component Button src/components | | commit | 生成提交信息。AI 将自动为你生成提交信息。示例: ai commit | | review [path] | 生成代码审查信息。AI 将自动为你生成代码审查信息。(默认审查所有暂存文件)path: (可选)单一审查文件路径示例: ai review | | setHost | 设置 Ollama 服务主机。示例: ai setHost | | setModel | 设置 Ollama 服务模型。示例: ai setModel | | list [available] | 显示 Ollama 模型列表。参数: available: (可选)显示可用模型示例: ai list |

list

list指令使用ollama list api获取本地模型。 list available 显示可用模型,通过axios请求https://ollama.com/library使用cherrio解析html获取模型列表数据。

setHost

通过查询 ollama serve 的 PID拿到该 PID 对应的IP地址和端口设置到配置文件中。