Skip to main content

EverydayAI CLI - Personal AI toolkit for regular people

Project description

# EverydayAI CLI

**Personal AI toolkit for regular people**  
**Status:** 🟡 Alpha - Core tools working, more features planned

Created by Keith Williams - Director of Enterprise AI @ NJIT

[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![Code Coverage](https://img.shields.io/badge/coverage-25.35%25-orange.svg)](https://github.com/kaw393939/ei)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Status: Alpha](https://img.shields.io/badge/status-alpha-orange.svg)](https://github.com/kaw393939/ei)

## What is EverydayAI CLI?

A command-line toolkit that makes AI-powered image processing and content
analysis accessible to everyone - not just developers. Built for teachers,
accountants, managers, small business owners, and anyone who wants to leverage
AI without writing code.

## Features

### ✅ Currently Available

- 🖼️ **Image Analysis**: AI-powered image understanding with GPT-4 Vision
- ✂️ **Smart Cropping**: Intelligent image cropping with aspect ratio control
- 🎨 **Background Removal**: Remove backgrounds from images automatically
- 🔍 **AI Search**: Semantic search powered by AI
- 📸 **Image Generation**: Create images with AI assistance
- 🗣️ **Text-to-Speech**: Professional voice synthesis with 19 voices, 6 formats,
  streaming support
- ⚙️ **Flexible Configuration**: YAML config + environment variables
- 🎯 **Robust Error Handling**: Structured errors with helpful suggestions

### 🚧 Coming Soon (See [ROADMAP.md](ROADMAP.md))

- 📦 Template System: Pre-built templates for common tasks
- 🔄 Iteration Tracking: AI-assisted iterative workflows
- � Deployment Tools: Easy deployment to various platforms
- 🔌 Plugin Architecture: Extensible command system

## Installation

```bash
# From PyPI - Live Now! 🎉
pip install everydayai-cli

# From source
git clone https://github.com/kaw393939/ei.git
cd ei
poetry install

# Verify installation
eai --version
```

## Quick Start

```bash
# Analyze an image with AI
eai vision analyze photo.jpg --prompt "Describe this image in detail"

# Remove background from an image
eai remove-bg input.jpg --output output.png

# Smart crop with aspect ratio
eai crop image.jpg --aspect-ratio 16:9 --output cropped.jpg

# Generate an image
eai image generate "A serene mountain landscape" --output mountain.png

# AI-powered search (coming soon)
eai search "machine learning tutorials"

# Generate professional speech from text
eai speak "Welcome to our presentation" -o welcome.mp3

# Use premium voice with high quality
eai speak "Important announcement" -o announce.mp3 -v marin -m tts-1-hd

# Stream long-form content with progress
eai speak --input long_script.txt -o audiobook.mp3 --stream
```

## Commands

### `eai vision`

Analyze images using AI vision models.

```bash
eai vision analyze IMAGE_PATH [OPTIONS]

Options:
  --prompt TEXT       What to analyze in the image
  --model TEXT        AI model to use (default: gpt-4-vision)
  --max-tokens INT    Maximum tokens for response
  --detail TEXT       Detail level: low, high, auto (default: auto)
```

### `eai crop`

Smart image cropping with AI assistance.

```bash
eai crop IMAGE_PATH [OPTIONS]

Options:
  --output PATH           Output file path
  --aspect-ratio TEXT     Target aspect ratio (e.g., 16:9, 4:3)
  --width INT            Target width in pixels
  --height INT           Target height in pixels
  --focus TEXT           Focus area: center, face, auto
```

### `eai remove-bg`

Remove background from images.

```bash
eai remove-bg IMAGE_PATH [OPTIONS]

Options:
  --output PATH      Output file path
  --format TEXT      Output format: png, jpg (default: png)
```

### `eai image`

Generate or manipulate images with AI.

```bash
eai image generate PROMPT [OPTIONS]

Options:
  --output PATH      Output file path
  --size TEXT        Image size: 256x256, 512x512, 1024x1024
  --model TEXT       Model to use (default: dall-e-3)
```

### `eai search`

AI-powered semantic search (experimental).

```bash
eai search QUERY [OPTIONS]

Options:
  --limit INT       Number of results (default: 10)
  --format TEXT     Output format: json, table (default: table)
```

### `eai speak`

Generate professional speech from text using AI.

```bash
eai speak TEXT [OPTIONS]
eai speak --input FILE [OPTIONS]

Options:
  --input, -i PATH         Read text from file
  --output, -o PATH        Output audio file (required)
  --voice, -v VOICE        Voice: alloy, echo, fable, onyx, nova, shimmer,
                           ash, ballad, coral, sage, verse (tts-1),
                           marin, cedar (tts-1-hd) [default: alloy]
  --model, -m MODEL        Model: tts-1, tts-1-hd [default: tts-1]
  --speed, -s FLOAT        Playback speed 0.25-4.0 [default: 1.0]
  --format, -f FORMAT      Audio format: mp3, opus, aac, flac, wav, pcm
                           [default: mp3]
  --instructions TEXT      Pronunciation/style guidance (max 4096 chars)
  --stream                 Enable streaming mode with progress
  --play                   Play audio after generation

Examples:
  # Basic usage with default voice
  eai speak "Hello world" -o hello.mp3

  # Premium voice with high quality
  eai speak "Professional recording" -o pro.mp3 -v marin -m tts-1-hd

  # Long-form with streaming
  eai speak --input script.txt -o audiobook.mp3 --stream

  # Custom pronunciation guidance
  eai speak "Dr. Nguyen at CERN" -o speech.mp3 \
    --instructions "Pronounce 'Nguyen' as 'win', 'CERN' as 'sern'"

  # Small file size for streaming
  eai speak "Compact audio" -o compact.opus -f opus

  # Generate and play immediately
  eai speak "Listen now" -o demo.mp3 --play
```

**Voice Options:**

- **Standard** (all models): alloy, echo, fable, onyx, nova, shimmer
- **tts-1 only**: ash, ballad, coral, sage, verse
- **tts-1-hd only**: marin (most natural), cedar (rich depth)

**Format Guide:**

- **mp3**: Default, widely compatible (~30KB)
- **opus**: Streaming optimized (~7KB)
- **aac**: Apple devices (~25KB)
- **flac**: Lossless quality (~38KB)
- **wav**: Uncompressed editing (~93KB)
- **pcm**: Raw audio data (~93KB)

See [docs/TTS_GUIDE.md](docs/TTS_GUIDE.md) for comprehensive TTS documentation.

## Configuration

### Configuration File

Create `.ei/config.yaml` in your project or `~/.ei/config.yaml` for global
settings:

```yaml
ai:
  api_key: ${EI_API_KEY} # Or set directly (not recommended)
  model: gpt-4-vision-preview
  max_tokens: 2000

output:
  format: json # or "human"

logging:
  level: INFO
  format: json # or "text"
```

### Environment Variables

```bash
export EI_API_KEY="your-openai-api-key"
export EI_LOG_LEVEL="INFO"
export EI_OUTPUT_FORMAT="json"
```

### Configuration Hierarchy

Configuration sources (later overrides earlier):

1. Built-in defaults
2. Global config (`~/.ei/config.yaml`)
3. Project config (`./.ei/config.yaml`)
4. Environment variables (`EI_*`)
5. Command-line arguments (`--option`)

## Templates

Available templates:

- **email-writing**: Professional email composition
- **lesson-plans**: Educational lesson planning
- **simple-website**: Static website creation
- **project-planning**: Project structure and planning
- **data-analysis**: Simple data analysis tasks

Create custom templates in `~/.vibe/templates/`.

## Development

### Setup

```bash
# Clone repository
git clone https://github.com/kaw393939/ei.git
cd ei

# Install dependencies
poetry install

# Run in development mode
poetry run eai --help
```

### Testing

```bash
# Run all tests
poetry run pytest

# Run with coverage
poetry run pytest --cov=src/ei_cli --cov-report=html

# Run specific test category
poetry run pytest -m unit          # Unit tests only
poetry run pytest -m integration   # Integration tests only
```

### Quality Checks

```bash
# Linting
poetry run ruff check src/ tests/

# Type checking
poetry run mypy src/

# Security scanning
poetry run bandit -r src/

# Run all quality checks
poetry run pre-commit run --all-files
```

## Architecture

The CLI follows a clean layered architecture:

- **CLI Layer** (`cli/`): Command parsing and user interaction
- **Tools Layer** (`tools/`): Core AI and image processing tools
- **Core Layer** (`core/`): Configuration, errors, shared utilities

Key principles:

- **EAFP over LBYL**: "Easier to Ask Forgiveness than Permission"
- **Structured Errors**: All errors provide machine-readable context
- **Configuration Flexibility**: Multiple config sources, sensible defaults
- **Type Safety**: Full mypy strict mode compliance

See [TECHNICAL_DEBT_AUDIT.md](TECHNICAL_DEBT_AUDIT.md) for current architecture
status and [ROADMAP.md](ROADMAP.md) for planned improvements.

## Testing Strategy

Current test coverage: **25.35%** (Target: 90%)

- ✅ Configuration system: 100% coverage
- ✅ Error handling: 100% coverage
- ✅ Tool registry: 100% coverage
- 🚧 Tool implementations: 0% coverage (in progress)
- 🚧 CLI commands: 0% coverage (in progress)

We're actively working toward 90% coverage. See
[TECHNICAL_DEBT_AUDIT.md](TECHNICAL_DEBT_AUDIT.md) for details.

## Contributing

We welcome contributions! Here's how to get started:

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Write tests first (TDD approach)
4. Implement your feature
5. Ensure all quality gates pass (`poetry run pre-commit run --all-files`)
6. Commit changes (`git commit -m 'Add amazing feature'`)
7. Push to branch (`git push origin feature/amazing-feature`)
8. Open a Pull Request

Please read [TECHNICAL_DEBT_AUDIT.md](TECHNICAL_DEBT_AUDIT.md) to understand
current priorities.

## License

MIT License - See [LICENSE](LICENSE) for details.

## Author

**Keith Williams**

- Director of Enterprise AI @ NJIT
- 23 years teaching computer science
- Building EverydayAI Newark
- [keithwilliams.io](https://keithwilliams.io)
- [@kaw393939](https://github.com/kaw393939)

## Acknowledgments

- Part of **EverydayAI Newark** - training everyone for distributed productivity
  gains
- Built to make AI accessible to non-developers
- Inspired by Swiss design principles - clarity, function, minimal complexity

## Links

- **Website**: [keithwilliams.io](https://keithwilliams.io)
- **GitHub**: [github.com/kaw393939/ei](https://github.com/kaw393939/ei)
- **PyPI**: [pypi.org/project/everydayai-cli](https://pypi.org/project/everydayai-cli)
- **Documentation**:
  - [TECHNICAL_DEBT_AUDIT.md](TECHNICAL_DEBT_AUDIT.md) - Current status
  - [ROADMAP.md](ROADMAP.md) - Planned features
- **Issues**:
  [github.com/kaw393939/ei/issues](https://github.com/kaw393939/ei/issues)

---

**Status:** 🟡 Alpha - Core features working, comprehensive testing in
progress  
**Version:** 0.1.0  
**Coverage:** 25.35% → Target: 90%

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

everydayai_cli-0.1.1.tar.gz (99.1 kB view details)

Uploaded Source

Built Distribution

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

everydayai_cli-0.1.1-py3-none-any.whl (116.0 kB view details)

Uploaded Python 3

File details

Details for the file everydayai_cli-0.1.1.tar.gz.

File metadata

  • Download URL: everydayai_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 99.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.7 Darwin/25.0.0

File hashes

Hashes for everydayai_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cadbd77231d28a8c2da54877e18ed07b296533f48a5fbd9fdb622ac751f9b4f0
MD5 9b92ccb238c79029a19f89ebd67a67d1
BLAKE2b-256 ce86168e453838a74a86448e6c449411e2d2052f54c8e7e96cc3bddd495e6b39

See more details on using hashes here.

File details

Details for the file everydayai_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: everydayai_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 116.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.7 Darwin/25.0.0

File hashes

Hashes for everydayai_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 adadc8db1017c98919a79d1e2fc4cbf4702dcdfbc383c94a2371586473254d82
MD5 a294793fb3da14cfc906ff2ad26654e6
BLAKE2b-256 1fdd0393db43c63355a0b83b31f90d1ad2f289995fc4ae8927174a54cf294e45

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