Metadata-Version: 2.4
Name: vexy-lines-cli
Version: 1.0.29
Summary: CLI tool and MCP passthrough server for Vexy Lines
Project-URL: Documentation, https://github.com/vexyart/vexy-lines/tree/main/vexy-lines-cli#readme
Project-URL: Issues, https://github.com/vexyart/vexy-lines/issues
Project-URL: Source, https://github.com/vexyart/vexy-lines/tree/main/vexy-lines-cli
Author-email: "Fontlab Ltd." <opensource@vexy.art>
License: MIT
License-File: LICENSE
Keywords: cli,creative-tools,mcp,vector-art,vexy-lines
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Multimedia :: Graphics
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: fire>=0.6.0
Requires-Dist: loguru>=0.7.2
Requires-Dist: vexy-lines-apy>=1.0.20
Description-Content-Type: text/markdown

# vexy-lines-cli

Command-line interface and MCP passthrough server for [Vexy Lines](https://vexy.art) — the macOS vector art app.

Parse `.lines` files, batch export to PDF/SVG, apply styles to images and video, and connect Claude Desktop or Cursor directly to the Vexy Lines MCP API.

## Install

```bash
pip install vexy-lines-cli
```

Requires Python 3.11+. Pulls in `vexy-lines-apy` (MCP client, style engine) and `vexy-lines-py` (parser) automatically.

For video processing and the GUI: `pip install vexy-lines-run` (all dependencies are included).

## Quick start

```bash
# Inspect a file without opening the app
vexy-lines-cli info artwork.lines

# Show the layer/group/fill tree
vexy-lines-cli file-tree artwork.lines

# Export a folder of .lines files to PDF (auto-launches the app)
vexy-lines-cli export ./my-art/ --format pdf

# Apply a style template to a folder of photos
vexy-lines-cli style-transfer --style template.lines --input-dir ./photos/ --output-dir ./out/

# Check MCP connectivity
vexy-lines-cli mcp-status
```

## Subcommand reference

### Parser — no app required

| Command | What it does |
|---|---|
| `info <file>` | Show caption, DPI, dimensions, layer/fill counts |
| `file-tree <file>` | Print the layer/group/fill hierarchy |
| `extract-source <file>` | Save the embedded source image to disk |
| `extract-preview <file>` | Save the embedded preview image to disk |
| `batch-convert` | Extract preview or source images from a directory of `.lines` files |

All parser commands accept `--json-output` for machine-readable output.

```bash
vexy-lines-cli info artwork.lines --json-output
vexy-lines-cli batch-convert --input-dir ./art/ --output-dir ./thumbs/ --what preview --format jpg
```

### Export — auto-launches app

Uses dialog-less export: injects settings into macOS preferences, triggers `File > Export`, then restores original prefs. Input can be a single file or a directory.

```bash
vexy-lines-cli export ./art/ --format svg --output ./svg-out/
vexy-lines-cli export artwork.lines --format pdf --dry-run   # preview without exporting
vexy-lines-cli export ./art/ --force --timeout-multiplier 2
```

Options: `--format` (`pdf`/`svg`), `--force`, `--dry-run`, `--timeout-multiplier` (0.1–10.0), `--max-retries` (0–10), `--say-summary`.

### Style — app must be running

```bash
# Single style across all images
vexy-lines-cli style-transfer --style look.lines --input-dir ./frames/ --format svg

# Interpolate between two styles across the sequence
vexy-lines-cli style-transfer --style start.lines --end-style end.lines \
    --input-dir ./frames/ --output-dir ./out/

# Apply style to video
vexy-lines-cli style-video --style look.lines --input clip.mp4 --output result.mp4

# Resume an interrupted video job (automatic — just re-run the same command)
vexy-lines-cli style-video --style look.lines --input clip.mp4 --output result.mp4

# Force restart (discard cached frames)
vexy-lines-cli style-video --style look.lines --input clip.mp4 --output result.mp4 --force

# Auto-clean job folder after completion
vexy-lines-cli style-transfer --style look.lines --input-dir ./frames/ --cleanup
```

All style commands create a **job folder** (`{output}-vljob/`) that stores intermediate `.lines`, `.svg`, and raster files. If the process is interrupted, re-running the same command skips already-completed items. Use `--force` to start fresh or `--cleanup` to remove the job folder after completion.

### MCP — app must be running

Direct JSON-RPC calls to the Vexy Lines embedded server (`localhost:47384`).

| Command | What it does |
|---|---|
| `mcp-status` | Check if the MCP server is reachable |
| `tree` | Print the live document layer tree |
| `new-document` | Create a new document |
| `open <file>` | Open a `.lines` file |
| `add-fill <layer-id> <fill-type>` | Add a fill to a layer |
| `render` | Trigger a full render |

```bash
vexy-lines-cli mcp-status
vexy-lines-cli tree --json-output
vexy-lines-cli new-document --width 210 --height 297 --dpi 300
vexy-lines-cli add-fill 42 linear --color "#ff0000"
```

All MCP commands accept `--host` and `--port` (defaults: `127.0.0.1:47384`).

### MCP bridge

| Command | What it does |
|---|---|
| `mcp-serve` | Start the stdio-to-TCP bridge (same as running `vexy-lines-mcp`) |

## MCP server setup

`vexy-lines-mcp` bridges Claude Desktop and Cursor to the Vexy Lines TCP server. It reads newline-delimited JSON-RPC from stdin, forwards over TCP, and writes responses to stdout.

Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "vexy-lines": {
      "command": "vexy-lines-mcp"
    }
  }
}
```

For Cursor, add the same block under `mcp.servers` in `.cursor/mcp.json`.

The bridge auto-launches the Vexy Lines app on first connection. Pass `--no-launch` to disable:

```bash
vexy-lines-cli mcp-serve --no-launch
vexy-lines-cli mcp-serve --host 127.0.0.1 --port 47384
```

## Full documentation

[Read the docs](https://vexyart.github.io/vexy-lines/vexy-lines-cli/) for the complete CLI reference, export pipeline internals, and more examples.

## License

MIT
