A terminal agent for terminal users.
Project description
Terminal-Agent-X
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
totax_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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
terminal-agent-x-0.1.10.tar.gz
(23.8 kB
view details)
Built Distribution
File details
Details for the file terminal-agent-x-0.1.10.tar.gz
.
File metadata
- Download URL: terminal-agent-x-0.1.10.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e8e889bb20a11224a4af99f49b51796ff690c82521c49600dc75825cf328a42 |
|
MD5 | 11ee9610263d5438977052847df9e4c9 |
|
BLAKE2b-256 | 434ca360e11b056a5ca7bb52b7966032c6fc3de4ed5fe19a3c821955abe4fda5 |
File details
Details for the file terminal_agent_x-0.1.10-py3-none-any.whl
.
File metadata
- Download URL: terminal_agent_x-0.1.10-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4037c00bd47cc5cce9a5e2ccf24d18926b599927edd38779340156adaaed3736 |
|
MD5 | 1bd1c3ab649749de80b1e920f21e3786 |
|
BLAKE2b-256 | b5e945e58664555eaf645b9d954ae432b08f7d2f28854265c0781487285d88f7 |