Skip to content

CLI to help programmers by showing them relevant videos to their issues

Notifications You must be signed in to change notification settings

anishfish2/CLIck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Helper with ChatGPT

This is a simple tool that helps you find YouTube videos based on your questions or errors using ChatGPT and the YouTube Data API.

Requirements

  • Go programming language installed.
  • mpv installed and added to the system PATH. You can install it from mpv.io.
  • YouTube Data API key and OpenAI developer key. Place these keys in a .env file in the root directory of the project.

Installation

  1. Clone the repository:

    git clone https://github.com/anishfish2/CLIck.git
  2. Navigate to the project directory:

    cd CLIck
  3. Install dependencies:

    go mod tidy

Usage

Running the program

You can run the program with the following command:

go run main.go

Flags

The program supports the following flags:

  • -query: Specify the error or question you're facing. Default is "Code broken :(".
  • -ask: Whether to ask ChatGPT for help. Default is true.
  • -video: Whether to display the video. Default is false.

Example usage:

go run main.go -query="How do I fix a segmentation fault?" -video=true

How it works

  1. If the -ask flag is set to true, the program uses ChatGPT to generate a search query based on your error or question.
  2. If the -video flag is set to true, the program then uses the YouTube Data API to search for a video related to the generated search query.
  3. It retrieves the video URL and plays the video using mpv.

About

CLI to help programmers by showing them relevant videos to their issues

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages