Hack Club Git for VS Code / Hack Club Spaces
MVP extension for Hack Club's Forgejo server at git.hackclub.app.
Features
- Sign in with Forgejo username/password.
- Securely keeps the credentials in VS Code Secret Storage for the extension.
- Uses Forgejo's API to list the signed-in user's repositories.
- Provides Hack Club Git: Clone Repository.
- Runs Git inside the current VS Code environment/remote Space.
- Configures Git identity and a credential helper so
git push does not repeatedly prompt.
Important limitation
VS Code's public extension API does not expose a supported way for a third-party extension to insert a new item into the built-in Git extension's internal Git: Clone Quick Pick. This MVP therefore provides its own Hack Club Git: Clone Repository command and an SCM title action.
Do not monkey-patch VS Code's internal Git extension; that would be fragile, especially in Spaces.
Install from source
npm install
npm run compile
Press F5 in VS Code to launch the Extension Development Host.
Package it with:
npm run package
Spaces
Install/run the extension in the remote extension host if the Spaces environment supports standard VS Code extensions. The git subprocess is executed by the extension host, so cloning and pushing happen in the Space environment.
Security
The extension uses VS Code Secret Storage for the username/password. Git receives the credential through git credential approve, not through a command-line argument.
For a remote Space, the default auto credential mode falls back to Git's temporary cache helper. This avoids writing the password to a plaintext credential file. The store mode exists for trusted persistent environments only.
Next version
The best production upgrade is Forgejo OAuth/browser authentication, plus a dedicated repository tree view and a Spaces-specific integration if Spaces exposes one.