Zyora CLI - AI-powered code generation and security scanning
Project description
Zyora CLI
AI-powered code generation and security scanning from the command line.
Installation
pip install zyora-cli
Or install from source:
git clone https://github.com/zyoralabs/zyora-cli
cd zyora-cli
pip install -e .
Quick Start
-
Get your API key at app.zyoralabs.com/register
-
Configure the CLI:
zyora config set api_key zy-your-api-key-here
-
Start using Zyora:
# 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:
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
@filenameto reference files in your prompt - Pipe code directly:
cat app.py | zyora chat "explain this"
Chat Mode
Send one-off prompts:
# 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:
# 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
# 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 keyZYORA_API_BASE- API base URLZYORA_MODEL- Model to useZYORA_MAX_TOKENS- Max response tokens
Examples
Generate Code
# 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
# 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
# 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:
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
License
MIT License - see LICENSE for details.
Links
- Website: zyoralabs.com
- API Portal: app.zyoralabs.com
- Documentation: app.zyoralabs.com/docs
- Model: huggingface.co/zyoralabs/Zyora-DEV-32B
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zyora_cli-0.1.0.tar.gz.
File metadata
- Download URL: zyora_cli-0.1.0.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93f9c11398d6a4bbbf54fd320ec8115ba4899cd3f6d001e803ac33443509d1bf
|
|
| MD5 |
6daa6dc9dcf7097d66639b2cbd094ad3
|
|
| BLAKE2b-256 |
c5028d991d20724c12f15352ab5e9a2473fcb68b962ab52544c427742287856d
|
File details
Details for the file zyora_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zyora_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14ae737a725b42e4b04f1652c15b78057b87c54554ab620f2d4d581de7412c5e
|
|
| MD5 |
5972e66d63bb37d7d6075c2f5229b4c8
|
|
| BLAKE2b-256 |
c5c64b526953c2059d03a18f3d42c183529c4429292c9eedae9e1318d797aec7
|