1.1.0 • Published 10 months ago

standard-prompts v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

standard-prompts

Standard AI prompts that can be invoked from the command line. To get started, make sure node.js is installed and run:

npm install -g standard-prompts

Note: This command will install standard prompts in the NPM bin directory; you may need to source the .bashrc or .zshrc file in order for the commands to be available in the same terminal session.

Standard prompts uses the OpenAI API. Make sure to also set OPENAI_API_KEY environment variable (and optionally OPENAI_API_MODEL):

export OPENAI_API_KEY=<insert-api-key-here>
export OPENAI_API_MODEL=gpt-4

If OPENAI_API_MODEL env var is not set, Standard Prompts defaults to the gpt-4 model.

Usage

Input can be either passed in as an argument to a standard prompt or piped in. For example, both are valid:

ai_code_generate "Standard gitignore file for a node.js project"
echo "Standard gitignore file for a node.js project" | ai_code_generate

Philosophy

Composable

Standard prompts follows the Unix philosophy of being composable. For example, commands can be piped together:

cat email-draft.txt | ai_review_email | pbcopy

The example commands:

  • Takes an email draft from email-draft.txt
  • Pipes it to ai_review_email to review the email.
  • Finally, pipes the reviewed email to pbcopy, which saves it to the clipboard for pasting into an email.

Favor Markdown Output

Output is generally given as Markdown.

Available Standard Prompts

Email

CommandDescription
ai_email_generateGenerate an email given passed specifications.
ai_email_reviewReviews and suggests improvements for an email draft.
ai_email_reviseReviews and outputs only the contents of the improved email.

Code

CommandDescription
ai_code_qaAnswer questions about code input.
ai_code_generateGenerate code given description input.
ai_code_reviewReviews and suggests improvements for code.
ai_code_reviseReviews and outputs only the contents of the improved code.

Financial

CommandDescription
ai_financial_qaAnswers financial related questions.
ai_financial_reviewReviews financial statements or documents passed as input.

Health

CommandDescription
ai_health_qaAnswers health related questions.
ai_health_reviewReviews health-related documents passed as input.

General

CommandDescription
ai_generateGenerates text based on a given input.
ai_reviewReviews a given text input.
ai_summarizeSummarizes a given text input.
ai_qaAnswers general questions.

Tip: you can summarize this Readme using Standard Prompts: curl -s https://raw.githubusercontent.com/jonmbake/standard-prompts/main/README.md | ai_summarize.

1.1.0

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago