diff --git a/Dockerfile b/Dockerfile index a2a4c94..6d0eab3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,15 @@ LABEL description="SmartTools - Personal AI-powered CLI command builder" RUN apt-get update && apt-get install -y --no-install-recommends \ git \ curl \ + # Node.js for Claude CLI + nodejs \ + npm \ + # Browser for OAuth authentication + firefox-esr \ + # X11 libraries for display + libx11-6 \ + libxext6 \ + libxrender1 \ && rm -rf /var/lib/apt/lists/* # Set working directory diff --git a/docker-compose.yml b/docker-compose.yml index ade2510..0ff07cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -48,6 +48,26 @@ services: stdin_open: true tty: true + # ============================================================================ + # Setup (with display for browser-based auth) + # ============================================================================ + # Use this for installing providers that need browser authentication + # First run: xhost +local:docker + setup: + build: + context: . + dockerfile: Dockerfile + image: smarttools:latest + environment: + - DISPLAY=${DISPLAY:-:0} + volumes: + - smarttools-data:/root/.smarttools + - /tmp/.X11-unix:/tmp/.X11-unix:ro + command: ["/bin/bash"] + stdin_open: true + tty: true + network_mode: host + volumes: smarttools-data: # Persists ~/.smarttools between container runs @@ -68,3 +88,10 @@ volumes: # # Interactive shell: # docker-compose run --rm shell +# +# Install providers (with browser auth): +# xhost +local:docker +# docker-compose run --rm setup +# # Inside container: +# smarttools providers install # Interactive guide +# # Select a provider, it will install and open browser for auth