CLI tool for LLM-driven code modifications via plain language
Top 40.1% on sourcepulse
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
npm install -g @ifnotnowwhen/promptr
or yarn: yarn global add @ifnotnowwhen/promptr
.OPENAI_API_KEY
environment variable.promptr -p "your instructions" <file1> <file2> ...
Highlighted Details
liquidjs
templating for prompt reusability and includes.-d
) for previewing changes.empty
, refactor
, swe
, test-first
).-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.
7 months ago
1 day