A CLI tool for executing tasks using OpenAI's assistant
Project description
Update README.md
Add information about the logout command to your README.md:
## Usage
Run a task:
```bash
termos run --task "Your task description here"
Logout:
termos logout
On first use of termos run, you will be prompted to enter your username and password. The authentication token will be stored for future use. Use termos logout to remove stored credentials.
## 5. Testing the Logout Functionality
To test the logout functionality:
1. Ensure you're logged in by running a task:
termos run --task "Test task"
2. Now, run the logout command:
termos logout
3. You should see a message confirming that you've been logged out.
4. Try running another task. You should be prompted to log in again.
## 6. Error Handling
Consider adding error handling to the logout function. For example:
```python
import os
from pathlib import Path
TOKEN_FILE = Path.home() / '.termos_token'
def logout():
try:
if TOKEN_FILE.exists():
os.remove(TOKEN_FILE)
print("Logged out successfully. Tokens removed.")
else:
print("No active session found.")
except Exception as e:
print(f"An error occurred during logout: {e}")
This will catch any unexpected errors that might occur during the logout process and inform the user.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file termos-0.1.9.tar.gz.
File metadata
- Download URL: termos-0.1.9.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3a527b1c9fdd3c6bf90ae4dd401e7b571280c94fb55d464368c7a04603a9ba7
|
|
| MD5 |
7224af523430c7ddc74ea14f58b3504f
|
|
| BLAKE2b-256 |
5f36d502e473f6faca65f3df4699e8dab34af822e9812f16717df2434e8c0645
|
File details
Details for the file termos-0.1.9-py3-none-any.whl.
File metadata
- Download URL: termos-0.1.9-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c41ed14da080252898bed917dddfa788efce1b480120879edf3dd74904faf461
|
|
| MD5 |
94ce4ddf99bf7605e99e732d356b6da3
|
|
| BLAKE2b-256 |
36a5627c3b9297dafa898aacf8fae48b6ed425772ccd8986209ae037a81e2fe7
|