Skip to main content

A basic CLI wrapper around Anthropic's Claude API to help out with terminal issues.

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.

A basic CLI wrapper around Anthropic's Claude API to help out with terminal issues.

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

Features

  • Configurable parameters: change Claude model, 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, set your Anthropic API key as an environment variable.

Usage

usage: ta [-h] prompt [prompt ...]

A helpful terminal GPT.

positional arguments:
  prompt      prompt for the AI model

options:
  -h, --help  show this help message and exit

Examples

> ta unzip a tgz archive
> ta how to exit vim

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.

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.2.0.tar.gz (41.1 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.2.0-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: term_assist-0.2.0.tar.gz
  • Upload date:
  • Size: 41.1 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.2.0.tar.gz
Algorithm Hash digest
SHA256 141af0f7223c6418c9bcc6b53c77886bb904cb0398f7c6e9b41b4eef3d4040d8
MD5 30563f056113505047fbf208ff8095aa
BLAKE2b-256 b5be92543af82731ed816eb5aae02a9f7d238de931003fec43f6f3c26c7638a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: term_assist-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd61db58c1fffef84753f5aefc11e239a21de63baecee06c2da150e6d0d2da3f
MD5 820b7b50a9cd9f1b1c62d43fbab36057
BLAKE2b-256 b7d354b8f696705e12a6f5951b2343724e87e637cde46e41a815e6197457c903

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