Barbara for VS Code
Get your Barbara edge app running on one node as fast as possible, without leaving the editor. Package the project, upload a new version to your Panel Library, point a workload at it and look at the result in the Barbara Panel. Every later deploy is one click or one shortcut.
It is built for the inner development loop of one app on one node. Fleets, batches and groups stay in the Barbara Panel.
Requirements
- VS Code 1.86 or later. The panel opens in the secondary (right) side bar on VS Code 1.106+, and in the activity bar on older versions.
- A Barbara account with API credentials: username, password, API client ID and API client secret. Get the client ID and secret from your Barbara Panel; if they are not available there, raise a support ticket with Barbara Support.
- A project folder with a
docker-compose.yml (or .yaml). Use Barbara: New project… to generate one.
- An application (Docker app) already created in your Panel Library to deploy to.
- To deploy to a node: the node must have a Barbara agent recent enough for workloads (see Troubleshooting).
- Optional, for building locally and pushing to a registry: Docker Desktop (or Docker Engine) with
buildx on this computer, and a Docker registry you can push to.
Quick start
- Sign in. Click Sign in to Barbara in the Barbara panel (or run Barbara: Sign in / Change API credentials) and enter username, password, API client ID and secret.
- Open a project. Either run Barbara: New project… (Node.js, Python, C++, Rust or cluster stack template), or open a folder that already has a
docker-compose.yml. Run locally in the panel starts it on your computer with docker compose.
- Run Barbara: Deploy… (the rocket icon in the panel title). Pick the app, the target and the push options. The version and the release notes (your last git commit) are proposed; use Deploy… (with options) to type them.
- Watch it start. A notification follows the node or cluster until it reports the app running, or shows the error with Open logs in Barbara.
- Repeat. From now on press
Cmd+Alt+Shift+B (Ctrl+Alt+Shift+B on Windows/Linux), click the play icon in the panel, or click the status bar item. No questions asked.
The Get started walkthrough (Help → Welcome, or the link in the panel before signing in) goes through the same steps.
The Barbara panel
Shown for the active project (with several projects open, the one that contains the active editor). Enter, or a click, on a row changes it. Hover any row for an explanation. Title bar icons: rocket = Deploy…, play = Deploy (repeat), refresh = Refresh panel.
| Section / row |
What it is |
Enter / click |
| Environment |
Only shown when barbara.apiUrl is not prod: which API you work against. |
none |
| Deploy → App |
The Docker app in your Panel Library that gets the new versions. |
pick another app or create a new one |
| Deploy → Folder |
The project folder that is zipped. With several projects in the workspace it shows · N projects; the panel follows the active editor. |
Opens a list of the projects (Switch project…) and opens the chosen one's docker-compose.yml, so the panel switches to it. |
| Deploy → Target |
A node (◉ online, ○ offline) or Panel library. |
pick a node or Library only |
| Deploy → Workload |
Node targets only: update existing, create new, or chosen on deploy. |
choose |
| Deploy → Registry |
Docker registry prefix for Build images here → registry, or not set. |
set/clear it and its credentials |
| Deploy → Next version |
Version the next deploy will use. Read-only. |
none |
| On each deploy |
Checkboxes for what a deploy does besides uploading the version. The grey text next to each says what the next deploy will do with the box as it is. Library targets only show Build images here → registry. |
toggles the option |
| Last deploy |
Result and age of the last deploy. A failed deploy shows its summary. |
none |
| Last deploy → Open in Barbara |
Opens the node (or the library) in the Panel. |
opens the browser |
| Account |
The signed-in user. Expand for Change credentials and Sign out. |
none |
The push checkboxes:
| Checkbox (node wording) |
On |
Off |
Default |
appconfig.json → workload config |
replaces this workload's config with appconfigDev/appconfig.json |
the workload keeps its current config |
on |
global.json → node config |
replaces the node's global config, shared by all its workloads |
not sent |
off |
barbarasecrets.env → node secrets |
creates or updates the node secrets, never deletes |
not sent |
off |
Build images here → registry |
your Docker builds the images and pushes them to the Registry; the node only pulls |
the node builds from source |
off |
Registry login → node |
the registry username/token go to the node, so it can pull private images |
not sent |
off |
Refresh base images when the node builds |
the node runs docker compose build --pull |
it reuses the base images it has |
on |
On a cluster the rows say stack and cluster, and the last one is not shown: the cluster agent ignores it.
When the folder has no docker-compose.yml the panel shows a New project… row instead. Multi-root workspaces are supported; state is kept per project and per API URL.
Status bar
🚀 app → node ✓ 1.4.0 on the left. It shows the app, the target, and the last result (✓ or ✗ with the version). On a non-prod API the host is shown in brackets, for example [bap.mycompany.com]. Hover for details.
- Click, with a target set: Deploy (repeat).
- Click, with no target: Change deploy target.
- Hidden when the workspace has no
docker-compose.yml.
Commands
Open the Command Palette and type Barbara.
| Command |
What it does |
| Sign in / Change API credentials |
Asks for username, password, API client ID and secret, checks them against the API and stores them in the OS keychain. |
| Sign out |
Removes the stored credentials for the current API URL. |
| Deploy… |
The full flow: app, target, workload (update or create) and push options, then the overwrite preview, then uploads and deploys. The version (next minor) and release notes (last git commit) are proposed without asking. |
| Deploy… (with options) |
The same, and it also asks for the version name and the release notes. |
| Deploy (repeat) |
Repeats the last deploy with the same choices and the next patch version, without asking. Cmd/Ctrl+Alt+Shift+B. |
| Set the next version name |
Names the next deploy (used once). Also the Next version row of the panel. |
| Run locally |
Opens a terminal in the project and runs docker compose -f docker-compose_dev.yml up --build (or the plain docker-compose.yml when there is no dev file). |
| Change deploy target |
Pick a node, or Library only, without deploying. |
| Change app |
Pick the Library app without deploying, or create a new one (Create a new app…, with the name you type). |
| Clean deploy… |
Removes the workload or stack (optionally its synced volumes) and deploys a new one. See Clean deploy. |
| Change workload |
Node targets: choose between updating a workload that already runs the app or creating a new one. |
| Set Docker registry |
Sets the registry prefix for Build images here → registry (e.g. ghcr.io/acme) and its credentials, or clears it. |
| Open in Barbara Panel |
Opens the target node (or the library) in the Panel. |
| New project… |
Generates a project from a template. |
| Refresh panel |
Re-reads node online status and the next version. |
Also in the Palette, mainly for scripting: Upload to Panel Library (same as Deploy…), Create a Python / Node.js / C++ project from the template, Toggle push option (used by the panel checkboxes). These are hidden from the Palette; they exist so other extensions and keybindings can call them.
Repeat shortcut
Cmd+Alt+Shift+B on macOS, Ctrl+Alt+Shift+B elsewhere runs Deploy (repeat). It is active in the editor and when no input has focus. (Cmd/Ctrl+Alt+B is VS Code's Toggle Secondary Side Bar.) Rebind it in Keyboard Shortcuts under barbara.deployRepeat.
Repeat never creates duplicate workloads and asks nothing. It only stops and asks when something is missing or changed:
- The app, target or workload no longer exists: it warns and reopens the step that fixes it.
- The proposed version already exists: it asks for another name.
- Nothing changed since the last successful deploy (project files,
appconfigDev/, barbarasecrets.env, push options, target and registry): it asks before deploying the same thing again.
- You turned on
global.json → node config or barbarasecrets.env → node secrets in the panel since the last full deploy: it shows the overwrite preview once.
Deploy targets
| Target |
What happens |
| A node |
Uploads a version to the Library, then creates or updates a workload on that node pointing at it. |
| A cluster |
Uploads a version (declaring every node's CPU), then creates or updates a stack on the cluster (Docker Swarm). See Deploying to a cluster. |
| Library only |
Uploads the version to the Library and stops. No node, workload, config or secrets are touched. You can deploy it later from the Panel. Each upload still needs an architecture (x86_64, aarch64 or arm7), asked once since there is no node to detect it from. |
For a node, the architecture is read from the node. The target picker shows recent nodes first, then the first 50; type to search the rest by name. It marks nodes online or offline.
Workload: update vs create
When the node already runs workloads of the selected app, Deploy… asks:
- Update workload running <app> <version>: points that workload at the new version. No new workload.
- Create a new workload: adds another workload of this app on the node.
If the node has none for this app, one is created. After the first successful create, the project remembers the workload and Repeat updates it. If the remembered workload was deleted on the node, Repeat tells you and asks again.
Versioning
Deploy… proposes the highest semver among the app's versions in the Panel with the minor bumped (1.4.2 → 1.5.0); Repeat and Clean deploy bump the patch (1.4.2 → 1.4.3). A new app starts at 1.0.0. If no version is valid semver, the last name gets (new) appended. To choose the name, click Next version in the panel (used once, by the next deploy) or use Deploy… (with options). A name that already exists is refused and you are asked for another.
Cancelling a deploy
The deploy notification has a Cancel button. It stops the image build and push, the upload and the waits for cluster volumes, and tells you which steps were already done. Nothing is rolled back: a version already uploaded stays in the library. Once a clean deploy has sent the removal, Cancel no longer stops it, so the app is never left without its new workload or stack.
After a deploy
The extension polls the workload (node) or stack (cluster) every 5 seconds for the first 2 minutes and every 15 seconds after that, for up to 15 minutes, and only counts statuses newer than the deploy:
- Running (node Started; cluster Stack updated successfully and every service at its desired replicas, shown as Waiting for replicas: app 0/1 meanwhile): a notification says so.
- Error (for example Build error): an error with the last statuses, Open logs in Barbara and Show output.
- Still starting after 15 minutes, or you closed the notification: it says the version was deployed and the last status seen.
The panel's Last deploy row and the status bar show starting, running or failed to start. On a cluster, if the stack still runs services that the compose no longer declares (docker stack deploy does not remove them), a warning offers Clean deploy….
What a deploy sends
Everything below is under the project folder.
| Push option |
Source file |
Goes to |
Overwritten |
Never deleted |
| Workload appconfig |
appconfigDev/appconfig.json |
the workload |
the workload's appconfig |
nothing |
| Node global config |
appconfigDev/global.json |
the node |
the node's global config (shared by all its workloads) |
nothing |
| Node secrets |
barbarasecrets.env (project root) |
the node |
secrets with the same name |
secrets that exist only on the node |
| Refresh base images (force pull) |
none |
the node's build (--pull) |
none |
none |
Details:
- The version zip itself is always uploaded to the Library.
- Workload appconfig off, or on but the file is missing: the workload keeps its current appconfig, including one linked from a Panel library. A new workload starts with an empty config. A missing file is reported as a note after the deploy.
- Secrets use
NAME=value lines. A missing or empty barbarasecrets.env is skipped. Secret values are never shown or logged.
- Invalid JSON in
appconfig.json or global.json stops the deploy before anything is sent. The error names the file and position, not its content.
- Order: node secrets, node global config, version upload, workload. The result says which steps were applied and which failed.
Overwrite preview
In the full flow, after you pick the push options and before anything is sent, a confirmation dialog lists what would be overwritten on the node: the workload appconfig (only if it differs from the current one), the node global config (new, unchanged or overwrite), and the secret names with new or overwrite (values are never shown). Cancel sends nothing. Your choices are kept.
Repeat shows the same dialog once if you enabled node global config or secrets from the panel since the last confirmation.
Deploying to a cluster
Pick a cluster in the target picker (section Clusters). The app runs as a stack; Swarm places its services on the nodes.
Images come from a registry. Swarm (docker stack deploy) ignores build:, so if the compose builds anything, Build images here → registry is turned on and a registry is required. Images are built for every node's CPU at once (multi-platform), and the version declares all those architectures.
Stack: update the stack that already runs this app, or create a new one. Repeat never creates duplicates.
Push options apply to the whole cluster: appconfig.json → stack config, global.json → cluster config, barbarasecrets.env → cluster secrets (created or updated, never deleted; names must be letters, digits and _), Registry login → cluster (sent to every node). Cluster config and secrets need the Panel role edit plus.
Architectures are detected from the cluster's nodes when you pick it and kept for Repeat; if you add a node with another CPU, pick the cluster again (Change deploy target) to rebuild for it. Multi-platform builds need a buildx builder that supports them (Docker Desktop does).
Synced volumes. Volumes that must keep the same data on every node (GlusterFS) are declared external in the compose:
services:
app:
image: … # or build:, with Build images here → registry
volumes: [data:/data]
volumes:
data:
external: true
name: myapp-data # optional; without it the volume is named "data". 1–32 characters
Before launching the stack, each deploy creates the synced volumes the cluster does not have yet and waits until the cluster reports them ready (up to 5 minutes). That status comes from the cluster leader, so on a node that was offline or slow the volume may appear a little later. If one fails, the deploy stops before uploading anything. Volumes are never deleted. The cluster needs GlusterFS enabled. Named volumes that are not external are created by Swarm on each node separately and are not synced: the panel's Cluster volumes section and the overwrite preview flag them.
Open in Barbara opens the cluster list (the Panel has no direct link to a cluster).
Clean deploy
Barbara: Clean deploy… (also the restart icon in the panel title bar) removes the current workload or stack and deploys the next version as a new one. Use it when a deploy left things in a bad state or you want to start from scratch. It is a one-off action: Repeat never does it.
| Target |
Option |
What is deleted |
| Node |
Recreate the workload |
The workload, its persist folder and its anonymous volumes (the node agent always deletes them with the workload). Docker named volumes are kept. |
| Cluster |
Recreate the stack |
The stack and its persist folder on every node (the agent always deletes it). Synced volumes and their data are kept. |
| Cluster |
Recreate the stack and wipe its synced volumes |
Also the synced volumes declared in docker-compose.yml, with all their data on every node; they are recreated empty. Only offered when the compose declares some. |
- The removal happens last: the image is built and pushed, cluster volumes and pushes are done and the new version is uploaded first. If any of that fails, nothing is removed.
- The new workload/stack keeps the current app config (including a Panel-library one) unless appconfig.json is ticked.
- A confirmation dialog lists exactly what will be deleted. Wiping synced volumes also asks you to type the app name, since it deletes their data on every node.
- External volumes can be shared: the wipe option lists the other stacks on the cluster — if one of them mounts the same volume, its data goes too.
- Volumes not declared in the compose, secrets and node/cluster config are never touched.
- The plugin waits until the workload/stack (and volumes) are really gone, resending the volume delete while the cluster still reports it in use. If something fails after the removal, the message says the app is no longer deployed, and Retry/Repeat creates a new one.
Build locally and push to a Docker registry
For nodes that are slow or expensive to build on: tick Build images here → registry and set a Registry (there is no default). Then every deploy, before anything is sent to Barbara:
- Checks that Docker with
buildx is available on this computer.
- Runs
docker login if you set credentials for the registry host (the token goes on stdin, never on the command line or in the log).
- Builds every service of
docker-compose.yml that has build: for the target's CPU architecture (linux/amd64, linux/arm64 or linux/arm/v7, from the node, or the one you chose for Library only) and pushes it.
- With Registry login → node ticked and credentials set: sends them to the node (created or updated per registry server; other credentials on the node are never deleted).
- Uploads the version with a compose where each
build: is replaced by image: (the rest of the project still ships, since volumes or env_file may point into the build folders). Your local docker-compose.yml is never changed.
build: may be a path or {context, dockerfile, target, args}; other build keys (ssh, secrets, additional_contexts, …), YAML merge keys (<<) and aliased services stop the deploy with a clear message before anything is built, so the node never runs an image built differently from your compose.
Image names use the app name and the version as tag:
Services with build: |
Image |
| one |
<registry>/<app>:<version>, e.g. ghcr.io/acme/sensor-reader:1.5.0 |
| several |
<registry>/<app>-<service>:<version>, e.g. ghcr.io/acme/sensor-reader-api:1.5.0 |
Registry examples: ghcr.io/<org>, docker.io/<user> (Docker Hub), europe-docker.pkg.dev/<project>/<repo> (Google Artifact Registry). Credentials are optional (public registries need none); they are kept in the OS keychain per registry host. For tokens, use one with push permission (e.g. a GitHub PAT with write:packages).
Notes:
docker login also stores the credentials in Docker's own config on this computer (~/.docker/config.json or Docker Desktop's credential store), as any docker login does.
- The Barbara API only accepts registry servers with a dotted host name for node credentials (e.g.
ghcr.io, registry.acme.com:5000); for localhost:5000 or an IP the node step is skipped with a note and you set the credentials on the node in the Panel.
If Docker is missing, or the login, build or push fails, the deploy stops before touching Barbara, and the last lines of Docker's output are in Output → Barbara.
What is never zipped
These are left out of every uploaded version, at any depth: barbarasecrets.env, appconfigDev/, docker-compose_dev.yml; plus .git/, node_modules/, .vscode/. Symbolic links are skipped. Secrets and config travel through the push options instead. This changed in 2.0: 1.x included them in the zip.
.barbaraignore
Add a .barbaraignore file to the project root to exclude more. One pattern per line; blank lines and lines starting with # are ignored.
| Pattern |
Excludes |
dist/ |
any directory named dist, at any depth, with everything in it |
/build/ or src/generated/ |
that directory from the project root (a leading or inner / anchors it) |
*.log |
any file ending in .log |
**/secrets.json |
any file or folder named secrets.json, at any depth |
notes.txt or docs/draft |
that exact path, or that folder from the project root |
# .barbaraignore
dist/
*.log
docs/draft
Project templates
New project… asks for the language (Node.js, Python, C++ or Rust) or the cluster stack, the workspace folder if there are several, and New subfolder or Folder root. It copies a ready-to-deploy project: docker-compose.yml for the edge node, docker-compose_dev.yml for local runs (docker-compose -f docker-compose_dev.yml up --build), imageSource/ with the Dockerfile and sample code, appconfigDev/appconfig.json and global.json, and a sample barbarasecrets.env. Every template handles SIGTERM and exits at once, so a redeploy doesn't wait Docker's 10 s stop timeout, and it logs whether each secret is set, never its value. Existing files are never overwritten. Afterwards it offers to set the deploy target.
Cluster stack (high availability) is a template for clusters, modelled on a pump station:
- Services:
broker — Mosquitto, with its data on a synced volume;
collector — reads the pumps; the readings are simulated, ready to swap for OPC UA or Modbus;
processor — two replicas on different nodes, sharing an MQTT 5 shared subscription, that publish retained alarms and keep a journal on a synced volume.
- Failover: it survives the loss of a node.
- README: the template's own README explains the HA design, the synced volumes and how to test failover.
Settings
Both are user settings only (scope: application). A workspace .vscode/settings.json cannot change them, so a project you open cannot redirect your credentials.
| Setting |
Default |
Use |
barbara.apiUrl |
https://prod.bap.barbara.tech |
Barbara API base URL, without /api/v1. Change it to work against another Barbara API, such as your on-prem one (https://bap.mycompany.com). Must be https://. |
barbara.panelUrl |
https://app.barbara.tech |
Panel opened by Open in Barbara. Set it to match the API, for example https://app.mycompany.com for an on-prem installation. |
Everything is kept per API URL: credentials, the selected app, target, workload, push options, last deploy and recent nodes. Switching URL switches environment cleanly; the panel and status bar show the host when it is not prod. If a deploy is running while you switch, it finishes against the environment it started in.
Credentials
- Stored in the OS keychain through VS Code SecretStorage, one entry per API URL, so you sign in once per environment.
- Never written to
settings.json, workspace state, the log or notifications.
- Migrating from 1.x: if your user
settings.json still holds the old plain-text credentials, they are moved to the keychain for the prod API at first start and removed from your settings (placeholder values are just removed). An existing prod credential is never overwritten. Credentials in a repository's .vscode/settings.json are ignored, so opening a project never signs you in to someone else's account: sign in yourself.
- Sign out deletes the keychain entry for the current API URL.
Troubleshooting
Open View → Output and choose Barbara in the drop-down. It logs each API call as method, URL and status, plus API error codes and a one-line summary of each deploy. It never contains passwords, tokens or secret values.
| Message |
What to do |
| Your session is not valid |
Click Sign in in the message, or run Sign in / Change API credentials. Check you are on the right barbara.apiUrl. |
| Sign in failed: wrong username, password or API client |
Re-enter all four values. The client ID and secret come from Barbara Support. |
| The current version of this extension is deprecated… |
The API requires a newer extension. Update it from the Marketplace. |
| You do not have permission for this operation (403) |
The user cannot act on this app or node. If it names the node agent version (workloads need agent 1.2.0 or later), update the agent from the Panel. |
| Your plan does not allow this operation (402) |
You reached your plan limit, for example on workloads. Use Open in Barbara in the message, or pick Update instead of Create. |
| Cannot reach the Barbara server |
Check your network, proxy and barbara.apiUrl. The message has a Retry button. |
| Barbara is under maintenance |
Wait and retry. |
| Node "x" no longer exists or you no longer have access to it |
Repeat reopens the target picker. Pick another node. |
| Workload … no longer exists on node |
Repeat reopens the workload step: update another one or create a new one. |
| App "x" no longer exists |
Repeat reopens the app picker. |
| Version "x" already exists |
Choose another name. |
| Invalid JSON in appconfigDev/… |
Fix the file at the position shown. Nothing was sent. |
| A Barbara deploy is already running |
Only one deploy runs at a time. Wait for the notification to finish, or press Cancel on it. |
| … did not finish in N min |
A limit stopped a stuck step: docker login 2 min, each image build and push 30 min, the version upload 15 min, cluster volumes and a clean deploy's removal 5 min. Check Docker, the registry or your connection and retry. |
| Docker is not available |
Install Docker Desktop (with buildx) and start it, or untick Build images here → registry. |
| docker login to … failed / docker build or push of … failed |
See the Docker output in Output → Barbara. Check the registry prefix, credentials (token with push permission) and that the Dockerfile builds for the target architecture. Nothing was sent to Barbara. |
| No registry set / has no service with build: |
Set a registry in the panel, or add build: to the service; nothing was sent. |
A failed deploy keeps your choices; the notification has Retry when retrying makes sense. Failed steps and the ones already applied are listed in the message and in Last deploy.
Links
License
The extension is licensed under AGPL-3.0-only (LICENSE.md). Its source code is available under request in developer@barbara.tech.
The project templates that New project… copies into your workspace are licensed under MIT (a LICENSE file in each project), so you can use, change and distribute the code you build on them under any license.
The licenses of the npm packages bundled in the extension are in dist/THIRD_PARTY_NOTICES.md, inside the installed extension.