Skip to content

exekis/recli

Repository files navigation

Recli

Recli is a fully open-source, Rust-based CLI tool that works inside any terminal emulator (Kitty, Alacritty, tmux, etc.), without needing to replace the terminal itself (like Warp or Wave). It will capture all commands in the active session (including their runtime, exit code, output, etc.), and it will add the following to the terminal experience:

  • Hotkey-activated full context capture
  • Parsing features (error summarization and regex parsing)
  • Session impact tracking to extract what actually worked from a messy debug session
  • journalctl monitoring for low-level error capture

This is a lightweight, user-controlled, emulator-agnostic tool that's both powerful for advanced users and helpful for those learning CLI workflows.

How it works in practice

# start a recli session
$ recli 
[recli] Starting shell session...

# do your normal work
$ echo "hello world"
hello world
$ ls -la
total 48
drwxr-xr-x  6 user user  4096 Sep  8 16:24 .
# ... more commands

# when you're done, just exit
$ exit
Session saved to: /home/user/.recli/logs/20250908_162446/commands.json
✓ Session uploaded to Cosmos DB

Installation

Recli is built in Rust, so you can install it to path using cargo. The following drop-in script will clone the repo, build the binary, install it to ~/.cargo/bin, and then run the help command to verify the installation:

git clone https://github.com/exekis/recli.git
cd recli
cargo install --path .
recli --help

Cloud Storage Setup (Optional)

If you want your command sessions backed up to the cloud, Recli can automatically upload your session logs to Azure Cosmos DB. This is completely optional. Recli works perfectly fine storing everything locally :)

Setting up Azure Cosmos DB

  1. Create a Cosmos DB account in the Azure portal (free tier works great)
  2. Create a database called recli
  3. Create a container called logs with partition key /session_id
  4. Get your connection string from the Azure portal (under Keys section)

Configure your .env file

Create a .env file in your project directory with:

RECLI_AZURE__COSMOS__CONNSTR=AccountEndpoint=https://your-account.documents.azure.com:443/;AccountKey=your-key-here==;
RECLI_AZURE__COSMOS__DB=recli
RECLI_AZURE__COSMOS__CONTAINER=logs

Just replace your-account and your-key-here with your actual values from Azure.

Test the connection

Run recli cosmos_doctor to verify everything's working. You should see green checkmarks if it's all set up correctly.

Your session gets saved locally (as always) and automatically synced to the cloud. You can browse your uploaded sessions in the Azure portal or query them programmatically later.

When you exit a recli session, you'll see "✓ Session uploaded to Cosmos DB" and your command history will be safely stored in the cloud.

Key Features

Note: For the latest development progress and implementation status, see recli_roadmap.md.

About

Rust-based CLI context capturer and terminal compiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages