xelta-cli 0.1.2__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/PKG-INFO +1 -1
- xelta_cli-0.1.3/README.md +84 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/pyproject.toml +1 -1
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/cli.py +9 -0
- xelta_cli-0.1.3/xelta/commands/install.py +85 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta_cli.egg-info/PKG-INFO +1 -1
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta_cli.egg-info/SOURCES.txt +2 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/setup.cfg +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/__init__.py +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/auth.py +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/commands/__init__.py +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/commands/balance.py +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/commands/image.py +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/commands/mixboard.py +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/commands/reel.py +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/commands/status.py +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/commands/street_ad.py +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/commands/website.py +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/config.py +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta/oauth.py +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta_cli.egg-info/dependency_links.txt +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta_cli.egg-info/entry_points.txt +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta_cli.egg-info/requires.txt +0 -0
- {xelta_cli-0.1.2 → xelta_cli-0.1.3}/xelta_cli.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Xelta CLI
|
|
2
|
+
|
|
3
|
+
Official command-line interface for [xelta.ai](https://xelta.ai) — generate images, reels, websites, street ads, and more from your terminal.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install xelta-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Authentication
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
xelta login --token <your-jwt-token>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Commands
|
|
18
|
+
|
|
19
|
+
### Check Status & Balance
|
|
20
|
+
```bash
|
|
21
|
+
xelta status # Check connection and auth
|
|
22
|
+
xelta balance # Check your credit balance
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Generate an Image
|
|
26
|
+
```bash
|
|
27
|
+
xelta image "a futuristic city at night"
|
|
28
|
+
```
|
|
29
|
+
Picks model and resolution interactively. Or skip the prompts:
|
|
30
|
+
```bash
|
|
31
|
+
xelta image "a futuristic city at night" --model seedream-5-0-lite-workflow --size 2K
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Generate a Mixboard
|
|
35
|
+
A grid of AI images from a single prompt:
|
|
36
|
+
```bash
|
|
37
|
+
xelta mixboard "luxury car showroom vibes"
|
|
38
|
+
xelta mixboard "neon Tokyo street" --num 12
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Generate a Street Ad
|
|
42
|
+
Graffiti-style brand ad:
|
|
43
|
+
```bash
|
|
44
|
+
xelta street-ad "Nike"
|
|
45
|
+
xelta street-ad "Adidas" --style graffiti --surface brick --logo ./logo.png
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Generate a Video Reel
|
|
49
|
+
```bash
|
|
50
|
+
xelta reel "a cinematic product reveal for a sports shoe"
|
|
51
|
+
xelta reel "drone shot over mountains" --image ./photo.jpg
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### AI Website Builder
|
|
55
|
+
```bash
|
|
56
|
+
xelta website build "A modern portfolio for a UX designer" --industry technology --pages "Home, About, Contact"
|
|
57
|
+
xelta website build "Coffee shop website" --industry food --pages "Home, Menu, Contact" --deploy
|
|
58
|
+
xelta website history
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## All Options
|
|
62
|
+
|
|
63
|
+
| Command | Option | Description |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| `login` | `--token` | Paste JWT directly |
|
|
66
|
+
| `image` | `--model` | Skip model picker |
|
|
67
|
+
| `image` | `--size` | 1080p, 2K, or 4K |
|
|
68
|
+
| `image` | `--no-optimize` | Disable prompt enhancement |
|
|
69
|
+
| `mixboard` | `--num` | Number of images (default: 8) |
|
|
70
|
+
| `street-ad` | `--style` | auto, graffiti, stencil, wildstyle |
|
|
71
|
+
| `street-ad` | `--surface` | brick, wall, concrete |
|
|
72
|
+
| `street-ad` | `--logo` | Path or URL to logo |
|
|
73
|
+
| `reel` | `--image` | Path or URL to image |
|
|
74
|
+
| `website build` | `--industry` | technology, fashion, healthcare, etc. |
|
|
75
|
+
| `website build` | `--pages` | Comma-separated page list |
|
|
76
|
+
| `website build` | `--palette` | Color palette name or hex values |
|
|
77
|
+
| `website build` | `--logo` | Path or URL to logo |
|
|
78
|
+
| `website build` | `--deploy` | Deploy live to Vercel |
|
|
79
|
+
| `website history` | `--limit` | Number of results (default: 5) |
|
|
80
|
+
|
|
81
|
+
## Requirements
|
|
82
|
+
|
|
83
|
+
- Python 3.10+
|
|
84
|
+
- A valid Xelta account with credits
|
|
@@ -8,6 +8,7 @@ from xelta.commands.mixboard import mixboard_cmd
|
|
|
8
8
|
from xelta.commands.street_ad import street_ad_cmd
|
|
9
9
|
from xelta.commands.reel import reel_cmd
|
|
10
10
|
from xelta.commands import website
|
|
11
|
+
from xelta.commands.install import install_cmd
|
|
11
12
|
|
|
12
13
|
console = Console()
|
|
13
14
|
|
|
@@ -100,3 +101,11 @@ def reel(
|
|
|
100
101
|
|
|
101
102
|
|
|
102
103
|
app.add_typer(website.app, name="website")
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@app.command()
|
|
107
|
+
def install(
|
|
108
|
+
target: str = typer.Argument(..., help="Integration to install: claude-code"),
|
|
109
|
+
):
|
|
110
|
+
"""Install Xelta integrations (e.g. xelta install claude-code)."""
|
|
111
|
+
install_cmd(target=target)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import shutil
|
|
3
|
+
import subprocess
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
import typer
|
|
8
|
+
from rich.console import Console
|
|
9
|
+
|
|
10
|
+
from xelta.auth import load_token
|
|
11
|
+
|
|
12
|
+
console = Console()
|
|
13
|
+
|
|
14
|
+
SUPPORTED_TARGETS = {"claude-code"}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def install_cmd(target: str):
|
|
18
|
+
if target not in SUPPORTED_TARGETS:
|
|
19
|
+
console.print(
|
|
20
|
+
f"[red]Unknown target:[/red] {target!r}\n"
|
|
21
|
+
f"Supported: {', '.join(sorted(SUPPORTED_TARGETS))}"
|
|
22
|
+
)
|
|
23
|
+
raise typer.Exit(1)
|
|
24
|
+
|
|
25
|
+
jwt = load_token()
|
|
26
|
+
if not jwt:
|
|
27
|
+
console.print(
|
|
28
|
+
"[red]Not logged in.[/red] Run [bold]xelta login --token <jwt>[/bold] first."
|
|
29
|
+
)
|
|
30
|
+
raise typer.Exit(1)
|
|
31
|
+
|
|
32
|
+
# Install / upgrade xelta-mcp from PyPI
|
|
33
|
+
console.print("[dim]Installing xelta-mcp...[/dim]")
|
|
34
|
+
result = subprocess.run(
|
|
35
|
+
[sys.executable, "-m", "pip", "install", "--upgrade", "xelta-mcp"],
|
|
36
|
+
capture_output=True,
|
|
37
|
+
text=True,
|
|
38
|
+
)
|
|
39
|
+
if result.returncode != 0:
|
|
40
|
+
console.print(f"[red]pip install failed:[/red]\n{result.stderr.strip()}")
|
|
41
|
+
raise typer.Exit(1)
|
|
42
|
+
console.print("[green]xelta-mcp installed.[/green]")
|
|
43
|
+
|
|
44
|
+
# Locate the xelta-mcp binary; fall back to `python -m xelta_mcp.server`
|
|
45
|
+
mcp_bin = shutil.which("xelta-mcp")
|
|
46
|
+
if not mcp_bin:
|
|
47
|
+
scripts_dir = Path(sys.executable).parent / "Scripts"
|
|
48
|
+
candidate = scripts_dir / "xelta-mcp.exe"
|
|
49
|
+
if candidate.exists():
|
|
50
|
+
mcp_bin = str(candidate)
|
|
51
|
+
|
|
52
|
+
if mcp_bin:
|
|
53
|
+
mcp_command = mcp_bin
|
|
54
|
+
mcp_args = []
|
|
55
|
+
else:
|
|
56
|
+
mcp_command = sys.executable
|
|
57
|
+
mcp_args = ["-m", "xelta_mcp.server"]
|
|
58
|
+
|
|
59
|
+
# Write MCP server entry into ~/.claude/settings.json
|
|
60
|
+
claude_settings = Path.home() / ".claude" / "settings.json"
|
|
61
|
+
claude_settings.parent.mkdir(exist_ok=True)
|
|
62
|
+
|
|
63
|
+
if claude_settings.exists():
|
|
64
|
+
try:
|
|
65
|
+
settings = json.loads(claude_settings.read_text(encoding="utf-8"))
|
|
66
|
+
except Exception:
|
|
67
|
+
settings = {}
|
|
68
|
+
else:
|
|
69
|
+
settings = {}
|
|
70
|
+
|
|
71
|
+
settings.setdefault("mcpServers", {})
|
|
72
|
+
settings["mcpServers"]["xelta"] = {
|
|
73
|
+
"command": mcp_command,
|
|
74
|
+
"args": mcp_args,
|
|
75
|
+
"env": {"XELTA_JWT_TOKEN": jwt},
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
claude_settings.write_text(
|
|
79
|
+
json.dumps(settings, indent=2), encoding="utf-8"
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
console.print("[green]Xelta MCP server registered in Claude Code.[/green]")
|
|
83
|
+
console.print(f" Config: {claude_settings}")
|
|
84
|
+
console.print(f" Binary: {mcp_command}")
|
|
85
|
+
console.print("\n[bold]Restart Claude Code to apply the changes.[/bold]")
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
README.md
|
|
1
2
|
pyproject.toml
|
|
2
3
|
xelta/__init__.py
|
|
3
4
|
xelta/auth.py
|
|
@@ -7,6 +8,7 @@ xelta/oauth.py
|
|
|
7
8
|
xelta/commands/__init__.py
|
|
8
9
|
xelta/commands/balance.py
|
|
9
10
|
xelta/commands/image.py
|
|
11
|
+
xelta/commands/install.py
|
|
10
12
|
xelta/commands/mixboard.py
|
|
11
13
|
xelta/commands/reel.py
|
|
12
14
|
xelta/commands/status.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|