New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dstanesc/gpt

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dstanesc/gpt

Simple unix style utility adding gpt model interaction to the command line

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gpt

Simple unix style utility adding gpt model interaction to the command line.

Build

npm run clean
npm install
npm run build

Install

From source

npm install -g . 

From npm

npm install -g @dstanesc/gpt

Help

$ gpt --help

Usage: gpt [options] 'user prompt'

Options:

  -f, --file: input file name, appends file content to user prompt
  -p, --prepend: prepend text to piped input
  -a, --append: append text to piped input
  -m, --model: model name, e.g. mistral-7b-instruct-v0.1.Q4_0.gguf
  -d, --device: device type, e.g. cpu, gpu
  -t, --temperature: temperature, e.g. 0.7
  -c, --context-length: context length, e.g. 2048
  -r, --thread-count: thread count, e.g. 24
  -s, --system-prompt: system prompt, e.g. '### System: You are an experienced javascript developer'
  -o, --topp: topp, e.g. 0.4
  -i, --minp: minp, e.g. 0.0
  -k, --topk: topk, e.g. 40


Examples:

  gpt '1+1'
  xsel -b | gpt --prepend 'Pretty print following json' | codedown json | tee pretty.json
  echo 'create a javascript code fragment that prints first 10 fibonacci numbers' | gpt | codedown javascript | node
  echo 'create a javascript code fragment that prints first 10 fibonacci numbers' | gpt --temperature 0.5 --thread-count 24 --model mistral-7b-instruct-v0.1.Q4_0.gguf | codedown javascript | node
  echo 'write a python function that prints first 10 Fibonacci numbers' | gpt | codedown python | python3
  echo 'create a html page that displays a plotlyjs based bar chart with the top 10 US cities by population' | gpt | codedown html | tee page.html

Models

Model cache location is ${HOME}/.cache/gpt4all. Models will be downloaded and cached on first time use. It is recommended to discover models using GPT4All model search feature.

Useful tools

  • codedown - extracts code blocks from Markdown files

Licenses

Licensed under either Apache 2.0 or MIT at your option.

Keywords

FAQs

Package last updated on 12 Apr 2024

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