Skip to content
lucasrafaldiniPublic

About

πŸͺ„ Native macOS Menu Bar app integrating Clipboard History with Oxair-methodology Prompt Engineering Harness. 100% local, Apple Silicon optimized, Ollama-powered.

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Promptera

πŸͺ„ Promptera

Promptera is a native macOS app that lives in your Menu Bar, integrating a Clipboard History Manager with a Prompt Engineering Harness based on the Oxair methodology ("How to Create Your Own AI Prompt Generator That Works Forever").

Promptera runs 100% locally and privately with Metal hardware acceleration on your Apple Silicon (M4) processor using local models via Ollama.

CI Release Swift Platform License

🌐 Idiomas / Languages / Idiomas: English β€’ PortuguΓͺs β€’ EspaΓ±ol


πŸ“Έ Screenshots

Download the latest .dmg in Releases.

Generator β€” Aurora (dark) Clipboard history β€” Ocean (light)
Generator β€” Aurora (dark) Clipboard history β€” Ocean (light)
Settings with 5 color themes β€” Sunset (dark) Generator β€” Aurora (light)
Settings with 5 color themes β€” Sunset (dark) Generator β€” Aurora (light)

🌟 Key Features

1. Direct Menu Bar Access

  • Elegant icon in macOS menu bar (MenuBarExtra native)
  • No Dock pollution (LSUIElement = true)
  • Fast, responsive SwiftUI interface with Dark/Light Mode support
  • Animated tab transitions

2. Integrated Clipboard History

  • Continuous background monitoring of NSPasteboard
  • Searchable history of recent text and code snippets
  • Real-time fuzzy search
  • 1-click to load any item as context for prompt generation
  • 1-click to copy generated Master Prompt back to clipboard
  • Context menu actions (right-click)
  • Automatic persistence between sessions

3. Prompt Creation Harness (Oxair Methodology)

  • Oxair Loop (Generate β†’ Critique β†’ Refine): AI drafts, audits own flaws/implicit assumptions, synthesizes a battle-tested Master Prompt
  • Modular Mode: Adds dynamic variables ({{variable}}) to transform prompt into reusable template
  • Direct Mode: Structured Master Prompt in single pass
  • Domain Presets: Ready-to-use configurations for:
    • πŸ› οΈ Software Engineering β€” Architecture, refactoring, tests, documentation
    • πŸ—οΈ System Design & DevOps β€” Distributed systems, databases, microservices
    • 🧠 Deep Analysis & Reasoning β€” Complex problems, synthesis, decision-making
    • ✍️ Copywriting & Content β€” Persuasive copy, articles, documentation
    • ✨ Universal (Master) β€” Any general objective

4. Optimized for Apple Silicon M4

  • Detects and connects to local Ollama server (http://127.0.0.1:11434)
  • Auto-selects best models for M4 (qwen2.5-coder:7b, llama3.1, phi4-mini, deepseek-coder-v2)
  • Real-time token streaming
  • 100% local β€” no data leaves your Mac

5. Persistent Settings

  • Model, preset, and mode saved automatically
  • Configurable Ollama URL
  • Full Export/Import (JSON)
    • Generated prompts
    • Clipboard history
    • Settings

6. Command Line Interface (CLI)

# Generate from provided text:
swift run promptera "Create a JWT auth microservice in Go"

# Or use current clipboard content:
swift run promptera --clipboard

πŸš€ How to Run

Prerequisites

  • macOS 14.0+ (Sonoma)
  • Ollama installed
  • Recommended models: ollama pull qwen2.5-coder:7b llama3.1 phi4-mini

1. Start Ollama

ollama serve

2. Open App in Menu Bar

# Option A: Build and run directly
swift run PrompteraApp

# Option B: Build native .app
./scripts/build_app.sh
open build/Promptera.app

3. (Optional) Install to /Applications

cp -R build/Promptera.app /Applications/

πŸ§ͺ Tests

# All tests (unit + E2E)
swift test

# Only fast unit tests
swift test --filter "PrompteraKitTests"

# With coverage (requires llvm-cov)
swift test --enable-code-coverage
xcrun llvm-cov export -format="lcov" .build/debug/PrompteraKitTests.xctest/Contents/MacOS/PrompteraKitTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov

πŸ› οΈ Code Structure

promptera/
β”œβ”€β”€ Package.swift                     # Swift Package config
β”œβ”€β”€ Sources/
β”‚   β”œβ”€β”€ PrompteraKit/                 # Core Library (reusable)
β”‚   β”‚   β”œβ”€β”€ Models.swift              # Data models and presets
β”‚   β”‚   β”œβ”€β”€ ClipboardManager.swift    # NSPasteboard monitoring
β”‚   β”‚   β”œβ”€β”€ OllamaClient.swift        # HTTP client with streaming
β”‚   β”‚   β”œβ”€β”€ PromptHarness.swift       # Meta-prompting engine (Oxair)
β”‚   β”‚   └── PrompteraState.swift      # Reactive @MainActor state
β”‚   β”œβ”€β”€ PrompteraApp/                 # macOS App (SwiftUI MenuBar)
β”‚   β”‚   β”œβ”€β”€ PrompteraApp.swift        # MenuBarExtra entry point
β”‚   β”‚   └── Views/
β”‚   β”‚       β”œβ”€β”€ MainMenuView.swift    # Main window with tabs
β”‚   β”‚       β”œβ”€β”€ PromptGeneratorView.swift # Editor, presets, streaming
β”‚   β”‚       └── ClipboardHistoryView.swift # Copy/paste history
β”‚   └── PrompteraCLI/                 # Terminal CLI interface
β”‚       └── main.swift                # Command line executable
β”œβ”€β”€ Tests/
β”‚   └── PrompteraKitTests/            # 63 tests (unit + E2E)
β”œβ”€β”€ scripts/
β”‚   └── build_app.sh                  # Build script for Promptera.app
β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ workflows/                    # CI/CD GitHub Actions
β”‚   └── ISSUE_TEMPLATE/               # Issue templates
└── build/
    └── Promptera.app                 # Compiled app

⌨️ Keyboard Shortcuts

Shortcut Action
⌘⏎ Generate Master Prompt
βŽ‹ Cancel generation
⌘U Use selected clipboard item
⌘⌫ Clear input
⌘C Copy generated prompt

🀝 Contributing

We love contributions! See our Contributing Guide to get started.

Good First Issues

Hacktoberfest

This project participates in Hacktoberfest! Issues tagged with hacktoberfest are ideal for contributions during the event.


πŸ“„ License

MIT License - see LICENSE for details.


πŸ™ Acknowledgments

  • Oxair for the prompt engineering methodology
  • Ollama for amazing local inference
  • Apple for Silicon and native frameworks
  • Swift Community for open source tools

πŸ“ž Support


Made with ❀️ for the Apple Silicon developer community

About

πŸͺ„ Native macOS Menu Bar app integrating Clipboard History with Oxair-methodology Prompt Engineering Harness. 100% local, Apple Silicon optimized, Ollama-powered.

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages