Skip to content

leandroroser/linux-copilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Copilot

An intelligent and active terminal application for Linux.

copilot

Linux Copilot is a command-line tool for Linux that enables users to generate editable Linux commands using GPT-3. These commands can be executed on-the-fly as regular commands within the same terminal, providing a pure Linux experience!

One interesting feature of this terminal is its auto-complete functionality. It allows users not only to ask questions but also to edit and execute the generated responses.

Currently, the application was tested in bash and zsh.

Note: This is in state of proof of concept. Expect improvements over time. Note 2: For some reason (cold start?) the first query tends to fail randomly and then the rest of the queries work as expected.

Prerequisites

Before using Linux Copilot, ensure that you have the following prerequisites installed on your Linux system:

  • Python 3.6 or higher
  • Make utility

Installation

  1. Clone the Linux Copilot repository:
git clone https://github.com/your-username/linux-copilot.git
  1. Navigate to the project directory:
cd linux-copilot
  1. Set up the virtual environment and install the dependencies:
make init
  1. Edit the template.env file in the api directory and move it to .env:
nano api/template.env
# edit the file here, it has in addition to the key you should add, two other parameters"
# OPENAI_API_KEY=
# MAX_TOKENS=500
# TEMPERATURE=0.7
mv api/template.env api/.env

Usage

  1. Start the Linux Copilot API server:
source chatenv/bin/activate
make start

This command will start the API that is used by the chat.sh command.

  1. To stop the API server, run:
make stop
  1. In other terminal, start using Linux-Copilot with following command:
./chat.sh

This will launch the interactive chat interface. Ask questions about Linux commands, and Linux Copilot will provide code answers.

Contributions are welcome! Feel free to fork the repository and submit pull requests.This is an ongoing project.


Please refer to the License file for license information.

About

Copilot for the Linux command line

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published