cogni
Unix-minded interface for interacting with LLMs.
Focus
cogni brings language model scripting (prompting) into familiar Unix
environment by focusing on:
- Ergonomics and accessibility in Unix shell
- Composability and interop with other programs - including
cogniitself - Ease of language model programming in both ad-hoc and repeatable manner
For example, designing for IO redirection (stdin, stdout) allows cogni to
work with files, editor buffers, clipboards, syslogs, sockets, and many external
tools without bespoke integrations.
Features
- Unix-minded Design (IO redirection, composability, interop)
- Ad-hoc Language Model Scripting
- Flexible input and output formats (Text, JSON, NDJSON)
- Standalone binary - No Python required
- 🚧 Repeatable Scripts via Templates
- 🚧 Integration with external tools (Emacs, Raycast)
Non-Features
- Interactive use - instead, invoke
cognifrom within interactive environments (REPLs, emacs, etc)
Installation
# Install from crates.io
# From source
Setup
cogni expects an OpenAI API Key to be supplied via --apikey option or more
conveniently OPENAI_API_KEY environment variable:
# in shell configuration
Tour of cogni
🚧 WIP