Skip to main content

A useful 0-Shot AI in the terminal

Project description

Terminal-AI

Python Language

PyPI - Version GitHub Maintenance Issues Open

Powershell Bash WinTerm

A zero-shot AI assistant in the terminal, backended by the GROQ AI, for blazing fast responses. The free API key from GROQ can be obtained here

Installation

To install protai, simply run the following command in your terminal:

pip install --upgrade protai

Usage

To use this application, simply run the following command in your terminal:

protai <query>

For example:

ProtAI Demo

[!Note] On first run you will be prompted to enter your free Groq AI API key. You can get one at the Groq AI website.

[!IMPORTANT] You need to have a valid Groq AI API key to use this application.

The application uses the following models:

  • Instant Mode: llama-3.3-70b-versatile for fast, zero-shot inference.

  • Interactive Mode: openai/gpt-oss-120b for multi-turn, zero-shot inference.

Development

To develop for this application, clone the repository and install dependencies using the provided scripts:

git clone https://github.com/protik09/terminal-ai.git
cd terminal-ai
./activate_venv.sh

or

git clone https://github.com/protik09/terminal-ai.git
cd terminal-ai
.\activate_venv.ps1

To generate the wheel and upload to PyPI, we use the following command:

python setup.py upload

[!IMPORTANT] Only the current maintainer has access to the PyPI repository API key. If you wish to contribute, please fork the repository and submit a pull request.

Key Files & Structure

  • protai/protai.py: CLI entry, argument parsing, main logic, reply formatting, error handling.
  • protai/auth.py: API key storage, retrieval, validation, user prompts (uses prompt-toolkit).
  • protai/mygroq.py: GROQ API wrapper (uses requests and orjson).
  • protai/texteffects.py: Terminal output formatting.
  • protai/ismarkdown.py: Markdown detection for replies.
  • protai/__init__.py and VERSION: Version management.

Prerequisites

[!NOTE]

Program Flow Chart

Program Flow Chart

Contributing

Contributions are welcome! If you'd like to contribute to this application, please fork the repository and submit a pull request.

[!WARNING] WSL2 is not supported for development. Please use a native Linux or Windows environment. There are issues with keyring access in WSL2.

License

This application is licensed under the MIT License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

protai-1.1.1.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

protai-1.1.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file protai-1.1.1.tar.gz.

File metadata

  • Download URL: protai-1.1.1.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for protai-1.1.1.tar.gz
Algorithm Hash digest
SHA256 0323185621b79a83e05c99fe3b706b23f615a368dd712e08970417caf6b3cb3f
MD5 b5795d31d97b77047f7f57ad04f20c71
BLAKE2b-256 6d99a01438f4467c448d71c76d75f1e649dbcea93746a44fa856cf812004adca

See more details on using hashes here.

File details

Details for the file protai-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: protai-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for protai-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bc46e452d91cc5f72595d4c90eda71760a8a677c9aaa8d5102fe1ce1acfaf68f
MD5 74fb77578116874252b6cfc61cf0d31e
BLAKE2b-256 00643c58418fa790e3a0eb2b635d461e8790b3d9484e3cfc60d4a059c720d9c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page