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] [--openai_key OPENAI_KEY] [--model MODEL] [--file FILE] [--url URL] [--default_url] [--claude] [--show_all] prompt [prompt ...]
Description of your program
positional arguments:
prompt Prompt
options:
-h, --help show this help message and exit
--openai_key OPENAI_KEY
Your key for OpenAI, only for one-time request
--model MODEL Model name. You can use all OpenAI models.
--file FILE Output file. If specified, the output will be written to this file. Tax will act like ChatGPT
--url URL URL for API request which can be accessd under GFW. When your network environment is NOT under GFW, you can use OpenAI API directly.
--default_url Use default OpenAI API URL for request.
--claude Use Claude API for request.
--show_all Show all contents in the response
Support
I have tested on Windows 10/11(cmd) and Ubuntu 22.04, it should work on other platforms.
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
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.2.tar.gz
(16.8 kB
view hashes)
Built Distribution
Close
Hashes for terminal_agent_x-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3bfd9e759b411cdb2059db587b4d5e3f160b7998a282033a8d87489a541c459 |
|
MD5 | 5c73c4381de0c41bcd7d22744c87b571 |
|
BLAKE2b-256 | 68ff0d7fd696eec5fbe08ddee895c2868e2f8c7aa025ee81fcc2ef1951b1803b |