Skip to content
/ clai Public

Command line artificial intelligence - Because copy-pasting to a browser is glacial.

License

Notifications You must be signed in to change notification settings

baalimago/clai

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f2bc056 · May 29, 2024
May 29, 2024
May 21, 2024
Apr 1, 2024
May 27, 2024
Mar 23, 2024
May 3, 2024
Mar 22, 2024
May 6, 2024
May 27, 2024
May 27, 2024
May 27, 2024
Apr 2, 2024

Repository files navigation

clai: command line artificial intelligence

Go Report Card Wakatime

clai integrates AI models of multiple vendors via with the terminal. You can generate images, text, summarize content and chat while using native terminal functionality, such as pipes and termination signals.

The multi-vendor aspect enables easy comparisons between different models, also removes the need for multiple subscriptions: most APIs are usage-based (some with expiration time).

clai_in_action_example

Features

  • Prompting with input from:
    • Piped data
    • Globbed file input
    • Args
  • Conversations (with same input options as above)
  • Tools calling with easily forkable + extendable tools
  • Photo generation*
  • Human readable / robot readable output
  • 100% go standard library (except for /x/net)

* Only with dall-e for the moment. Nag on me to implement modellabs and I'll do it.

Prerequisites

Note that you can only use the models that you have bought an API key for.

Most text and photo based models within the respective vendors are supported, see model configurations for how to swap.

Get started

go install github.com/baalimago/clai@latest

Either look at clai help or the examples for how to use clai.

Honorable mentions

This project was originally inspired by: https://github.com/Licheam/zsh-ask, many thanks to Licheam for the inspiration.