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

chatterm

v0.0.3

Published

Use ChatGPT in terminal like a pro!

Downloads

2

Readme

Chatterm

PRs Welcome

英文文档

前置条件

必须先有 openai 官方网站的账号,可以通过这个链接注册,https://chat.openai.com/auth/login。

注册完成后获取如下两个 key。

  • API key: https://platform.openai.com/account/api-keys.

  • Organization key: https://platform.openai.com/account/org-settings

在环境变量中导出,方法如下:

export ORGANIZATION="YOUR_ORGANIZATION"
export OPENAI_API_KEY="YOUR_OPENAI_API_KEY"

安装

npm i -g chatterm
# or
yarn global add chatterm

直接运行 chatterm 命令即可。

chatterm

使用方法

单行输入

https://user-images.githubusercontent.com/22005951/227783447-1c7485f0-ca0b-42ac-992c-be7cfa92d08c.mp4

多行输入

可使用 / 获得命令提示,目前仅支持 /mode 命令,用来切换多行输入模式。

切换后 mac、linux 系统会默认使用 vim 进行编辑,因此需要一定的 vim 操作基础(比如至少知道如何保存和退出😏),windows 则会默认使用 notepad 进行编辑。

https://user-images.githubusercontent.com/22005951/227783492-998a5047-876a-49a6-99c6-b3847b9cb8f4.mp4

原理

使用 openai 官方的 open API 实现核心聊天功能,以及 inquirer.js 实现命令行的 UI 工作流。

参与贡献

Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub.