Skip to main content

tAI, a terminal AI assistant

Project description

tAI, a terminal AI assistant

tAI is a CLI that helps you with Linux and macOS terminal commands. Just ask it a question, and it will use AI to suggest a command and explain what it does. If you like the suggestion, the script can automatically run the command for you in your terminal.

Demo

Why & What?

  • Github Copilot CLI syntax feels clunky to me
  • Faster than using Gemini, ChatGPT or similar in a browser
  • Simpler to find answers without checking man pages
  • NEW: Support for multiple AI providers (OpenAI, Google, Anthropic, Groq)
  • NEW: Interactive TUI setup using inquirer for provider and model selection
  • NEW: Enhanced terminal UI with rich for better readability and prompts
  • NEW: Now you can run commands right from this command-line interface

However, never trust the output entirely.

Installation

# install pipx (if you don't have it)
brew install pipx
pipx ensurepath

# install TAI
pipx install terminal-ai-assistant

Usage

On your first run, tai will guide you through a quick, interactive setup process to choose your AI provider, select a model from a curated list, and enter your API key. This information will be securely stored in ~/.config/tai/config.json.

Once configured, you can use tai with your queries:

$ tai kill port 3000

# Example output (formatted with rich):
╭────────────────────────────────────────────────── Command ───────────────────────────────────────────────────╮
│ kill $(lsof -t -i :3000)                                                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Execute the command: kill $(lsof -t -i :3000)? [y/n]:

Development

pip install --user pipenv
pipenv --python 3.11
pipenv install

pipenv run tai kill port 3000

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

terminal_ai_assistant-4.0.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

terminal_ai_assistant-4.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file terminal_ai_assistant-4.0.0.tar.gz.

File metadata

  • Download URL: terminal_ai_assistant-4.0.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for terminal_ai_assistant-4.0.0.tar.gz
Algorithm Hash digest
SHA256 c712a0ca6c133178ecc8b06d082d36f6c4a40c625780068fae69d1d3c1c9aaae
MD5 04dfad115d237c56d746e1110106b56f
BLAKE2b-256 efe2f51f0d4110e868d4e6ce1621eca718d7180aa461064d8773c8c420f6d663

See more details on using hashes here.

File details

Details for the file terminal_ai_assistant-4.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for terminal_ai_assistant-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd6c1a96b5d624921e2d7cbbe6a864a08cff4dc248bf9a7f1e93fc33f8ea5b80
MD5 5e48f115fedd9d8802089ff447f6f379
BLAKE2b-256 daf4b09c4376eae59d333ee8ad31720e01d0137080580fc892c4a8cda7296669

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