Chat with GPT from the terminal, with the ability to execute shell scripts.

Overview

ChatSH

Chat with GPT from the terminal, and let it execute shell scripts and perform tasks for you. What could go wrong?

Example

Why?

The reason I'm publishing this is that it is extremely useful to me, so I decided to share. Tools like AutoGPT are too heavy and autonomous, and copying contents from ChatGPT web into the command line is cumbersome. ChatSH lets you use ChatGPT directly from the terminal and execute commands suggested by it, making it an extremely powerful productivity tool, even though it is just a thin wrapper around the GPT API.

Usage

  1. Install with npm:
npm install -g chatsh
  1. Add your OpenAI Token to ~/.config/openai.token:
echo "YOUR_OPENAI_TOKEN" > ~/.config/openai.token
  1. Call ChatSH:
chatsh   # using gpt-3.5-turbo
chatsh 4 # using gpt-4
  1. Ask it to do something:
v@v ~/vic/dev/kindex$ chatsh 4
Welcome to ChatSH. Model: gpt-4

$ list all files below this directory that include Nat on its name

# Find all files below the current directory that include "Nat" in their name
find . -type f -iname "*Nat*"

EXECUTE? [y/n]y
./Fin/to_nat.kind2
./Parser/alternative.kind2
./U60/to_nat.kind2
./Bits/to_nat.kind2
./U120/to_nat.kind2

Warning

I think this should be obvious but since I've published it - always read carefully before executing a command. There is a reason there is a confirmation message. GPT could output anything, including commands that do serious harm to your system by accident. You're responsible for checking your commands. You've been warned!

You might also like...

Execute obsidian commands with short key sequences. For example, 'tp' for 'Toggle Preview' and 'tb' for 'Toggle Sidebar'. Easier to remember.

Execute obsidian commands with short key sequences. For example, 'tp' for 'Toggle Preview' and 'tb' for 'Toggle Sidebar'. Easier to remember.

Key Sequence Shortcut Key Sequence Shortcut is an obsidian plugin, allow binding key sequences to an obsidian command. For example If we assume "t" st

Dec 26, 2022

The project is a To-Do list project to help plan daily, weekly or monthly activity. I used Html, CSS and JavaScript Technology to execute the project.

HEAD To Do List This project is geared towards applying acguired skills for development of my porfolio through the following practices: Create

Dec 19, 2022

Basic Implementation of a Contract Wallet in Solidity. The owner can transfer Ether/ERC20 and execute transactions via low-level calls.

Contract Wallet Basic Implementation of a Contract Wallet in Solidity. The owner can transfer Ether/ERC20 and execute transactions via low-level calls

Jun 18, 2022

Tries to execute sync/async function, returns a specified default value if the function throws

good-try Tries to execute sync/async function, returns a specified default value if the function throws. Why Why not nice-try with it's 70+ million do

Dec 8, 2022

A JavaScript Library that allows you to execute function when a certain element gets added to the document

wait-for-it.js A JavaScript Library that allows you to execute function when a certain element gets added to the document Getting Started If you want

Apr 26, 2022

Obsidian text generator Plugin Text generator using GPT-3 (OpenAI)

Obsidian text generator Plugin Text generator using GPT-3 (OpenAI)

is a handy plugin for Obsidian that helps you generate text content using the powerful language model GP

Dec 29, 2022

A simple gpt-3 integration with Logseq

Readme Using GPT-3 in [[logseq]] is actually remarkably easy. The folks over at OpenAI have built a really powerful model with pretty good documentati

Jul 19, 2022

Labels issues using OpenAI's Classification API powered by GPT-3 models!

Labels issues using OpenAI's Classification API powered by GPT-3 models!

OpenAI Issue Labeler ūü§Ė This GitHub action labels issues using OpenAI's Classification API powered by GPT-3 models! We are using curie as our completi

Dec 21, 2022

A plugin for GPT-3 AI assisted note taking in Logseq

A plugin for GPT-3 AI assisted note taking in Logseq

logseq-plugin-gpt3-openai A plugin for GPT-3 AI assisted note taking in Logseq Usage Just type /gpt3 in a block or select gpt3 from the block menu. Se

Jan 3, 2023
Owner
Victor Taelin
Functional-programming enthusiast, author of Kind and HVM.
Victor Taelin
This is a project that is used to execute python codes in the web page. You can install and use it in django projects, You can do any operations that can be performed in python shell with this package.

Django execute code This is a project that is used to execute python codes in the web page. You can install and use it in django projects, You can do

Shinu 5 Nov 12, 2022
Bitcoin terminal tracker is a terminal app which allow you to track bitcoin price from your terminal

BTC Terminal Tracker Bitcoin terminal tracker is a terminal app which allow you to track bitcoin price from your terminal. In this version (V1.2) I ch

Sina yeganeh 9 Jul 27, 2022
A VSCode extension to execute terminal command in multiple directories.

SiteFlex ?? Introduction The emergence of microservices and microfrontends posed a real threat on lazy programmers. Consider this scenario, you have m

CuteTN 3 Sep 6, 2022
A Kubernates Cloud-Shell (Web Terminal) Operator

A Kubernates Cloud-Shell (Web Terminal) Operator. English | Simplified_Chinese Why cloudtty ? Existing project ttyd already provides great feature to

cloudtty-io 307 Dec 27, 2022
Peer-to-peer terminal chat based on DStack

peerchat Peer-to-peer terminal chat based on DStack Recording looks ugly, but in terminal it seems to be fine peerchat Usage Commands Usage $ npm inst

DStack 7 Aug 17, 2022
Chat View let's you quickly and easily create elegant Chat UIs in your Markdown Files.

Obsidian Chat View Plugin Chat View let's you quickly and easily create elegant Chat UIs in your Markdown Files. Usage Every chat message must be pref

Adifyr 96 Dec 27, 2022
Omnichannel Live Chat Widget UI Components offers a re-usable component-based library to help create a custom chat widget that can be connected to the Dynamics 365 Customer Service experience.

Omnichannel Live Chat Widget UI Components @microsoft/omnichannel-chat-widget is a React-based UI component library which allows you to build your own

Microsoft 14 Dec 15, 2022
Replaces Youtube Chat with Destiny.gg chat.

A lightweight extension that replaces the native Youtube Live chat with an embeded destiny.gg chat. Note: This is in no way affiliated with Destiny.gg

Daniel Alas 8 Jul 27, 2022
The Chat'Inn is a simple and minimal realtime chat application whose database is powered by firebase and firestore.

The Chat-in The Chat'Inn is a simple and minimal realtime chat application whose database is powered by firebase and firestore. The frontend part is c

Aswin Asok 11 Aug 8, 2022
O Web-Chat √© um projeto com o intuito de criar um chat de ajuda, que cont√©m uma experi√™ncia din√Ęmica e salva as informa√ß√Ķes preenchidas pelo usu√°rio usando um formul√°rio.

Web-Chat Introdu√ß√£o O Web-Chat √© um projeto com o intuito de criar um chat de ajuda, que cont√©m uma experi√™ncia din√Ęmica e salva as informa√ß√Ķes preenc

BiaGrenzel 5 Oct 5, 2022