Metadata-Version: 2.4
Name: zyora-cli
Version: 0.1.0
Summary: Zyora CLI - AI-powered code generation and security scanning
Project-URL: Homepage, https://zyoralabs.com
Project-URL: Documentation, https://app.zyoralabs.com/docs
Project-URL: Repository, https://github.com/zyoralabs/zyora-cli
Author-email: Zyora Labs <support@zyoralabs.com>
License-Expression: MIT
Keywords: ai,cli,code-generation,llm,security
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Classifier: Topic :: Software Development
Requires-Python: >=3.9
Requires-Dist: httpx>=0.25.0
Requires-Dist: pathspec>=0.11.0
Requires-Dist: prompt-toolkit>=3.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pygments>=2.16.0
Requires-Dist: rich>=13.0.0
Requires-Dist: toml>=0.10.0
Requires-Dist: typer[all]>=0.9.0
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# Zyora CLI

AI-powered code generation and security scanning from the command line.

## Installation

```bash
pip install zyora-cli
```

Or install from source:

```bash
git clone https://github.com/zyoralabs/zyora-cli
cd zyora-cli
pip install -e .
```

## Quick Start

1. **Get your API key** at [app.zyoralabs.com/register](https://app.zyoralabs.com/register)

2. **Configure the CLI**:
   ```bash
   zyora config set api_key zy-your-api-key-here
   ```

3. **Start using Zyora**:
   ```bash
   # Interactive mode (like Claude Code)
   zyora

   # One-shot chat
   zyora chat "Write a Python function to validate emails"

   # Scan code for vulnerabilities
   zyora scan file app.py
   ```

## Features

### Interactive Mode

Start an interactive session with context awareness:

```bash
zyora
```

**Commands in interactive mode:**

| Command | Description |
|---------|-------------|
| `/help` | Show help |
| `/clear` | Clear conversation |
| `/context` | Show files in context |
| `/add <file>` | Add file to context |
| `/remove <file>` | Remove from context |
| `/scan <file>` | Scan file for vulnerabilities |
| `/project` | Show project summary |
| `/model` | Show model info |
| `/config` | Show configuration |
| `/exit` | Exit |

**Tips:**
- Use `@filename` to reference files in your prompt
- Pipe code directly: `cat app.py | zyora chat "explain this"`

### Chat Mode

Send one-off prompts:

```bash
# Simple prompt
zyora chat "Write a function to merge two sorted lists"

# With file context
zyora chat "Review this code" -c main.py -c utils.py

# From file
zyora chat -f prompt.txt

# Pipe input
cat code.py | zyora chat "Explain this code"

# Save output
zyora chat "Write a REST API" -o api.py
```

### Security Scanning

Scan code for vulnerabilities:

```bash
# Scan a single file
zyora scan file app.py

# Scan a directory
zyora scan dir ./src

# Scan with specific extensions
zyora scan dir ./src --ext py,js

# Save results
zyora scan file app.py -o report.md
```

The scanner detects:
- SQL Injection (CWE-89)
- Cross-Site Scripting (CWE-79)
- Command Injection (CWE-78)
- Path Traversal (CWE-22)
- Hardcoded Credentials (CWE-798)
- And many more...

### Configuration

```bash
# Show all config
zyora config show

# Set values
zyora config set api_key zy-xxx
zyora config set max_tokens 8192
zyora config set temperature 0.5

# Get a value
zyora config get model

# Reset to defaults
zyora config reset
```

**Environment variables:**
- `ZYORA_API_KEY` - API key
- `ZYORA_API_BASE` - API base URL
- `ZYORA_MODEL` - Model to use
- `ZYORA_MAX_TOKENS` - Max response tokens

## Examples

### Generate Code

```bash
# Generate a REST API
zyora chat "Create a FastAPI REST API with user authentication"

# Generate with context
zyora chat "Add error handling to this" -c server.py
```

### Review Code

```bash
# Code review
cat pull_request.diff | zyora chat "Review this code change"

# Architecture review
zyora chat "Review the architecture" -c main.py -c models.py -c routes.py
```

### Security Audit

```bash
# Full project scan
zyora scan dir ./src --recursive -o security-report.md

# Quick scan
zyora scan file api/auth.py
```

### Interactive Session

```
$ zyora

╔═══════════════════════════════════════════════════════════════╗
║   ███████╗██╗   ██╗ ██████╗ ██████╗  █████╗                   ║
║   ╚══███╔╝╚██╗ ██╔╝██╔═══██╗██╔══██╗██╔══██╗                  ║
║     ███╔╝  ╚████╔╝ ██║   ██║██████╔╝███████║                  ║
║    ███╔╝    ╚██╔╝  ██║   ██║██╔══██╗██╔══██║                  ║
║   ███████╗   ██║   ╚██████╔╝██║  ██║██║  ██║                  ║
║   ╚══════╝   ╚═╝    ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝                  ║
║                                                               ║
║   AI-Powered Code Generation & Security Scanning              ║
╚═══════════════════════════════════════════════════════════════╝

Type /help for commands, /exit to quit

zyora > /add src/main.py
Added: src/main.py

zyora [1] > What does this code do?
...
```

## API Usage

You can also use Zyora programmatically:

```python
from zyora.client import ZyoraClient, Message

client = ZyoraClient(api_key="zy-xxx")

# Simple chat
response = client.chat([
    Message(role="user", content="Write hello world in Python")
])
print(response.content)

# Streaming
for chunk in client.chat(messages, stream=True):
    print(chunk, end="")
```

## Requirements

- Python 3.9+
- API key from [app.zyoralabs.com](https://app.zyoralabs.com)

## License

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

## Links

- **Website**: [zyoralabs.com](https://zyoralabs.com)
- **API Portal**: [app.zyoralabs.com](https://app.zyoralabs.com)
- **Documentation**: [app.zyoralabs.com/docs](https://app.zyoralabs.com/docs)
- **Model**: [huggingface.co/zyoralabs/Zyora-DEV-32B](https://huggingface.co/zyoralabs/Zyora-DEV-32B)
