Coder Social home page Coder Social logo

gptcli's Introduction

GPT CLI

GPT CLI is a versatile command-line tool that enables ChatGPT integration into CLI and Vim environments. It facilitates executing ChatGPT queries from anywhere cli programs can be run, making it easier to analyze or modify code, generate documentation, and more.

Features

  • Environment Variables: Leverages OPENAI_API_KEY for secure API configuration and allows setting OPENAI_DEFAULT_MODEL to choose the desired language model.
  • CLI and Vim Integration: Enhances command-line workflows and Vim editing with direct ChatGPT integration for insights and content generation.

Getting Started

Prerequisites

Set the OPENAI_API_KEY environment variable to authenticate API requests. Optionally, set OPENAI_DEFAULT_MODEL to specify the default language model.

Installation

For Unix-like environments, you can use the install.sh script located in the root of this project:

./install.sh

Usage

Command Line

Direct CLI usage:

chat [prompt]

Piping command output to ChatGPT:

ls | chat explain the following files

Vim Integration

In Visual Mode, you can:

Replace selected text with ChatGPT suggestions:

:'<,'>!chat improve this rust function

Query ChatGPT about selected text without replacement:

:'<,'>w !chat what does this function do

Stay Informed

For the latest build information, see the GitHub Actions build status:

Rust

Leverage GPT CLI to streamline your CLI and Vim interactions through ChatGPT's capabilities.

gptcli's People

Contributors

oranellis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.