GitHub - PlatOps-AI/goosecode-server: A containerized VS Code server environment with integrated Goose AI coding assistant.
Extracto
A containerized VS Code server environment with integrated Goose AI coding assistant. - PlatOps-AI/goosecode-server
Resumen
Resumen Principal
Goosecode Server es un entorno de desarrollo integrado que encapsula un VS Code Server en un contenedor Docker, enriquecido con el agente de codificación Goose AI. Este proyecto ofrece una solución robusta para desarrolladores que buscan un entorno de codificación accesible desde el navegador, combinando la familiaridad y potencia de VS Code con las capacidades avanzadas de la inteligencia artificial. La integración preconfigurada del agente Goose AI, junto con características como una sesión de terminal compartida y una Goose Terminal API para automatización, posiciona a Goosecode Server como una herramienta altamente eficiente para flujos de trabajo de desarrollo modernos. Además, su diseño enfocado en la seguridad con protección por contraseña, persistencia de configuraciones y una interfaz de usuario optimizada con tema Material Design, lo convierte en una opción atractiva para equipos que buscan estandarizar y optimizar sus entornos de desarrollo colaborativos y asistidos por IA.
Elementos Clave
- Integración profunda de VS Code Server con Goose AI: El proyecto provee un setup Docker listo para usar que combina un entorno VS Code completo accesible vía navegador con un agente de codificación Goose AI preinstalado y configurado. Esto facilita un desarrollo rápido y asistido por IA, presentando también un tema oscuro Material Design y una interfaz de usuario con iconos mejorados para una experiencia de codificación visualmente atractiva y funcional.
- Funcionalidades colaborativas y de automatización: Goosecode Server destaca por su sesión de terminal compartida de Goose AI, visible y persistente en todas las ventanas del navegador, lo que permite a múltiples usuarios ver e interactuar con la misma conversación. Complementariamente, ofrece una Goose Terminal API (REST) para enviar comandos a la terminal y recuperar logs de sesión, junto con conversaciones de IA en tiempo real mediante Server-Sent Events (SSE).
- Gestión y personalización flexible: El proyecto incluye un script
run.shque simplifica la gestión del contenedor, permitiendo construir la imagen, iniciar/detener el contenedor y pasar variables de entorno de manera eficiente. Los usuarios pueden personalizar la configuración de la instancia (puertos, contraseñas, claves API, configuraciones de Git) a través de un archivo.envo argumentos de línea de comandos, garantizando una gran adaptabilidad a distintos requisitos del proyecto. - Persistencia y control de sesiones AI: Una característica crucial es la capacidad de mantener la configuración y las variables de entorno entre sesiones, asegurando la persistencia del entorno. Además, permite a los usuarios especificar un
GOOSE_SESSION_IDy reanudar una sesión Goose existente, lo cual es fundamental para mantener la continuidad en los proyectos y facilitar la colaboración al permitir que los miembros del equipo compartan y continúen interacciones específicas con la IA.
Análisis e Implicaciones
Goosecode Server mejora significativamente la productividad del desarrollador al integrar herramientas de desarrollo y asistencia de IA en un entorno único y accesible. Su enfoque en la colaboración y la persistencia de sesiones lo hace ideal para equipos distribuidos que buscan flujos de trabajo eficientes y la adopción de desarrollo asistido por IA de manera centralizada.
Contexto Adicional
El proyecto se entrega como una solución Dockerizada, lo que garantiza una implementación sencilla y consistente en diferentes entornos, con una fuerte apuesta por la seguridad mediante instancias protegidas por contraseña.
Contenido
Goosecode Server
A containerized VS Code server environment with integrated Goose AI coding agent. This project provides a ready-to-use Docker setup that combines VS Code Server with the Goose AI agent, allowing you to access a powerful coding environment through your browser.
Features
- Browser-Based Development: Access VS Code directly from your browser
- Goose AI Agent: Pre-installed and configured Goose AI Coding agent
- Shared Terminal Session: The same Goose session is visible in all browser windows
- Goose Terminal API: REST API for sending commands to the terminal and retrieving session logs
- Streaming Conversations: Real-time streaming of Goose AI conversations using Server-Sent Events (SSE)
- Material Design: Dark theme with Material icons for a beautiful coding experience
- Secure Environment: Password-protected VS Code Server instance
- Git Integration: Git pre-installed and ready for repository operations
- Persistent Configuration: Environment variables and configuration preserved between sessions (Unless workspace is deleted)
Quick Start
-
Clone this repository
git clone https://github.com/PlatOps-AI/goosecode-server.git cd goosecode-server -
Create or edit
.envfile with your OpenAI API keycp .env.example .env # Edit .env with your API key -
Run the container
-
Access Goosecode Server
- Open your browser and navigate to: http://localhost:8080
- Default password:
talktomegoose(can be changed in .env) - A shared terminal with Goose will start automatically
Using the run.sh Script
The run.sh script provides a convenient way to manage your Goosecode Server container. It handles building the image, starting/stopping the container, and passing environment variables.
Basic Usage
Advanced Options
You can pass environment variables and configuration options directly to the script:
./run.sh --openai-key=your_api_key_here --password=your_password --port=8888
Available Options
| Option | Description | Default |
|---|---|---|
--rebuild |
Force rebuild of the Docker image | - |
--port=VALUE |
Host port to map to container | 8080 |
--image=VALUE |
Custom Docker image name | goosecode-server |
--container=VALUE |
Custom container name | goosecode-server |
--openai-key=VALUE |
OpenAI API key | From .env |
--password=VALUE |
VS Code Server password | From .env or "talktomegoose" |
--github-token=VALUE |
GitHub token | From .env |
--git-user=VALUE |
Git user name | From .env or "PlatOps AI" |
--git-email=VALUE |
Git user email | From .env or "hello@platops.ai" |
--no-terminal-sharing |
Disable shared terminal feature | Sharing enabled by default |
--no-goose-api |
Disable the Goose Terminal API | API enabled by default |
--api-port=VALUE |
Custom port for the Goose API | 8000 |
--goose-session=VALUE |
Specify a Goose session ID | Random session ID |
--resume-session |
Resume an existing Goose session | Start new session |
Environment Variables Priority
- Command-line arguments (highest priority)
- Variables from
.envfile - Default values (lowest priority)
Using Goose AI Assistant
Goosecode Server automatically starts a shared Goose AI terminal session when you launch the container. This means:
- The same Goose session is visible in all browser windows
- Multiple users can see and interact with the same conversation
- The session persists even when browser windows are closed
Accessing the Shared Goose Session
When you open VS Code in your browser:
-
A terminal with Goose AI should open automatically
-
If not, open a terminal in VS Code and run one of these commands:
# Full interactive mode (default) ~/shared-goose.sh # View-only mode (can't type, just watch) ~/goose-view.sh
-
Each new terminal creates a unique session linked to the shared content
-
Start interacting with Goose by typing your questions or instructions
Using Environment Variables for Session IDs
You can specify a custom session ID using environment variables:
-
Set the
GOOSE_SESSION_IDenvironment variable in your.envfile or via the--goose-sessionflag:# In .env file GOOSE_SESSION_ID=my-project-session # Or when running the container ./run.sh --goose-session=my-project-session
-
To resume an existing session, set the
GOOSE_RESUME_SESSIONenvironment variable:# In .env file GOOSE_SESSION_ID=my-project-session GOOSE_RESUME_SESSION=true # Or when running the container ./run.sh --goose-session=my-project-session --resume-session
These variables allow you to maintain consistent session IDs across container restarts or share specific sessions with team members.
Goose Configuration
Goose is pre-configured with the following settings:
GOOSE_PROVIDER: openai extensions: developer: enabled: true name: developer type: builtin GOOSE_MODE: auto GOOSE_MODEL: o3-mini-2025-01-31 OPENAI_BASE_PATH: v1/chat/completions OPENAI_HOST: https://api.openai.com
To view your current configuration:
cat ~/.config/goose/config.yamlTo modify your configuration:
UI Customization
The VS Code Server instance comes pre-configured with:
- Dark Theme: Easy on the eyes for long coding sessions
- Material Icon Theme: Beautiful file and folder icons
- Material Product Icons: Enhanced VS Code UI icons
- Custom Colors: Optimized color scheme for code readability
Docker Container Management
Building the Container
docker build -t goosecode-server .Running the Container Manually
docker run -d -p 8080:8080 -p 8000:8000 --name goosecode-server --env-file .env goosecode-server
Managing the Container
# Stop the container docker stop goosecode-server # Start an existing container docker start goosecode-server # Remove the container docker rm goosecode-server # View container logs docker logs goosecode-server # Access container shell docker exec -it goosecode-server bash
Customizing Port or Password
docker run -d -p 8888:8080 -e PASSWORD="your-secure-password" --name goosecode-server --env-file .env goosecode-serverGoose Terminal API
The Goosecode Server includes an HTTP API for interacting with the terminal and accessing Goose conversation logs.
API Features:
- Send commands to the tmux terminal
- List active tmux sessions
- Retrieve Goose conversation logs
- Stream conversation updates in real-time using Server-Sent Events
The API is enabled by default when starting the container and runs on port 8000.
- Swagger documentation: http://localhost:8000/docs
- API base URL: http://localhost:8000/api/
Command-line options:
# Disable the Goose API ./run.sh --no-goose-api # Change the API port ./run.sh --api-port=9000
For more details about the API, including examples and the streaming client, see the Goose API README.
Troubleshooting
Goose AI Issues
| Issue | Solution |
|---|---|
| Goose not found | Ensure the installation was successful with which goose |
| Configuration errors | Run goose configure to set up the agent manually |
| API key issues | Verify your OpenAI API key is correctly set in the .env file or passed via command line |
| Shared session not working | Run ~/shared-goose.sh to connect to the shared session |
| Scrolling affecting other clients | Each window should have its own session; check the status bar for your session name |
| Need view-only access | Run ~/goose-view.sh for read-only mode |
Container Issues
| Issue | Solution |
|---|---|
| Port conflicts | Change the port mapping using --port=VALUE option |
| Permission issues | Container uses the coder user; use sudo for privileged operations |
| Performance issues | Adjust Docker resource allocation in Docker Desktop settings |
| Environment variables not working | Check priority order: command line > .env file > defaults |
| API not accessible | Ensure port 8000 is published with -p 8000:8000 and the API is enabled |
Built with ❤️ for developers
Fuente: GitHub

