AS5BridgeKeeps your VS Code workspace in sync with a remote AS5 (AppStack5) server. Files upload when you save, download when the server version changes, and conflicts are resolved interactively — with TypeScript compiled to ES5 the way AS5 expects it. Features
Requirements
Getting started1. InstallExtensions → ⋯ → Install from VSIX… and pick the 2. Run SetupCommand Palette ( It creates four files in your workspace root — existing files are never overwritten:
3. Configure
4. Log inClick the key icon in the status bar, or run AS5B: Login. A browser opens for authentication; the token is handed back to the extension automatically and a full sync starts.
Commands
Clicking the status bar item opens a context-sensitive menu with the actions that make sense right now. How it worksStatus indicators
Several backends in one workspace share a single status bar entry showing
icons with counts ( Sync triggers
ConflictsWhen local and remote both changed, you choose: Lokal aktualisieren, Remote überschreiben, or Diff anzeigen. With many conflicts at once, the "Immer …" options apply your choice to the rest of that run. Files that fail to upload land in the Offene Konflikte panel with one-click retry, survive a restart, and are retried automatically after a login. TypeScript supportSaving a The bundled compiler is pinned to TypeScript 6.x: the AS5 backend only
accepts ES5, and TypeScript 7 removed AS5 runtime declarations (
|
| Check | Why |
|---|---|
| Similarity warning | If the new content shares almost nothing with the live version, the file is flagged — this is the "wrong file content" case |
| Unsynced changes | Warns when the local file was never synced to dev, or has unsaved edits — you would deploy a stale version |
| Missing companion | Warns when a .ts is deployed without its .js (or vice versa) |
| Protected paths | Configured globs require an extra confirmation |
if-match |
Aborts if the target changed between review and deployment |
Journal and rollback
Every deployment is recorded under .as5bridge/deployments/ together with the
target's previous content. That directory ignores itself via git and is
excluded from syncing, since it holds production data.
AS5B Deploy: Letztes Deployment zurückrollen restores that state. AS5B Deploy: Historie lists past deployments and can roll back a specific one.
No atomicity. AS5 has no transaction across files. If file 7 of 10 fails, the deployment stops there and reports a partial state — it does not pretend to be all-or-nothing. A rollback is offered immediately.
Chat notification
Successful, failed and rolled-back deployments are posted to the configured Google Chat webhook:
*Deployment → Live* · Markus Enderlein <m@example.com>
> Bugfix im Bestellprozess
• `/api/order/checkout.js`
• `/api/order/checkout.ts`
*🗑 Gelöscht (1):*
• `/api/order/legacy.js`
3 Dateien · 27.07.2026 14:32 · ✅ erfolgreich
A webhook that is unreachable is logged and ignored — it never turns a successful deployment into a failed one.
Command line (as5b)
The same core that drives the extension is also available as a CLI — for scripts, CI, and AI assistants that work in a terminal.
npm i -g ./extension # or: npm link, from the extension directory
as5b --help
as5b status # config, login state, deployment target
as5b login [--deploy] # browser login (dev or target)
as5b diff api/order.js [--live] # local file vs. dev (or the deployment target)
as5b pull [/api/] # download from dev
as5b push [files...] # upload to dev
as5b watch # upload on save, propagate deletions
as5b deploy compare --mode full # differences dev ↔ live
as5b deploy plan api/order.js # what would happen, incl. warnings
as5b deploy run api/order.js -m "Fix" # deploy, with a diff review per file
as5b deploy rollback # undo the last deployment
as5b deploy history
Every command accepts --json and then writes a single JSON document to
stdout — diagnostics go to stderr, so the output stays parseable:
as5b deploy compare --json | jq '.differences[] | select(.suspicious)'
Automation and safety
The CLI enforces the same safeguards as the editor — a diff review per file,
the preflight checks, if-match on every write:
| Flag | Effect |
|---|---|
| (none) | Interactive: unified diff per file, confirmation required |
--yes |
Skips the routine per-file confirmation. Blocking warnings still stop the deployment |
--force |
Also overrides blocking warnings and destructive confirmations (deletion, rollback). Recorded as "forced" in the journal and the chat message |
For pull/push, conflicts (both sides changed since the last sync) are asked
interactively; --conflict local|remote|skip decides upfront. Without a
terminal the default is skip — neither side is discarded silently.
--dry-run reports what would happen without writing.
That split is deliberate: automation is possible, but a file that looks like a
different file, is unsynced, or sits on a protected path does not slip through
just because a script passed --yes.
Exit codes
Chaining with && has to be safe, so anything short of a clean run is non-zero:
| Code | Meaning |
|---|---|
0 |
Everything went through |
1 |
Errors, unresolved conflicts, blocking warnings on deploy plan, an explicitly named file outside the sync scope, or a cancelled run |
2 |
Unknown command |
Bad flag values are rejected rather than silently defaulted — --mode ful,
--mode folder without --folder, --conflict bogus, or --id without a value
(which would have rolled back the newest deployment) all stop with an error.
Authentication
The CLI cannot read the extension's tokens — VS Code's SecretStorage is only reachable from the editor. It uses, in order:
AS5_TOKEN/AS5_DEPLOY_TOKENfrom the environment (CI, agents)~/.as5bridge/credentials.json, written with mode600byas5b login
Metadata files
Each synced file gets a small .as5b sidecar holding the remote ETag and a
dirty flag. Setup hides them from the explorer. Reinit removes them all and
re-downloads from the server without modifying anything remotely.
Deployment workflow
- AS5B Deploy: Mit Live vergleichen — find what differs from the target
- AS5B Deploy: Aktuelle Datei hinzufügen (or click a difference in the sidebar)
- AS5B Deploy: Nachricht setzen — what is being shipped
- AS5B Deploy: Review — one diff per file, each confirmed individually
- AS5B Deploy: Deployment ausführen
Every step is a Command Palette entry; the Deployment sidebar shows the same flow with buttons. Nothing is written to the target before step 4 is complete.
Troubleshooting
"Diff gegen Dev-Server" never shows a difference.
That is expected: AS5Bridge uploads on save, so the workspace and the dev server
are kept identical. Use AS5B: Diff gegen Live (or as5b diff --live) to see
what actually differs from production.
A file does not sync.
Check that its directory is listed in directories and its extension in
extensions — both must match. .service.js and other dotfiles do sync;
files inside hidden directories (.cache/) never do. AS5B: Log anzeigen
shows the decision for every file.
TypeScript errors in frontend files (window/document unknown, Vue
redeclared).
Those files are standalone browser scripts, not AS5 modules. Add their path to
tscCheckExclude to compile them emit-only.
"Metadatei korrupt".
The .as5b sidecar is unreadable. Delete it — the file re-syncs on the next
save — or run Reinit for a clean slate.
Everything asks for a login again.
The token was rejected (status bar shows $(lock)). Log in again; queued files
are retried automatically.
The remote file is newer and you want to look first. AS5B: Diff gegen Remote shows both versions side by side without changing anything.
Links
Licensed under the MIT License.