Skip to main content

Language Model Command Line Interface

Project description

Lang Model CLI

A command line interface for interacting with large language models.

Quick Start

Install with pip

pip install lang-model-cli

Export provider API keys

export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-..."
...

Use the CLI

Full usage instructions can be viewed using,

lmc --help

Here are the basics.

user message with --prompt or -p

lmc -p "briefly describe cosmology"

stream output with --stream or -s

lmc -p "briefly describe cosmology" -s

system message with --system or -y

lmc -p "briefly describe cosmology" -s -y "speak like a pirate"

user message with pipe

cat <filename> | lmc

If text is piped in and there is no -p option then the piped input will become the user message content.

user message with pipe and -p

cat <filename> | lmc -p "Summarize the following text: @pipe"

In this case, the @pipe string will be replaced with the piped in text. This could also be accomplished using command substitution,

lmc -p "Summarize the following text: $(cat <filename>)"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lang_model_cli-0.1.6.tar.gz (55.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lang_model_cli-0.1.6-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file lang_model_cli-0.1.6.tar.gz.

File metadata

  • Download URL: lang_model_cli-0.1.6.tar.gz
  • Upload date:
  • Size: 55.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.16

File hashes

Hashes for lang_model_cli-0.1.6.tar.gz
Algorithm Hash digest
SHA256 7c94c0af900cc3c296412f3b3545f9528beb246454312a4b4c3ae6433d3e790c
MD5 91b3b7cef7c8f0529e650d4cc9ecb2bb
BLAKE2b-256 144bed1b1de1509f924a8bcf54ed2c9b09b16d0afb6974192dbf240f3ea3fec3

See more details on using hashes here.

File details

Details for the file lang_model_cli-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for lang_model_cli-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 989ef9cabbd463b2a2dc5eaca49485cb68a3e9fbbab7151ee7e31b797a33e144
MD5 1479121115557478d0875fc7193a6d90
BLAKE2b-256 d248067397559130841218062697c35061662c75d4e64a8048666d6bdffaa120

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page