hai-cli

Crates.iohai-cli
lib.rshai-cli
version1.21.0
created_at2025-03-18 07:40:07.670702+00
updated_at2025-12-04 08:21:22.877795+00
descriptionA CLI with a REPL for hackers using LLMs.
homepage
repositoryhttps://github.com/braincore/hai-cli
max_upload_size
id1596292
size1,246,663
Ken Elkabany (braincore)

documentation

https://github.com/braincore/hai-cli/blob/master/README.md

README

hai ≑ Hacker AI

Crates.io Crates.io License Discord

A CLI (hai) with a REPL for hackers using LLMs.

hai

Documentation

Documentation is available at braincore.github.io/hai-cli

Or, you can dive in and rely on hai -h (CLI), /help (REPL), and /task hai/help (LLM helper within REPL).

Highlights

  • ⚑️ Starts in 30ms (on my machine).
  • πŸ“¦ Single, standalone binaryβ€”no installation or dependencies required.
  • πŸͺΆ Lightweight (< 9MB compressed) for your machine, SBCs, and servers.
  • πŸ—― Run many instances for simultaneous conversations.
  • πŸ€– Supports AIs from OpenAI, Anthropic, DeepSeek, Google, xAI, and llama.cpp/Ollama (local) all in a single conversation.
  • πŸ•Ά Go incognito hai -i.
  • βš™ Give AI the power to run programs on your computer.
  • 🍝 Share AI prompt-pasta publicly using the task repository.
  • πŸ“‚ Load images, code, or text into the conversation.
  • πŸ”— Load URLs with automatic article extraction and markdown conversion.
  • 🎨 Highlights syntax for markdown and code snippets.
  • πŸ–Ό Render output to browser.
  • πŸ’Ύ Auto-saves last conversation for easy resumption.
  • ☁ Store and share data on the cloud for easy access by AIs.
  • πŸ“§ Get emails from AIβ€”send notifications or share data.
  • πŸ›  Open source: Apache License 2.0
  • πŸ’» Supports Linux and macOS. Windows needs testing (help!).

Installation

Installer [Linux, macOS]

curl -LsSf https://hai.superego.ai/hai-installer.sh | sh

Alt: Download binary [Linux, macOS, Windows]

Go to releases and download the version for your machine.

Alt: Build from source [Linux, macOS, Windows]

cargo install hai-cli

Demo

Markdown & code syntax highlighting

Syntax highlighting

Load image

Load image

Load URL

Load URL

Using the shell !sh tool

Using the shell tool

Using the Python !py tool

Using the Python tool

Using the Python-uv !pyuv tool

Like !py but delegates to the LLM the responsibility of defining and installing Python library dependencies.

Using the Python-uv tool

Using the HTML !html tool

Using the !hai tool

Using the !hai tool

Using the function tool (Python) !fn-py

Using the function tool (Python)

Using a task

Example uses ken/code-review task.

Using the code review task

Example uses ken/weather task.

Using the weather task

NOTE: Human input and code generation is cached so the next invocation of task doesn't require the LLM at all.

Using assets

Assets are a key-value object store in the cloud that you and the LLM can read or write to. Assets can be shared publicly, monitored for changes, and support revisions.

Using assets

The LLM can use assets without loading them into the conversation:

Using /asset-temp

Multi AI

Using the Multi AI tool

Send email

Send email

Video Walkthrough (YouTube)

Watch Walkthrough on YouTube

More videos

Commit count: 184

cargo fmt