Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nlpip

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlpip

A natural language based unix pipeline utility

  • 0.1.6
  • Source
  • PyPI
  • Socket score

Maintainers
1

nlpip - A natural language based unix pipeline utility

nlpip takes a text written in natural language as input, and performs a specified command also written in natural language, and then outputs the result in natural language.

Here's a demo:

screen recording

Installation

First, you need to install nlpip using pip:

pip install nlpip

Then, set your OpenAI's API key as an environment variable:

export OPENAI_API_KEY=WRITE_YOUR_KEY_HERE

How to use

nlpip or just nlp for short, provides following default commands:

  • keywords: Extract keywords from input text
  • poem: Write poem using input text
  • summarize: Summarize input text
  • sentiment: Analyze sentiment of input text

For example, if you want summarize input.txt and turn it into a poem, you can run the following command:

cat input.txt | nlp summarize | nlp poem

How to create a new command

To create a new command, you just need to create a text file containing the command in natural language. For example, if you want to create a command that translates input text into French, you can create a file named ~/.nlpip/prompts/fr.txt in with:

Translate into French

Then, you can run the following command:

echo Hello | nlp fr

And you will get the following output:

Bonjour

You may override default commands by creating a file with the same name in ~/.nlpip/prompts/.

Credit

  • nlpip is inspired by Schillace Laws of Semantic AI.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc