Metadata-Version: 2.4
Name: lvtn
Version: 0.1.0
Summary: Leviathan Shel HaShem — local agent CLI. Remote LLM, local filesystem, browser, LLM discovery. Same feature on Windows/Mac/Linux.
Author-email: Metanoia Unlimited <hachazal418@metanoiaunlimited.com>
License: Proprietary
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31
Requires-Dist: click>=8.1
Requires-Dist: rich>=13.7
Requires-Dist: websocket-client>=1.7
Requires-Dist: playwright>=1.40
Provides-Extra: dev
Requires-Dist: pytest>=7.4; extra == "dev"
Requires-Dist: pytest-cov>=4.1; extra == "dev"

# Leviathan CLI

**Leviathan of HaShem** — local agent CLI. The remote LLM thinks; your machine acts.

Same feature on Windows, macOS, Linux. One install. One command.

## Install

```bash
pip install leviathan
```

No PyPI yet? Install from your Hetzner origin:

```bash
pip install https://api.metanoiaunlimited.com/downloads/leviathan-latest.whl
```

Then:

```bash
leviathan login             # one-time browser login
leviathan install-browser   # optional: Playwright Chromium for browser tools
leviathan                   # interactive
leviathan run "write an elephant story to C:\Users\me\Documents\elephants.txt"
```

## What it does

The CLI runs on your box as your user. It:

1. Streams prompts to `api.metanoiaunlimited.com/api/cli/stream`.
2. Receives `tool_use` events from the remote LLM.
3. Executes them **locally** with your filesystem/browser/LLM permissions.
4. Streams results back.

Exactly how Claude Code works, but for the Leviathan platform.

## Tool capabilities

- **Filesystem**: `file_write`, `file_read`, `file_find`, `archive_extract`, `bash`
- **Browser** (Playwright Chromium): `browser_open`, `browser_screenshot`, `browser_click`, `browser_fill`, `browser_eval`, `browser_read_text`
- **Local LLMs**: `llm_discover` (Ollama, LM Studio, llama.cpp, vLLM, Jan, KoboldCpp, oobabooga), `llm_call_local`
- **Builders** (delegated to server): `build_app`, `build_game`, `build_video`, `build_voice`, `build_image`, `build_mobile`, `build_website`, `build_saas`

Run `leviathan tools` to see the full list.

## Safety

- Writes **inside** your home directory are allowed by default.
- Writes **outside** your home require `--allow-outside-home` or explicit per-call opt-in.
- Credentials stored in `~/.leviathan/credentials.json` (chmod 600 on Unix).
- `bash` commands are NOT filtered — you are sovereign on your machine. The remote LLM's commands run as you.

## Self-check

```bash
leviathan health
```

Shows credentials status, server reachability (primary + Hetzner fallback), registered tool count, Playwright install status, detected local LLM servers.

## Sacred Artifact Protocol

This CLI never deletes existing user data. All file operations are add-only or explicit overwrite. Tools that would overwrite a file return a warning first unless `--force` is passed.

## Bundled `lvtn` alias

Both `leviathan` and `lvtn` map to the same entry point. Use whichever you prefer.
