Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jasonstitt/promptform
Command-line tool for running files in bulk through ChatGPT APIs
https://github.com/jasonstitt/promptform
ai chatgpt gpt llm
Last synced: 4 months ago
JSON representation
Command-line tool for running files in bulk through ChatGPT APIs
- Host: GitHub
- URL: https://github.com/jasonstitt/promptform
- Owner: jasonstitt
- License: mit
- Created: 2023-03-26T23:07:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-27T15:16:33.000Z (almost 2 years ago)
- Last Synced: 2024-09-28T13:41:36.040Z (4 months ago)
- Topics: ai, chatgpt, gpt, llm
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/promptform
- Size: 92.8 KB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-chatgpt - Promptform: Run GPT in bulk
- awesome-chatgpt - Promptform: Run GPT in bulk
README
# `promptform`
![license](https://img.shields.io/badge/license-MIT-green)
Promptform is an open-source command-line tool for running files in bulk through the OpenAI Completions API (e.g., with GPT-3.5).
## Disclaimer
PromptForm is not affiliated with OpenAI. Users are responsible for managing their own OpenAI account, API key, and related charges incurred during usage. Please refer to OpenAI's [Pricing](https://openai.com/pricing) for more information on costs associated with using the Completions API.
## Features
- Easily run entire directories of files through the OpenAI Completions API
- Include and exclude file glob patterns
- Replace content in-place or create new files alongside source files
- Designed for use with GPT-3.5 and compatible with future versions
- User-friendly command line interface## Installation
```bash
$ npm install -g promptform
```## Usage
Set up your OpenAI API key, either in a file, or as an environment variable.
```bash
echo 'your_api_key_here' > $HOME/.openai-token
# or
export OPENAI_API_KEY='your_api_key_here'
```Discover options using the command-line help.
```bash
promptform --help
```## Examples
Summarize all text files:
```bash
promptform --token-file ~/.openai-token --include '**/*.txt' --prompt 'Summarize this text:' --extension '.summary.txt'
```Generate unit tests:
```bash
promptform --token-file ~/.openai-token --include '**/*.ts' --omit '**/*.test.ts' --prompt 'Output only code and do not explain. Write unit tests for this TypeScript module:' --extension '.test.ts'
```## License
Promptform is licensed under the MIT License. See `LICENSE`.
## Maintainers
* Jason Stitt