A powerful CLI tool for managing and versioning prompts across projects
Project description
Prompta CLI
Prompta is a self-hosted prompt management system that allows users to create, manage, and version control their prompts. The CLI tool enables users to retrieve their prompts from the Prompta API.
Installation
From PyPI (Recommended)
pip install prompta
From Source
git clone https://github.com/ekkyarmandi/prompta.git
cd prompta/prompta-cli
pip install -e .
Using uv (Development)
git clone https://github.com/ekkyarmandi/prompta.git
cd prompta/prompta-cli
uv pip install -e .
Quick Start
1. Configuration
Configure the CLI using environment variables or a .env file in your project:
PROMPTA_API_KEY=your-api-key-here
PROMPTA_API_URL=http://localhost:8000
Some commands require a valid API key through one of these methods:
PROMPTA_API_KEYenvironment variablePROMPTA_API_KEYin project's.envfilePROMPTA_API_KEYin global variable~/.promptafile--api-keyflag with individual commands
2. Basic Usage
# Check version
prompta --version
# List all available projects
prompta projects
# List prompts with search and filtering
prompta list --query "authentication"
# Download a project by name or ID
prompta get my-project-name
prompta get --project "My Project"
# Download individual prompts
prompta get prompt-name
prompta get {prompt-id}
# View prompt content in terminal
prompta show my-prompt
# Get detailed information about API server status and API_KEY validity
prompta info
Available Commands
prompta projects- List and search projects with filtering optionsprompta get- Download prompts or entire projectsprompta list- List prompts with search and filtering capabilitiesprompta show- Display prompt content in the terminal with syntax highlightingprompta info- Get detailed information about the system
Repository
GitHub: https://github.com/ekkyarmandi/prompta
Contributing
We welcome contributions to the Prompta CLI! Here's how you can help:
Development Setup
-
Fork and clone the repository
git clone https://github.com/your-username/prompta.git cd prompta
-
Set up development environment
# Create virtual environment python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install in development mode uv pip install -e ".[dev]"
-
Run tests
pytest pytest --cov=prompta --cov-report=html # With coverage
Contributing Guidelines
- Issues: Report bugs and request features via GitHub Issues
- Pull Requests: Submit PRs against the
mainbranch - Code Style: Follow Black formatting and include type hints
- Testing: Add tests for new features and ensure existing tests pass
- Documentation: Update documentation for new features
Commit Messages
Follow conventional commit format:
feat: add new command for bulk operationsfix: resolve authentication error handlingdocs: update installation instructionstest: add unit tests for prompt commands
Requirements
- Python: 3.8+
- Dependencies: click, httpx, rich, python-dotenv, tqdm, pydantic
License
Prompta is distributed under the MIT License. See the LICENSE file for more details.
For full documentation and server setup instructions, see the project's main README in the repository root or visit the project website.
Project details
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 prompta-0.3.1.tar.gz.
File metadata
- Download URL: prompta-0.3.1.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
059fae12a647d3b59a35e0f48021cac121edd376fc7e879716ecbf085b163cb2
|
|
| MD5 |
cbfb2d1ac246156e6d6721f720be539e
|
|
| BLAKE2b-256 |
c06d53c4d7d8bc3285cd89b5ed450cf34aa3c7b7b71475b7d63710c58776eeb4
|
File details
Details for the file prompta-0.3.1-py3-none-any.whl.
File metadata
- Download URL: prompta-0.3.1-py3-none-any.whl
- Upload date:
- Size: 24.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28ae9fd6d544706de6f24aa9ad8b6f16b6cc6e4126caf0b07b2327eb4a44e992
|
|
| MD5 |
fa5f3c4cb53d1911d4fa5e9d8528d727
|
|
| BLAKE2b-256 |
b6394a35f9fd83e3e0c3758d7b454ef7af973252cf001e7e83b3d2a3bcf73cd8
|