Forge Cloud for VS Code and Cursor
From your editor, sign in to Forge Cloud and pick a service. Then you can watch its deploy status, follow logs, deploy,
restart, roll back and read readiness. The extension is built on @axiotech/forge-sdk, a vendored copy of the SDK in this
repository that is kept identical to it by npm run sdk:check.
It is not published to the VS Code Marketplace or Open VSX. To build a package from this repository, see Release below.
To install it, choose Extensions: Install from VSIX… in VS Code or Cursor.
Use
- Forge: Sign In. Signs in through the browser with the same device sign-in as
forge login. The approval page names
the client "Forge for VS Code", and so does the token it mints. The code is copied to your clipboard.
- Forge: Select Context. Choose a project, a service and, when the service has environments, an environment. The choice
is kept for this workspace. Without a choice, the extension uses the IDs from the repository's
.forge/context.json,
which forge link writes.
- Status bar. Shows the latest deployment of the selected service and environment, refreshed every 60 seconds
(
forge.statusRefreshSeconds). Click it for the actions menu.
- Forge: Deploy / Restart. Asks you first. For a protected or production environment it shows the CLI's warning that
Forge accepts only promoted releases there. It then follows the deployment to the end and writes its log lines to the
Forge Logs output channel. If you cancel, the extension stops following; the deployment itself continues.
- Forge: Roll Back. You pick a previous successful deployment. The extension asks you first, then requests the same
confirmation the CLI does and opens the approval page in the Forge dashboard. It waits there until someone approves. It
cannot approve the rollback itself: approval needs a signed-in dashboard session with recent authentication, and the API
has no approve operation. Nothing changes unless the rollback is approved.
- Forge: Show Logs. Shows the latest deployment's logs, following them while it is still running.
- Readiness view (the Forge activity bar). Shows the environment's latest assessment and Passport outcome, with
blocking, recommended and ready findings. Recheck Readiness queues a new assessment. On a server without the
readiness API, the view says so.
Security
- Token. The token is stored only in VS Code SecretStorage (the OS keychain), keyed by the API origin that issued it. It
is never written to settings, files or logs, and it is sent only to that origin, in the
Authorization header.
- Origin.
forge.apiOrigin is an application-scope setting: only your user settings can change it. Neither a
workspace's .vscode/settings.json nor .forge/context.json can redirect your token. The extension reads only project,
service and environment IDs from .forge/context.json.
- Links. Approval pages and the sign-in page open only when they are on the configured origin. Anywhere else, the
extension shows the address as text and does not open it.
- Display. There are no webviews. Text from the server has control characters stripped before it is shown. The
extension never fetches or shows environment-variable values. Errors are redacted of anything token-shaped.
- Restricted Mode. In an untrusted workspace you can sign in and read status, logs and readiness. Deploy, restart,
rollback and recheck need a trusted workspace.
- Sign out. Sign out removes the token from this editor. To end it everywhere, revoke it in Workspace Settings > API
Tokens.
Compatibility
engines.vscode is ^1.92.0, and it matches the exact @types/vscode pin (1.92.0), so the extension uses no API newer
than the oldest editor it supports. VS Code 1.92's extension host runs Node 20.14, which meets the SDK's Node 20.12 floor.
Cursor builds on VS Code 1.92 or later qualify. The extension activates after startup, so the status bar appears in every
workspace, including ones without .forge/context.json. The SDK checks the server's API major
version before the first call.
Release
From the repository root, on a clean commit:
node vscode/scripts/package-vsix.mjs
This builds vscode/release/axiotech.forge-cloud-<version>.vsix, SHA256SUMS and release-manifest.json. The manifest
records the commit, the engine range, and the SHA-256 of every packaged file and of both contracts it was built from. The
archive is deterministic: the same commit gives the same bytes. The script refuses if the vendored SDK is stale, if the
engine range drifts from the types pin, or if the tree is dirty. The signature is recorded as pending until the signing
authority registers a forge-vscode consumer. Nothing is published.
Development
vscode/src/core/ holds everything that runs without VS Code: origin and token rules, context resolution, the deploy,
restart, rollback, follow and readiness flows, and presentation. It is tested by tests/vscode-extension.test.ts against
the real control plane.
vscode/src/extension.ts is the VS Code wiring.
vscode/src/sdk/ is generated. Edit sdk/src/ and run npm run sdk:write.
- To typecheck, run
npm run typecheck (it includes vscode/tsconfig.json).
| |