Skip to main content

An AI-powered shell that understands natural language and macros

Project description

Cliara - AI-Powered Shell

An intelligent shell wrapper that understands natural language and macros.

Quick Start

# Install
pip install -e .

# Setup environment
cp .env.example .env
# Edit .env and add your OPENAI_API_KEY

# Run
cliara

Documentation

What is Cliara?

Cliara wraps your existing shell and adds:

  • 🗣️ Natural language commands with ? prefix (Phase 2)
  • 📦 Powerful macro system (create, edit, delete, run)
  • 🔍 Semantic history search: ? find when I fixed the login or ? what did I run to deploy
  • 🛡️ Safety checks for dangerous operations
  • 💾 Save last command as macro instantly
  • 🔄 Persistent command history with arrow-key recall across sessions
  • ✏️ Rename macros without recreating them
  • 📂 Proper cd handling (changes Cliara's own working directory)
  • 🚀 Normal commands work unchanged

Installation

# 1. Clone the repo
git clone https://github.com/yourusername/cliara.git
cd cliara

# 2. Install dependencies
pip install -e .

# 3. Setup environment
cp .env.example .env
# Edit .env and add your OPENAI_API_KEY

# 4. Run
cliara

Usage

# Start Cliara
cliara

# Normal commands work
cliara:proj > ls -la
cliara:proj > git status

# Natural language (requires OPENAI_API_KEY)
cliara:proj > ? kill process on port 3000

# Create a macro
cliara:proj > macro add test
  > echo Step 1
  > echo Step 2
  > 

# Edit an existing macro
cliara:proj > macro edit test
  > echo Updated Step 1
  > echo Updated Step 2
  > 

# Run it
cliara:proj > test

# Rename a macro
cliara:proj > macro rename old-name new-name

# Save last command
cliara:proj > echo "hello"
cliara:proj > macro save last as hello

# cd works correctly (changes Cliara's own directory)
cliara:proj > cd src
cliara:src >

Features

Phase 1 ✅ (Complete)

  • Shell wrapper with pass-through
  • Interactive macro system (add, edit, delete, rename, show, run, search)
  • Save last command as macro
  • Persistent command history (~/.cliara/history.txt) with arrow-key recall
  • Multi-tier safety checks
  • Auto-configuration

Phase 2 ✅ (Complete)

  • LLM integration (OpenAI)
  • Natural language → commands
  • Context-aware suggestions
  • Semantic history search: ? find ... / ? when did I ... / ? what did I run ... — search past commands by intent (stored in ~/.cliara/semantic_history.json)

Storage Backends

  • JSON (default) - Simple file-based storage
  • PostgreSQL - Scalable database backend for millions of macros

Requirements

  • Python 3.8+
  • Windows, macOS, or Linux

Windows Users

After installation, you may need to add Python Scripts to your PATH:

C:\Users\<YourName>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts

Or restart your computer for PATH changes to take effect.

Version

v0.2.0 - Phase 2 Complete

  • ✅ Natural language support
  • ✅ Windows compatibility fixes
  • ✅ PostgreSQL backend support

License

MIT


See docs/README.md for complete documentation.

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

cliara-0.3.1.tar.gz (126.5 kB view details)

Uploaded Source

Built Distribution

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

cliara-0.3.1-py3-none-any.whl (135.3 kB view details)

Uploaded Python 3

File details

Details for the file cliara-0.3.1.tar.gz.

File metadata

  • Download URL: cliara-0.3.1.tar.gz
  • Upload date:
  • Size: 126.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for cliara-0.3.1.tar.gz
Algorithm Hash digest
SHA256 608a573e9735b30056c8317ecfd452a88530eca619b2de4f4e43a26556df8486
MD5 a07fedc941f4adc53cd2e0d58deedb6a
BLAKE2b-256 226ed30eb76da09a87cec00211a2c5c96d0dd01c9051c8ef6d7a256c4bf1e835

See more details on using hashes here.

File details

Details for the file cliara-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: cliara-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 135.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for cliara-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1d51fe94e1d897a257f135e39fe03744dea7c60f83db7ffac2bed7ef78609b35
MD5 f4d83ed1f945afce7b67debcee3b9f1f
BLAKE2b-256 d5b9bde8d649b55ba0a1586fc19aacbf7c30871462e5ca6c3b53edbd477d8bb5

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