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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cliara-0.3.2.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.2.tar.gz
Algorithm Hash digest
SHA256 4f148fa63b220004cc134f724a11ced9fcf168ecc9bd6570b07755ce0496eea5
MD5 dfe2d86e93e9b4a5cad913ca9664179b
BLAKE2b-256 7816657324f23fb68718861f89469b17944b4a0348cbc6c588cc6cf4a19c8ffe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cliara-0.3.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bd89f1b21e8d382a1f02469b1680687942c78e66ff4057f38521f376d0951087
MD5 56413ac3efa07f36f0e21a81ba0055de
BLAKE2b-256 9e8ea196bb564af4c282c41a25dc272d74142faf2b7f72c2a60f4ec02296501e

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