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

@prmichaelsen/chat

v1.0.3

Published

CLI chatbot

Downloads

5

Readme

Chat

Chat with your computer.

chat [...OPTIONS] [input]

Provides a CLI interface to have a conversational chat with your computer.

Supports persisting a conversation to disk and resuming it later.

chat understands each input to be a prompt, a command, a redirection, a file
path, directory, or a glob. Please refer to the examples.

Positionals:
  input  Optional initial input                                         [string]

Control Flow:
  -i, --interactive                                                    [boolean]
  -c, --continue     Resume conversation from recovery file (default: true).
                                                                       [boolean]

File System:
  -r, --read           Resume conversation from file.                   [string]
  -w, --write          Stream conversation to file, overwriting contents.
                                                                        [string]
  -a, --append         Stream conversation to file, appending contents. [string]
      --recovery-path  Output conversation recovery path.              [boolean]
      --clean-all      Clean up all recovery files.                    [boolean]
      --clean          Clean up recovery file for current shell.       [boolean]
  -p, --prune          Prune 400 tokens (approximately one page) of the
                       conversation or specify a number of tokens to prune
                       (default: 400).                                  [number]

Options:
      --tokens   Maximum number of tokens to sample. 400 tokens is approximately
                 one page of text. You can also configure tokens by setting the
                 environment variable CHAT_MAX_TOKENS. (default: 200000, max:
                 200000)                                                [number]
      --version  Show version number                                   [boolean]
      --help     Show help                                             [boolean]

Examples:
  chat -i Hi                       Strike up a friendly conversation.
  chat "Explain the singularity"   Prompt once.
  chat --interactive               Start in interactive mode.
  chat -i src/commands/default.ts  Load contents of file into chat.
  chat -i ./src                    Load contents of files in src.
  chat -i "./src/**/*"             Load contents of files matching glob.
  chat --read convo.md Summarize   Summarize existing conversation.
  chat -i -r convo.md -a convo.md  Resume persisted conversation.
  chat -i -ra convo.md             Shorthand for resume conversation.

  --interactive mode
  :ls .                            Execute ls and print output.
  ::ls .                           Execute ls and summarize output.
  > time.md                        Write conversation to file in -i mode.
  >> time.md                       Append conversation to file in -i mode.
  ./src                            Load contents of files in src.
  ./src/**/*                       Load contents of files matching glob.
  Why is the sky blue?             Prompt without quotes.

Installation

npm i -g @prmichaelsen/chat

Initial Setup

chat is built on AWS Bedrock Claude Anthropic v2 and it requires CLI authentication with an AWS profile authorized to call Bedrock in order to work. See the AWS docs on CLI authentication.

aws sso login --profile my-profile