A terminal agent for terminal users.
Project description
Terminal-Agent-X
Install
pip install terminal-agent-x
Config
You need to add the environment variable OpenAI_KEY
to the path.
# On Linux
vim ~/.bashrc
# add this line to the end of the file
export OpenAI_KEY=sk-xxx
# save and execute
source ~/.bashrc
# For Windows, you can google how to set environment variables on Windows.
Use python -c "import os;print(os.environ.get('OpenAI_KEY'))"
for testing.
You can get your OpenAI_KEY
from OpenAI.
Get Started
You can use the tax <prompt>
to interact with the model, like this:
tax write a python code for fibonacci
Use tax -h
to get more information.
usage: tax.py [-h] [-k KEY] [--model MODEL] [-i INPUT] [-o OUTPUT] [--url URL] [--show_all] prompt [prompt ...]
Tax: A terminal agent using OpenAI/Claude API
positional arguments:
prompt Prompt
options:
-h, --help show this help message and exit
-k KEY, --key KEY Your key for OpenAI/Claude.
--model MODEL Model name. Choose from gpt-3.5/4s, claude or DALLE.
-i INPUT, --input INPUT
Input file. If specified, the prompt will be read from the file.
-o OUTPUT, --output OUTPUT
Output file. If specified, the response will be saved to the file.
--url URL URL for API request. Choose from ['openai_gfw', 'openai', 'claude'] or your custom url. The default one can be
accessd under GFW.
--show_all Show all contents in the response.
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.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.
- 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 OpenAI DALL·E.
- Fix: Resolve the bug of curl command on Windows platform using IPv6 address to access Claude.
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.4.tar.gz
(17.7 kB
view hashes)
Built Distribution
Close
Hashes for terminal_agent_x-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2d8e4c68936483677aeb819a5d08bf93d24ee35dec59ae4dd6f0b992258aab5 |
|
MD5 | cecd3b09e3792d5d5f094373777bc9b0 |
|
BLAKE2b-256 | 223bba64665f9a2c352871f6205070c79caadfbd8dc326b72027cfbab96339ad |