If you're a tech enthusiast or a developer, the world of chatbots is exciting and ever-evolving, especially with advancements in AI. One of the most intriguing innovations in this space is TGPT, an OpenAI chatbot designed specifically for terminal environments and it doesn't require any API integration.You may also like to read: Email Investigation Using H8mail On Your Linux
Imagine the power of advanced natural language processing at your fingertips, right in your command line interface! TGPT enhances productivity by allowing users to interact with their systems more intuitively—whether you're seeking assistance with coding, accessing documentation, or automating repetitive tasks. In this blog post, we’ll explore the capabilities of TGPT, how to set it up, and the myriad ways it can transform your terminal experience.
What is TGPT?
It is a cross-platform command-line interface (CLI) tool that allows you to use an AI chatbot in your Terminal without requiring API keys. It has multiple providers, such as Blackbox AI, OpenAI, Duckduck Go, Ollama, Groq, etc.
Usage
Usage: tgpt [Flags] [Prompt]
Flags:
-s, --shell Generate and Execute shell commands. (Experimental)
-c, --code Generate Code. (Experimental)
-q, --quiet Gives response back without loading animation
-w, --whole Gives response back as a whole text
-img, --image Generate images from text
--provider Set Provider. Detailed information has been provided below. (Env: AI_PROVIDER)
Some additional options can be set. However not all options are supported by all providers. Not supported options will just be ignored.
--model Set Model
--key Set API Key
--url Set OpenAI API endpoint url
--temperature Set temperature
--top_p Set top_p
--max_length Set max response length
--log Set filepath to log conversation to (For interactive modes)
--preprompt Set preprompt
-y Execute shell command without confirmation
Options:
-v, --version Print version
-h, --help Print help message
-i, --interactive Start normal interactive mode
-m, --multiline Start multi-line interactive mode
-cl, --changelog See changelog of versions
-u, --update Update program
Providers:
The default provider is phind. The AI_PROVIDER environment variable can be used to specify a different provider.
Available providers to use: blackboxai, duckduckgo, groq, koboldai, ollama, openai and phind
Provider: blackboxai
Uses BlackBox model. Great for developers
Provider: duckduckgo
Available models: gpt-4o-mini (default), meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo, mistralai/Mixtral-8x7B-Instruct-v0.1, claude-3-haiku-20240307
Provider: groq
Requires a free API Key. Supports LLaMA2-70b & Mixtral-8x7b
Provider: koboldai
Uses koboldcpp/HF_SPACE_Tiefighter-13B only, answers from novels
Provider: ollama
Needs to be run locally. Supports many models
Provider: openai
Needs API key to work and supports various models. Recognizes the OPENAI_API_KEY and OPENAI_MODEL environment variables. Supports custom urls with --url
Provider: phind
Uses Phind Model. Great for developers
Examples:
tgpt "What is internet?"
tgpt -m
tgpt -s "How to update my system?"
tgpt --provider duckduckgo "What is 1+1"
tgpt --provider openai --key "sk-xxxx" --model "gpt-3.5-turbo" "What is 1+1"
cat install.sh | tgpt "Explain the code"
Installation
You can easily install and set TGPT on your Linux with the following commands
go install github.com/aandrew-me/tgpt/v2@latest
sudo cp ~/go/bin/tgpt /bin/
tgpt -u
Now, you can see the version of TGPT and type your prompts as shown in the example below
tgpt "What is kali linux?"
You can read more about it on Github
If you're passionate about cybersecurity and ethical hacking, and you want to enhance your skills—whether you're a beginner or more experienced—consider registering on Hackersking eLearning. You can earn your first cybersecurity certification, and advanced certifications are also available there.