memory-bank/components/local-app.md
The Local App component in Gitpod provides tools for interacting with Gitpod workspaces from a user's local machine. It consists of two main applications: the Gitpod CLI (gitpod-cli) and the Local Companion App (gitpod-local-companion). These tools enable users to connect to their remote Gitpod workspaces, access ports, establish SSH connections, and manage workspaces from their local environment.
The primary purposes of the Local App component are:
The Local App component consists of several key parts:
The component is designed to work across multiple platforms (Linux, macOS, Windows) and architectures (amd64, arm64).
main/gitpod-cli/main.go: Entry point for the CLI applicationmain/gitpod-local-companion/main.go: Entry point for the Local Companion Apppkg/bastion/bastion.go: Core tunneling and connection managementpkg/auth/: Authentication and token managementpkg/selfupdate/: Self-update functionalitypkg/config/: Configuration managementpkg/helper/: Helper utilitiespkg/telemetry/: Telemetry collectionThe Gitpod CLI provides various commands for interacting with Gitpod:
gitpod login: Authenticate with Gitpodgitpod workspace: Manage workspacesgitpod ssh: SSH into a workspacegitpod port: Forward ports from a workspacegitpod context: Manage Gitpod contexts (different Gitpod installations)gitpod completion: Generate shell completion scriptsThe Local Companion App runs in the background and provides:
The tunneling system is a core feature that:
The authentication system:
The component includes a self-update mechanism that:
components/supervisor-api: For communicating with workspace supervisorcomponents/gitpod-protocol: For Gitpod API communicationcomponents/local-app-api: API definitions for the Local Appcomponents/public-api: Public API definitionsThe Local App component integrates with:
The Local App is configured through:
~/.gitpod/config.yamlThe Local App implements several security measures:
The Local App component is typically used to: