# Artifact Editor - AI-enhanced diagram and artifact creation # # Quick Start: # docker-compose build # Build the image (clones CmdForge from Gitea) # docker-compose run --rm test # Run tests # docker-compose run --rm cli artifact-ai --help # # Dependencies: # - CmdForge (cloned automatically from Gitea during build) version: '3.8' services: # ============================================================================ # Main CLI # ============================================================================ cli: build: context: . dockerfile: Dockerfile args: CMDFORGE_REPO: https://gitea.brrd.tech/rob/CmdForge.git image: artifact-editor:latest volumes: - cmdforge-data:/root/.cmdforge - /tmp/artifacts:/tmp/artifacts command: ["artifact-ai", "--help"] # ============================================================================ # Tests # ============================================================================ test: build: context: . dockerfile: Dockerfile args: CMDFORGE_REPO: https://gitea.brrd.tech/rob/CmdForge.git image: artifact-editor:latest volumes: - cmdforge-data:/root/.cmdforge command: > bash -c " echo '=== Artifact Editor Tests ===' echo '' echo '1. Checking CmdForge...' cmdforge list | head -5 echo '' echo '2. Checking artifact-ai...' artifact-ai --help > /dev/null && echo 'artifact-ai: OK' echo '' echo '3. Checking artifact-export...' artifact-export --help > /dev/null && echo 'artifact-export: OK' echo '' echo '4. Running unit tests...' pytest -v tests/ 2>/dev/null || echo 'No tests found or tests skipped' echo '' echo '=== All checks passed ===' " # ============================================================================ # GUI (requires X11 forwarding) # ============================================================================ gui: build: context: . dockerfile: Dockerfile args: CMDFORGE_REPO: https://gitea.brrd.tech/rob/CmdForge.git image: artifact-editor:latest environment: - DISPLAY=${DISPLAY:-:0} - QT_QPA_PLATFORM=xcb volumes: - cmdforge-data:/root/.cmdforge - /tmp/artifacts:/tmp/artifacts - /tmp/.X11-unix:/tmp/.X11-unix:ro command: ["artifact-editor"] network_mode: host # ============================================================================ # Interactive Shell # ============================================================================ shell: build: context: . dockerfile: Dockerfile args: CMDFORGE_REPO: https://gitea.brrd.tech/rob/CmdForge.git image: artifact-editor:latest volumes: - cmdforge-data:/root/.cmdforge - /tmp/artifacts:/tmp/artifacts command: ["/bin/bash"] stdin_open: true tty: true volumes: cmdforge-data: # Persists ~/.cmdforge between container runs # ============================================================================== # Usage Examples # ============================================================================== # # Build (fetches CmdForge from Gitea automatically): # docker-compose build # # Run tests: # docker-compose run --rm test # # Use CLI: # docker-compose run --rm cli artifact-ai --format plantuml --instruction "Create class diagram" # echo "@startuml\nA->B\n@enduml" | docker-compose run --rm cli artifact-export --format plantuml --to /dev/stdout # # Launch GUI (requires: xhost +local:docker): # docker-compose run --rm gui # # Interactive shell: # docker-compose run --rm shell