PitchHut logo
Run Linux commands using natural language queries.
Pitch

gpt-cli transforms terminal usage by enabling natural language commands. Rather than memorizing syntax, users can simply describe their task, and the tool generates the appropriate Linux command. This approach enhances productivity and accessibility, making command line interactions easier for everyone.

Description

gpt-cli is an innovative command-line integration that empowers users to execute Linux commands using natural language, simplifying the interaction with the terminal. Instead of memorizing command syntax, simply describe the task using intuitive phrasing, such as "show my graphic card" instead of running lspci | grep VGA.

Key Features

  • Natural Language Processing: Experience seamless command execution by translating everyday phrases into accurate Linux commands.
  • Interactive Command Execution: Receive command confirmations before execution to ensure accuracy.
  • Customizable Context and Output Modes: Tailor the system prompt and output modes to suit various use cases, including translating texts or extracting specific information.

Usage Example

To find your graphic card, just type:

user@system:~$ p show me my graphic cards
? Execute.:
lspci | grep -i vga
 (Y/n)  
[Pressing enter confirms execution of this command]

After confirming, the output will display information about the graphic cards installed on your system:

00:02.0 VGA compatible controller: Intel Corporation CometLake-H GT2 [UHD Graphics] (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Ti Mobile] (rev a1)

Customization Options

Context and Output Mode

Modify the system context by setting environment variables like GPT_SYSTEM_PROMPT and change the output mode with GPT_POST to suit specific needs, such as:

export GPT_SYSTEM_PROMPT="I am a translator from polish to english. I need to translate this text.";
export GPT_POST=copy;
p Witaj świecie

Model Selection

Choose your preferred model with the GPT_MODEL environment variable or utilize non-OpenAI models through OPENAI_BASE_URL:

export GPT_MODEL=gpt-4o

Supported Commands and Examples

The gpt-cli can convert simple phrases into complex commands effortlessly. Here are some examples:

Input CommandExecutable Command
show me graphic cardlspci -k
create a backup of mysql db called docsmysqldump docs > docs_backup.sql
list three processes with highest RAM usageps aux --sort=-%mem
generate ed keysopenssl genpkey -algorithm ed25519 -out privatekey.key

Advanced Features

  • Simultaneous output modes: confirmation, copying to clipboard, or direct terminal output.
  • Support for various installation methods including Docker and source compilation.

Considerations

There are specific exceptions for commands containing export or $, as these may not be correctly passed between processes.

gpt-cli enhances productivity and elevates the user experience in terminal interactions by leveraging AI capabilities to interpret and execute commands efficiently.

0 comments

No comments yet.

Sign in to be the first to comment.