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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cliara-0.4.1.tar.gz
  • Upload date:
  • Size: 145.2 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.1.tar.gz
Algorithm Hash digest
SHA256 b8b1f3e2665db332d5dda781fd4c287f6dec26eebd9bad177f61353f67e01c66
MD5 37b2149f95916266f1602c840fa5b932
BLAKE2b-256 02d41ff1b9036f6c713f4d8815433150781838d29a4e222d05b94592541e9d2a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cliara-0.4.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 133414df138ab7718c335868371ff64d3cc501af1929f23bbbd8ae486023d944
MD5 e5c136885a263d40ccb5c6fd6ff0bca3
BLAKE2b-256 e88321a9f68f9a6285ef37c6293190e4ee4ef0313cad282e8be8a55207c7a286

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