Skip to content
/ yo Public
forked from ekkinox/yai

AI powered terminal assistant

License

Notifications You must be signed in to change notification settings

REHICode/yo

 
 

Repository files navigation

🚀 Yo 💬

AI powered terminal assistant.

Intro

Table of contents

Description

Yo is an AI powered assistant for your terminal, unleashing the power of AI to streamline your command line experience.

You can also engage in conversation with it to get help on any topics.

It is already aware of your:

  • operating system
  • distribution
  • username
  • shell
  • home directory
  • preferred editor

You can also give any supplementary preferences to fine tune your experience (see configuration section).

Installation

curl -sS https://raw.githubusercontent.com/ekkinox/yo/main/install.sh | bash

You can also install it from the available releases.

Usage

Yo provides 2 run modes:

  • REPL mode: terminal user interface, made to offer interactive prompts in a loop
  • CLI mode: command line interface, made to perform a single run

REPL mode

yo

This will open a REPL interface, with 2 types of prompts

  • 🚀 exec: will generate a command line to execute for what you're asking
  • 💬 chat: will engage in a discussion to help you the best way possible

You also can use the following keyboard shortcuts:

Keys Description
Navigate in history
tab Switch between 🚀 exec and 💬 chat prompt modes
ctrl+h Show help
ctrl+s Edit settings
ctrl+r Clear terminal and reset discussion history
ctrl+l Clear terminal but keep discussion history
ctrl+c Exit or interrupt command execution

CLI mode

yo list all processes listening on port 8080

This will perform a single run, using your preferred prompt mode.

yo -e show the disk usage of my docker resources

This will perform a single command line generation (enforcing 🚀 exec prompt mode usage with -e).

yo -c generate me a go application example using fiber

This will reply to a single question (enforcing 💬 chat prompt mode usage with -c).

Configuration

At the first execution, Yo will ask you to provide an OpenAI API key.

It will then generate your configuration in the file ~/.config/yo.json, with the following structure:

{
  "openai_key": "sk-xxxxxxxxx",       // OpenAI API key
  "openai_proxy": "",                 // OpenAI API proxy (if needed)
  "openai_temperature": 0.2,          // OpenAI API temperature
  "user_default_prompt_mode": "exec", // user prefered prompt mode: "exec" (default) or "chat"
  "user_preferences": ""              // user preferences, expressed in natural language
}

In REPL mode, you can press ctrl+s to edit settings, they will be hot reloaded once you close your editor.

Examples

Check the examples folder for some use case ideas.

Changelog

See CHANGELOG.

About

AI powered terminal assistant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.3%
  • Shell 2.7%