Skip to main content

Terminal-Agent-X

EN / 中文

Features

  • 👻 Easy installation and usage with a single command.
  • 🎈 Small size, no additional dependencies required.
  • 🐼 Supports English and Chinese on Windows CMD, Powershell, Linux shell, etc.
  • 🤖 Compatible with GPT-3.5/4, DALL·E, Claude and Gemini APIs or the third parties.

Install

pip install terminal-agent-x

Config

You need to add the following environment variable:

export tax_key=sk-xxx
export tax_base_url=YOUR_BASE_URL # optional, default: https://api.openai.com

Get your key from OpenAI or Claude API key from Anthropic and set it as tax_key.

Get Started

You can use the tax <prompt> to interact with the model, like:

$ tax write a python code for fibonacci

Usage

Model Command Description
ChatGPT tax <prompt> Use gpt-3.5-turbo to generate content.
ChatGPT tax <prompt> --code Use gpt-3.5-turbo to generate code. If only one line is generated, it will be executed automatically with your permission.
GPT-4 tax <prompt> -m gpt-4 Use GPT-4 to generate content.
GPT-4 (Vision) tax -i image_path -m gpt-4-vision-preview <prompt> Upload an image and use GPT-4 Vision Preview to chat.
DALL·E 3 tax <prompt> -m dalle Use DALL·E 3 to generate image. Currently, only one 1024x1024 image can be generated at a time.
Claude tax <prompt> -m claude Use Claude to generate content. Use -k your_claude_key if you have set key in the environment variable. Only support single chat now.
Gemini Pro tax <prompt> -m gemini-pro Use Gemini to generate content. Also support -k google_api_key. Only support single chat now.
Gemini Pro (Vision) tax -i image_path -m gemini-pro-vision <prompt> Upload an image and use Gemini Vision to chat. Also support -k google_api_key.
Mode Command Description
Chat with gpt-3.5-turbo tax -m gpt-3.5-turbo -c Chat with gpt-3.5-turbo.
Use a third-party base url and key tax <prompt> -u <base_url> -k <key> The url and key will be use before the environment variable.
Save result to file tax <prompt> -o <output_file> Save response to a file.
Read prompts from file tax --prompt_file <prompt_file> Read prompt from file, one prompt per line. Please ensure tht you have enough quota.
Parallel processing tax -p --prompt_file input.txt -o output.txt --option max_workers=3 --option chat_mode=openai Set more options for parallel processing. For example, --option max_workers=3 means that you can run 3 processes at the same time.

Attention!

You can see a directive after the generated command that says

Do you want to execute the command? (y/n)

Please execute it or not at your own discretion. I am not responsible for the consequences of generated commands.

License

GNU General Public License v3.0

Development Logs

0.1.x

0.1.0

  • Implement basic functions
  • Support for Windows cmd and Linux shell
  • Add --file option for saving the response to a file

0.1.1

  • Add --show_all option for showing all contents of the response.
  • Add --url option for users not under GFW.
  • Add support for Windows Powershell

0.1.2

  • Add Anthropic Claude API Support. Thanks to jtsang4/claude-to-chatgpt. (deprecated in 0.1.5)
  • Add Support for Chinese on Linux and Windows. (also add a temporary solution for VSCode Terminal on Windows).
  • Add a timeout function.
  • Fix: C++ code block prefix.

0.1.3

  • Fix: code block prefix bug (tax will act maybe a little faster).
  • Modify: simplify the code.
  • Test: test for multi-process. Now you can use tax more efficiently in terminal.

0.1.4

  • Feat: Add support for reading prompt from file.
  • Feat: Add support for DALL·E.
  • Fix: Resolve the bug of curl command on Windows platform using IPv6 address to access Claude.

0.1.5

  • Fix: Change api to a third-party proxy. Affected by GFW's DNS domain pollution, the original proxy is temporarily unavailable. claude-to-chatgpt is unavailable.

0.1.6

  • Feat: Add support for Chat on Linux. Now you can use tax as ChatGPT CLI!
  • Feat: Add support for native Anthropic Claude API on Linux Shell, Windows cmd and Powershell.

0.1.7

  • Feat: Add support for parallel processing with mode.

0.1.8

  • Feat: Add support for gpt-4-vision-preview model on all platforms (Beta feature). For example,
    $ tax -i logo.jpg -m gpt-4-vision-preview what is this?
    This appears to be a logo or emblem for something called "Most Creative Learning." The design features a stylized triangular shape, possibly an optical illusion known as a Penrose triangle, ...
    
  • Refactor: Change the way of URL selection and image input.

0.1.9

  • Feat: Update DALL·E to dall-e-3 model.
  • Refactor: Change the name of environment variable from openai_key to tax_key. And some options are also changed. Please check the help message for more details.
  • Fix: Fix the bug of --code option when generating code to file.

Metadata

Release files for terminal-agent-x 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for terminal-agent-x 0.1.10
File Size Uploaded
terminal-agent-x-0.1.10.tar.gz 23.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for terminal-agent-x 0.1.10
File Interpreter ABI Platform
terminal_agent_x-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 45.8 kB

Release files / terminal-agent-x-0.1.10.tar.gz

Download URL terminal-agent-x-0.1.10.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4e8e889bb20a11224a4af99f49b51796ff690c82521c49600dc75825cf328a42
BLAKE2b-256 checksum
How to use checksums
434ca360e11b056a5ca7bb52b7966032c6fc3de4ed5fe19a3c821955abe4fda5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / terminal_agent_x-0.1.10-py3-none-any.whl

Download URL terminal_agent_x-0.1.10-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4037c00bd47cc5cce9a5e2ccf24d18926b599927edd38779340156adaaed3736
BLAKE2b-256 checksum
How to use checksums
b5e945e58664555eaf645b9d954ae432b08f7d2f28854265c0781487285d88f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page