# Eden Ecosystem v0.2.3

AI-powered CLI agent orchestrator with background daemon, auto-sudo, fully autonomous mode, project scaffolding, and a growing ecosystem of packages.

## Features

- 🤖 **Multi-Provider AI**: Ollama (local + cloud), Mistral, NVIDIA, Kimi — automatic fallback when a provider fails
- 🏢 **16 Enterprise Agents**: DevOps, Security, Frontend, Backend, Cloud, Product, Design, Data Science, QA, PM, and more
- ⚡ **Agency Daemon Mode**: Background process that auto-executes workflows and tasks 24/7 (`eden daemon start`)
- 🔧 **Interactive Chat with Tools**: `eden chat` launches a full CLI chat where complex tasks trigger the orchestrator and tools execute automatically
- **Auto-Sudo**: Commands that fail by permissions are automatically retried with `sudo`
- 🎛️ **Auto Mode**: `--auto` flag = zero prompts, fully autonomous execution
- 📦 **Project Scaffolding**: Built-in templates for `frontend`, `backend`, and `fullstack` projects
- 🌐 **Web Dashboard**: Real-time streaming chat interface (`eden web`)
- 🔐 **Secure Vault**: Encrypted local secrets via `eden vault set/get`
- 💬 **Telegram Bot**: Run Eden as a Telegram bot
- 🔄 **Ollama Cloud Support**: Use cloud models like `kimi-k2.6:cloud` via the Ollama CLI; tool execution automatically falls back to API-key providers (Mistral → Kimi → NVIDIA)

## Installation

```bash
npm install -g eden-ecosystem
```

Or try without installing:

```bash
npx eden-ecosystem
```

## Quick Start

### Interactive Chat (with tool execution)

```bash
eden chat
```

### Default Mode (chat + daemon + web)

```bash
eden
```

### One-shot Task

```bash
eden -p "Create a React app with notes feature"
```

### Fully Autonomous (no prompts)

```bash
eden --auto -p "Build me a fullstack todo app"
```

### Initialize a Project with Templates

```bash
eden init frontend my-app   # or backend, fullstack, tech
```

### Background Daemon (Agency Mode)

```bash
eden daemon start                    # Start background worker
eden -p "Refactor auth module"       # Sent to daemon automatically
eden daemon status                   # Check if running
eden daemon log                      # See live progress
eden daemon stop                     # Stop the daemon
```

## CLI Commands

| Command | Description |
|---------|-------------|
| `eden` | Start everything (chat + daemon + web) |
| `eden chat` | Interactive CLI chat with full tool access |
| `eden -p "<task>"` | Execute a single task |
| `eden --auto -p "<task>"` | Fully autonomous execution |
| `eden init <template> [name]` | Scaffold a new project |
| `eden web` | Launch Web Dashboard |
| `eden daemon <start/stop/status/log>` | Background agency daemon |
| `eden models` | List and manage AI models |
| `eden doctor` | Diagnose installation |
| `eden vault <set/get/list>` | Manage encrypted secrets |

## CLI Options

| Flag | Description | Default |
|------|-------------|---------|
| `-m, --model` | AI model to use | `kimi-k2.6:cloud` |
| `--provider` | Provider: `ollama`, `mistral`, `nvidia`, `kimi` | `ollama` |
| `-p, --prompt` | Single prompt execution | — |
| `--auto` | Auto-approve all tools (no prompts) | `false` |
| `-d, --debug` | Show debug output | `false` |
| `-c, --cwd` | Working directory | `.` |
| `--select-model` | Pick model interactively | `false` |

## Provider Setup

### Ollama (default, local + cloud)

```bash
# Local models
ollama pull llama3:8b

# Cloud models (authenticated via Ollama CLI)
ollama run kimi-k2.6:cloud
```

### Mistral (fallback for tools)

```bash
eden vault set MISTRAL_API_KEY your-mistral-api-key
```

### Kimi

```bash
eden vault set KIMI_API_KEY your-kimi-api-key
```

### NVIDIA

```bash
eden vault set NVIDIA_API_KEY your-nvidia-api-key
```

## Ecosystem Packages

| Package | Description | Install |
|---------|-------------|---------|
| `eden-components` | React 18 + Tailwind UI library | `npm install eden-components` |
| `eden-db` | Firebase-style Postgres wrapper | `npm install eden-db` |

## Configuration

### Environment Variables

```bash
OLLAMA_HOST=http://localhost:11434
EDEN_PERMISSION_BASH=auto          # ask | auto | deny
EDEN_PERMISSION_FILE_WRITE=auto
EDEN_PERMISSION_FILE_DELETE=ask
EDEN_PERMISSION_NETWORK=auto
```

### Vault (Encrypted Secrets)

```bash
eden vault set MISTRAL_API_KEY <key>
eden vault set KIMI_API_KEY <key>
eden vault set OLLAMA_CLOUD_TOKEN <token>
eden vault list
```

## Architecture

```
eden-ecosystem/
├── src/
│   ├── cli/
│   │   └── index.ts          # CLI entry point
│   ├── core/
│   │   ├── agent.ts          # Agent orchestration
│   │   ├── orchestrator.ts   # Task planning + SubTaskWorker execution
│   │   ├── daemon.ts         # Background agency daemon
│   │   ├── providers.ts      # Provider manager with automatic fallback
│   │   ├── tools/
│   │   │   └── index.ts      # Tool registry (write_file, run_command, etc.)
│   │   ├── vault.ts          # Encrypted secrets
│   │   └── workflows.ts      # Workflow engine
│   └── templates/            # Project scaffolding
│       ├── frontend/
│       ├── backend/
│       └── fullstack/
├── packages/
│   ├── eden-ui/              # React component library
│   └── eden-db/              # Postgres wrapper
└── README.md
```

## Requirements

- Node.js 20+
- Ollama (for local/cloud models) OR API keys for Mistral/NVIDIA/Kimi (for tool execution fallback)

## License

MIT
