Skip to main content

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:

  1. PROMPTA_API_KEY environment variable
  2. PROMPTA_API_KEY in project's .env file
  3. PROMPTA_API_KEY in global variable ~/.prompta file
  4. --api-key flag 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 options
  • prompta get - Download prompts or entire projects
  • prompta list - List prompts with search and filtering capabilities
  • prompta show - Display prompt content in the terminal with syntax highlighting
  • prompta 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

  1. Fork and clone the repository

    git clone https://github.com/your-username/prompta.git
    cd prompta
    
  2. 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]"
    
  3. 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 main branch
  • 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 operations
  • fix: resolve authentication error handling
  • docs: update installation instructions
  • test: 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

prompta-0.3.1.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prompta-0.3.1-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

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

Hashes for prompta-0.3.1.tar.gz
Algorithm Hash digest
SHA256 059fae12a647d3b59a35e0f48021cac121edd376fc7e879716ecbf085b163cb2
MD5 cbfb2d1ac246156e6d6721f720be539e
BLAKE2b-256 c06d53c4d7d8bc3285cd89b5ed450cf34aa3c7b7b71475b7d63710c58776eeb4

See more details on using hashes here.

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

Hashes for prompta-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 28ae9fd6d544706de6f24aa9ad8b6f16b6cc6e4126caf0b07b2327eb4a44e992
MD5 fa5f3c4cb53d1911d4fa5e9d8528d727
BLAKE2b-256 b6394a35f9fd83e3e0c3758d7b454ef7af973252cf001e7e83b3d2a3bcf73cd8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page