Skip to main content

An AI assistant for your terminal.

Project description

term-assist

project / repo / mailing list / issues

Code style: black builds.sr.ht status

ℹ️ Note
The canonical project locations are linked above. Other locations are mirrors.

An AI assistant for your terminal.

[screenshot: ta unzip a tgz archive] [screenshot: ta how to exit vim]

Features

  • Works with Anthropic and OpenAI models
  • Configurable parameters: change models, system prompt, response length, and other parameters
  • Automatic environment detection: automatically detects your system and shell environment for accurate responses

Installation

  1. Install pipx

  2. Install term-assist using pipx:

    pipx install term-assist
    
  3. In your terminal, configure your API keys depending on which model(s) you want to use.

Usage

usage: ta [-h] [--version] [--model MODEL] [prompt ...]

term-assist: an AI assistant for your terminal.

positional arguments:
  prompt                prompt for the AI model

options:
  -h, --help            show this help message and exit
  --version             display the program version
  --model MODEL, -m MODEL
                        specify a model to use in the format BRAND:MODEL (overrides the setting in your config file)

Examples

> ta unzip a tgz archive
> ta how to exit vim
> ta --model openai:gpt-4o follow a file as it updates

Configuration

The configuration file is ~/.config/term-assist/config.json and will be created on first run and initialized with default configuration parameters if it does not already exist.

See ~/.config/term-assist/config_default.json for the default configuration.

model

The AI model to use.

This parameter should be set in the format BRAND:MODEL. For example, to use OpenAI's GPT-4o model, set this parameter to openai:gpt-4o.

See ~/.config/term-assist/models.json for available models.

max_tokens

The maximum number of tokens that will be generated for output.

temperature

The amount of randomness injected into the response. Ranges from 0.0 to 1.0.

system_prompt

The system prompt that is given to the model.

This prompt must contain the format strings {system} and {shell}, which the program will replace with information it gathers from your system.

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

term_assist-0.4.0.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

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

term_assist-0.4.0-py3-none-any.whl (34.7 kB view details)

Uploaded Python 3

File details

Details for the file term_assist-0.4.0.tar.gz.

File metadata

  • Download URL: term_assist-0.4.0.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for term_assist-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1662662601d83510d3125bdc98c34c80231f00c52fe2c715517ffa24fb2fedc0
MD5 448fc8100746c93b976c7be8a31aa3cf
BLAKE2b-256 9b00c809a5853f30ce05285cf67b11e377bd35576b033df6fc403d8fee593905

See more details on using hashes here.

File details

Details for the file term_assist-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: term_assist-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 34.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for term_assist-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fc5003f6b09cddfad9dedddee53ad59c1ee44862d4b3fd1aec5a2ed20507e8e
MD5 503d6f2b9c0f7848c26b75765dc9e804
BLAKE2b-256 0f9a91ccc2bb187588c626b9e8355c7bf57519e54196174362830616c04103c9

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