Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Global hotkeys enable AI-powered text processing from anywhere.

License

astordu/prompt_go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Prompt GO - Instant AI Prompt Access, No Window Required

A lightweight local prompt management software based on Python, enabling AI text processing from anywhere through global hotkeys

Python 3.8+ License: MIT Code style: black

πŸ“– Project Introduction

Prompt Manager is a local AI tool designed to enhance text processing efficiency. Users can select text in any application, trigger AI model processing through preset global hotkeys, and output results in real-time to the current cursor position. No need to switch applications or manually copy-paste, achieving a truly seamless AI collaboration experience.

✨ Core Features

  • Global Hotkeys: Ctrl+Shift+1/2 one-click trigger, supports arbitrary custom key combinations
  • Smart Text Selection: Automatically captures currently selected text content
  • Real-time Output: AI responses stream character by character to cursor position
  • Zero Switching: No need to leave the current application, maintaining workflow continuity
  • Local Processing: All processing done locally, protecting privacy and security
  • Flexible Templates: Uses Markdown format prompt templates with variable substitution support

🎬 Demo Showcase

Watch these animated demonstrations to see Prompt GO in action:

πŸ“ Content Organization Demo

Content Organization Demo

🌐 Translation Demo

Translation Demo

⚑ mermaid Demo

Real-time Processing Demo

πŸš€ Quick Start

πŸ“‹ System Requirements

  • Python: 3.8 or higher
  • Operating System: macOS 10.14+, Windows 10+, Linux (Ubuntu 18.04+)

πŸ› οΈ Mac System Permission Setup

Using this software on macOS requires enabling terminal accessibility permissions:

System Preferences Accessibility Settings

Setup Steps:

  1. Open "System Preferences" β†’ "Security & Privacy"
  2. Click the "Privacy" tab
  3. Select "Accessibility" from the left sidebar
  4. Click the lock icon to unlock settings
  5. Check the "Terminal" app (or Python app)
  6. Restart the program to use normally

πŸ› οΈ Installation Steps

# 1. Clone the project
git clone https://github.com/astordu/prompt_go.git
cd prompt_go

# 2. Install dependencies (recommended uv)
uv sync
# or use pip
pip install -r requirements.txt

# 3. Configure API key
cp config/global_config.example.yaml config/global_config.yaml
# Edit config/global_config.yaml and enter your API key (currently only supports deepseek)

# 4.Configure hotkeys 
cp config/hotkey_mapping.example.yaml config/hotkey_mapping.yaml

# 5. Start the program
uv run python main.py

πŸ”‘ Get API Key

Deepseek API

  1. Visit Deepseek Platform
  2. Register an account and create an API key
  3. Configure in config/global_config.yaml:
api:
  deepseek:
    base_url: https://api.deepseek.com
    key: 'sk-your-deepseek-api-key'
    model: deepseek-chat

🎯 5-Minute Experience

  1. Start Program: uv run python main.py
  2. Select Text: Select a piece of text in any application
  3. Trigger AI: Press Ctrl+Shift+1 (content organization) or Ctrl+Shift+2 (translation)
  4. View Results: AI processing results will automatically insert at cursor position

πŸ“ Project Details

File Structure

prompt_go/
β”œβ”€β”€ main.py                      # Main program entry
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ global_config.yaml      # Global configuration (API keys, etc.)
β”‚   β”œβ”€β”€ hotkey_mapping.yaml     # Hotkey mapping
β”‚   └── *.example.yaml          # Configuration templates
β”œβ”€β”€ prompt/                     # Prompt template directory
β”‚   β”œβ”€β”€ tidy_content.md         # Content organization template
β”‚   └── translate.md            # Translation template
β”œβ”€β”€ modules/                   # Core functionality modules
└── tests/                     # Test suite

Basic Configuration

Global Configuration (config/global_config.yaml)

api:
  deepseek:
    base_url: https://api.deepseek.com
    key: 'sk-your-deepseek-api-key'
    model: deepseek-chat
    max_tokens: 2000
    temperature: 0.7

logging:
  level: INFO
  file: prompt_manager.log
  max_size: 10485760  # 10MB
  backup_count: 5

performance:
  typing_speed: 0.005      # Typing speed (seconds/character)
  hotkey_response_timeout: 0.5
  template_cache_enabled: true

Hotkey Mapping (config/hotkey_mapping.yaml)

hotkeys:
  ctrl+shift+1: tidy_content.md        # Content organization
  ctrl+shift+2: translate.md           # Translation function

settings:
  enabled: true
  response_delay: 100  # Response delay (milliseconds)

Template Creation

Create .md files in the prompt/ directory:

model: deepseek,deepseek-chat
temperature: 0.3
max_tokens: 2000

---

You are a professional translation assistant. Please translate the following text into English, maintaining the original tone and format:

{{input}}

Please provide accurate, natural translation, paying attention to contextual coherence.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

Thanks to the following open source projects:

  • pynput - Cross-platform keyboard monitoring
  • pyperclip - Clipboard operations
  • PyYAML - YAML parsing
  • pytest - Testing framework
  • uv - Python package management

⭐ If this project helps you, please give it a star!

πŸ› Found an issue? Submit Issue | πŸ’‘ Have suggestions? Start Discussion

Made with ❀️ for the AI community

About

Global hotkeys enable AI-powered text processing from anywhere.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages