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.4.2.tar.gz (145.3 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.4.2-py3-none-any.whl (156.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cliara-0.4.2.tar.gz
Algorithm Hash digest
SHA256 a7680af8154f94d7809487e689234ddd4b063dcb329a9bf82d5a95ece605f0bb
MD5 79d20f7d934c415a6427d00dc562b51b
BLAKE2b-256 41fa146553236f2663798dcde858a701101fa58c88d5ca7c8c9e32934444e1e3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cliara-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 156.6 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.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d28a2f5d6195881d39d979b0182263fe7e1e93badcf053978f765011554f2e61
MD5 6790a9c9285a23675290650935eead9b
BLAKE2b-256 f54a213e53a750fbd17596004e0dc1bc9ceed162a1120be16117e389efda3518

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