178 lines
3.0 KiB
Markdown
178 lines
3.0 KiB
Markdown
# Art DAG Client
|
|
|
|
CLI for interacting with the Art DAG L1 rendering server.
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
## Usage
|
|
|
|
```bash
|
|
# Set server URL (default: http://localhost:8100)
|
|
export ARTDAG_SERVER=http://localhost:8100
|
|
|
|
# Or pass with every command
|
|
./artdag.py --server http://localhost:8100 <command>
|
|
```
|
|
|
|
## Authentication
|
|
|
|
The client authenticates against an L2 server for commands that require login (e.g., `run`, `publish`).
|
|
|
|
```bash
|
|
# Set L2 server URL (default: http://localhost:8200)
|
|
export ARTDAG_L2=https://artdag.rose-ash.com
|
|
|
|
# Or pass with every command
|
|
./artdag.py --l2 https://artdag.rose-ash.com <command>
|
|
```
|
|
|
|
### Login
|
|
```bash
|
|
./artdag.py login <username>
|
|
# You'll be prompted for your password
|
|
|
|
# Or specify password with -p flag (will prompt)
|
|
./artdag.py login <username> -p
|
|
```
|
|
|
|
### Register
|
|
```bash
|
|
./artdag.py register <username>
|
|
# You'll be prompted to enter and confirm your password
|
|
|
|
# Optionally include email
|
|
./artdag.py register <username> --email user@example.com
|
|
```
|
|
|
|
### Check Current User
|
|
```bash
|
|
./artdag.py whoami
|
|
```
|
|
|
|
### Logout
|
|
```bash
|
|
./artdag.py logout
|
|
```
|
|
|
|
## Commands
|
|
|
|
### Server Info
|
|
```bash
|
|
./artdag.py info
|
|
```
|
|
|
|
### List Known Assets
|
|
```bash
|
|
./artdag.py assets
|
|
```
|
|
|
|
### Start a Rendering Run
|
|
```bash
|
|
# Using asset name
|
|
./artdag.py run dog cat
|
|
|
|
# Using content hash
|
|
./artdag.py run dog 33268b6e167deaf018cc538de12dbe562612b33e89a749391cef855b320a269b
|
|
|
|
# Wait for completion
|
|
./artdag.py run dog cat --wait
|
|
|
|
# Custom output name
|
|
./artdag.py run dog cat --name my-dog-video
|
|
```
|
|
|
|
### List Runs
|
|
```bash
|
|
./artdag.py runs
|
|
./artdag.py runs --limit 20
|
|
```
|
|
|
|
### Check Run Status
|
|
```bash
|
|
./artdag.py status <run-id>
|
|
```
|
|
|
|
### Delete a Run
|
|
```bash
|
|
./artdag.py delete-run <run-id>
|
|
|
|
# Skip confirmation
|
|
./artdag.py delete-run <run-id> -f
|
|
```
|
|
|
|
### List Cached Content
|
|
```bash
|
|
./artdag.py cache
|
|
```
|
|
|
|
### View/Download Cached Content
|
|
```bash
|
|
# Show info
|
|
./artdag.py view <content-hash>
|
|
|
|
# Download to file
|
|
./artdag.py view <content-hash> -o output.mkv
|
|
|
|
# Pipe to mpv (use -o - for stdout)
|
|
./artdag.py view <content-hash> -o - | mpv -
|
|
```
|
|
|
|
### Import Local File to Cache
|
|
```bash
|
|
./artdag.py import /path/to/file.jpg
|
|
```
|
|
|
|
### Delete Cached Content
|
|
```bash
|
|
./artdag.py delete-cache <content-hash>
|
|
|
|
# Skip confirmation
|
|
./artdag.py delete-cache <content-hash> -f
|
|
```
|
|
|
|
Note: Items that are inputs/outputs of runs, or published to L2, cannot be deleted.
|
|
|
|
### Config Commands
|
|
|
|
Configs are reusable DAG definitions with fixed and variable inputs.
|
|
|
|
```bash
|
|
# Upload a config YAML file
|
|
./artdag.py upload-config recipe.yaml
|
|
|
|
# List configs
|
|
./artdag.py configs
|
|
|
|
# View config details
|
|
./artdag.py config <config-id>
|
|
|
|
# Run a config with variable inputs
|
|
./artdag.py run-config <config-id> -i node_id:content_hash --wait
|
|
|
|
# Delete a config
|
|
./artdag.py delete-config <config-id>
|
|
```
|
|
|
|
## Example Workflow
|
|
|
|
```bash
|
|
# Check server
|
|
./artdag.py info
|
|
|
|
# See available assets
|
|
./artdag.py assets
|
|
|
|
# Run dog effect on cat, wait for result
|
|
./artdag.py run dog cat --wait
|
|
|
|
# List completed runs
|
|
./artdag.py runs
|
|
|
|
# Download the output
|
|
./artdag.py view <output-hash> -o result.mkv
|
|
```
|