Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prmichaelsen/chat
Chat with your computer
https://github.com/prmichaelsen/chat
Last synced: 5 days ago
JSON representation
Chat with your computer
- Host: GitHub
- URL: https://github.com/prmichaelsen/chat
- Owner: prmichaelsen
- Created: 2024-06-06T02:44:47.000Z (7 months ago)
- Default Branch: mainline
- Last Pushed: 2024-10-02T21:07:15.000Z (3 months ago)
- Last Synced: 2025-01-03T22:33:36.963Z (5 days ago)
- Language: TypeScript
- Size: 140 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
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
```sh
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](https://docs.aws.amazon.com/signin/latest/userguide/command-line-sign-in.html).```sh
aws sso login --profile my-profile
```