lightweight/neat shortcuts to access llm for daily does, like email assistance, translation
Project description
AI Shortcuts
A powerful tool for creating custom AI-powered shortcuts using OpenAI's API. This application allows you to bind keyboard shortcuts to specific AI prompts and actions.
Features
- 🔌 OpenAI API integration
- ⌨️ Custom keyboard shortcuts
- 📝 Customizable prompts
- 📋 Clipboard integration
- 📦 Environment variable support
Installation
- Clone the repository:
git clone https://github.com/fxyzbtc/pyaishortcuts.git
cd pyaishortcuts
- Install dependencies:
pip install -r requirements.txt
or
uv pip install -r requirements.txt
- Create a
.envfile:
touch .env
- Add your OpenAI API key to
.env:
API_ENDPOINT=https://api.sambanova.ai/v1
API_KEY=xxxxxxxx
MODEL=DeepSeek-R1-Distill-Llama-70B
Configuration
Configuring config.json
The config.json file allows you to customize prompts and keyboard shortcuts. Here's how to modify it:
- Open
config.jsonin your preferred text editor:
code config.json
- Add a new shortcut:
{
"key_binding": {
"shortcut": "ctrl+shift+a"
},
"shortcuts": {
"my_custom_prompt": {
"name": "My Custom Prompt",
"default_prompt": "You are a helpful assistant...",
"parameters": {
"temperature": 0.7,
"max_tokens": 500
}
}
}
}
- Save and close the file.
Configuring .env
- Open
.envin your text editor:
code .env
- Add your OpenAI API key and endpoint:
API_ENDPOINT=https://api.sambanova.ai/v1
API_KEY=xxxx
MODEL=DeepSeek-R1-Distill-Llama-70B
- Save and close the file.
Usage
- Run the application:
# by source code
python main.py
# by package name
python -m pyaishortcuts
# by exe
pyaishortcuts
- Use your keyboard shortcut to trigger the AI action.
Development
Setting up the Development Environment
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On macOS/Linux
# or
.venv\Scripts\activate # On Windows
- Install development dependencies:
pip install -r requirements-dev.txt
Code Style
This project uses:
blackfor code formattingisortfor import sortingflake8for linting
Run the following commands to format and lint your code:
black .
isort .
flake8 .
Contributing
- Fork the repository
- Create a new branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Add your feature description"
- Push to the branch:
git push origin feature/your-feature-name
- Open a Pull Request
License
This project is licensed under the MIT License. See the LICENSE file for details.
Support
- 📫 Report issues on GitHub Issues
- 💬 Ask questions or discuss ideas in the project's discussion forum (if available)
Made with ❤️ using Python
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 pyaishortcuts-0.1.1.tar.gz.
File metadata
- Download URL: pyaishortcuts-0.1.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0adf1d25091006e1efd576dea4627a523e73e683a840bf7fc72185da33bfd1d8
|
|
| MD5 |
1d669fe0b5af41eba8effa9b68b2392d
|
|
| BLAKE2b-256 |
aad9b9fe40b603e7611b2d4d44fe36dedd9dda19d2b1f67f0ae95b953bc2b249
|
File details
Details for the file pyaishortcuts-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pyaishortcuts-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75e676a9efe2a32c5a599499770cbbfdb971eeaaedc9d611080bf06efeaa9a56
|
|
| MD5 |
488d5f5818812711a3e6b96807f70149
|
|
| BLAKE2b-256 |
63faf68d2b3a9728f6d961c746da031628e3ebd14953f054c83d6c42ca87ad76
|