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.3.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.3-py3-none-any.whl (156.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cliara-0.4.3.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.3.tar.gz
Algorithm Hash digest
SHA256 261ce43b62ec0d6f84057bec43704e0a30ae0956d637b9bb47b400621907ee0a
MD5 fa38ec181c5354b708e5702e41feefda
BLAKE2b-256 05e74dcf2d7d1309bdcdf2934e5393c47e2a7e74912475d6f92100e3cc940d60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cliara-0.4.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9a1a6ba2ed6e9317d74d471746608a54917bf5a5b21bafe214ccbec975fd427f
MD5 511c334bdd705cb0837109355414df1e
BLAKE2b-256 555fd17fc05feb7f56ae5853803ddea08f763727237d62ed48d63dae8d5fe43f

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