Skip to content

SanjaySunil/prompta

Repository files navigation


Prompta

A powerful CLI tool for managing AI prompts with modern features


Highlights

  • Parameter Substitution - Use {{paramName}} syntax to create dynamic prompts
  • VS Code Integration - Seamlessly edit prompts in your favorite editor
  • Instant Clipboard - Copies processed prompts directly to your clipboard
  • Type Safety - Built with TypeScript for reliability and great developer experience

Features

Create Prompts

Save and organize your LLM prompts with an intuitive interface. Use your favorite editor or the terminal.

Parameters Support

Define variables with {{paramName}} syntax and set custom default values for each parameter.

Instant Clipboard

Execute prompts with parameters and get them instantly copied to your clipboard, ready to paste into any AI tool.

VS Code Integration

Seamlessly write and edit prompts in VS Code with proper syntax highlighting and a comfortable editing experience.


Quick Start

Installation

# Install globally
npm install -g prompta

# Verify installation
prompta --version

Create Your First Prompt

prompta create

Usage Guide

Creating Prompts

Run the command:

prompta create

This launches an interactive session where you:

  1. Enter a name for your prompt
  2. Choose between VS Code or terminal for writing your prompt
  3. Define parameters using {{paramName}} syntax
  4. Set default values for parameters
Create Command Annotated
Listing Prompts

Run the command:

prompta list

This displays all saved prompts and allows you to:

  • View details of specific prompts
  • See parameter information
  • Copy a prompt directly to clipboard
List Command Annotated
Editing Prompts

Run the command:

prompta edit

Select a prompt to modify:

  • Update the name
  • Edit the content in VS Code or terminal
  • Update parameters and default values
Edit Command Annotated
Executing Prompts

Run the command:

prompta run

Select a prompt to execute:

  • Enter values for parameters (or use defaults)
  • The processed prompt is automatically copied to clipboard
  • View the final prompt with substituted parameters
Run Command Annotated

Examples

Creating a Code Explanation Prompt

# After running 'prompta create'

? Enter a name for the prompt: Code explanation
? Would you like to use VS Code to write your prompt? Yes

# In VS Code, write:
Explain the following {{language}} code like I'm {{level}}:

```{{code}}```

Running the Prompt with Parameters

# After running 'prompta run'

? Select a prompt to execute: Code explanation
? Value for language: JavaScript
? Value for level: a beginner
? Value for code: function hello() { console.log("Hello world"); }

✅ Prompt copied to clipboard!

Executed Prompt:
Explain the following JavaScript code like I'm a beginner:

```function hello() { console.log("Hello world"); }```

Configuration

Your prompts are stored in a local configuration file using the conf package. The location depends on your operating system:

OS Path
macOS ~/Library/Preferences/prompta-nodejs
Windows %APPDATA%\prompta-nodejs
Linux ~/.config/prompta-nodejs

Installation Options

Global Installation (Recommended)

npm install -g prompta

Local Development Installation

# Clone the repository
git clone https://github.com/sanjaysunil/prompta.git
cd prompta

# Install dependencies
npm install

# Build the project
npm run build

# Link for local use
npm link

Contributing

Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.


License

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


About

A powerful CLI tool for managing AI prompts with modern features.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published