Skip to content

ag8/tony

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tony: a command-line tool which'll tell ya what yer doin' wrong

Installation instructions

  1. Download fixit.sh:

wget https://raw.githubusercontent.com/ag8/tony/main/fixit.sh

  1. Add the following to your .bashrc file:
shopt -s histverify

tony() {
  # Get the second-to-last command from the history
  LAST_CMD=$(history | tail -n 2 | head -n 1 | sed 's/^[ \t]*[0-9]*[ \t]*//')
  # Execute the last command and capture the output
  CMD_OUTPUT=$(eval $LAST_CMD 2>&1)
  
  OPTIONAL_PARAM=${1:-"DefaultValue"}
  
  # Call the fixit.sh script with the last command and its output as arguments
  ~/fixit.sh "$LAST_CMD" "$CMD_OUTPUT" "$OPTIONAL_PARAM"
}
  1. Make sure your OPENAI_API_KEY environment variable is set

  2. source .bashrc

Usage

Got problems? Ask tony!

alt text

You can also add your own additional information:

alt text

English is the programming language of the future

alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages