promptr  by ferrislucas

CLI tool for LLM-driven code modifications via plain language

created 2 years ago
932 stars

Top 40.1% on sourcepulse

GitHubView on GitHub
Project Summary

Promptr is a command-line interface tool designed for developers to leverage OpenAI's LLM models for code modification and generation. It allows users to provide plain language instructions, which are then applied directly to specified files, streamlining tasks like refactoring and boilerplate code insertion.

How It Works

Promptr utilizes OpenAI's models (defaulting to gpt-4o) to interpret user prompts and execute changes on the filesystem. It supports templating via liquidjs, enabling the creation of reusable prompt snippets and project-specific instructions through an "includes" mechanism. This allows for consistent application of coding standards or boilerplate across projects.

Quick Start & Requirements

  • Install via npm: npm install -g @ifnotnowwhen/promptr or yarn: yarn global add @ifnotnowwhen/promptr.
  • Requires Node.js 18+ and an OpenAI API key set as the OPENAI_API_KEY environment variable.
  • Usage: promptr -p "your instructions" <file1> <file2> ...
  • Official docs: https://github.com/ferrislucas/promptr

Highlighted Details

  • Supports liquidjs templating for prompt reusability and includes.
  • Offers dry-run mode (-d) for previewing changes.
  • Includes built-in templates (empty, refactor, swe, test-first).
  • Can apply model output directly to files using the -x flag with custom templates.

Maintenance & Community

The project is maintained by ferrislucas. Further community or roadmap information is not detailed in the README.

Licensing & Compatibility

Released under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

Currently, only macOS is supported for pre-built binaries. The effectiveness of code modifications is dependent on the clarity of the prompt and the LLM's interpretation.

Health Check
Last commit

7 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
10 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
2 more.

prompt-engine by microsoft

0.1%
3k
NPM library for LLM prompt engineering
created 3 years ago
updated 2 years ago
Feedback? Help us improve.