Skip to content

Command menu

Search pages, projects and actions

Staging Works, Prod Doesn't: I Built an Open Source Toolkit for Azure DevOps Variable Groups

ToolDock is a browser-only toolkit with 14 tools to diff, search, export and migrate Azure DevOps variable groups, plus a Migrate mode for repos, pipelines, boards and Jira. No backend, no telemetry.

8 min read markdowndiscuss on dev.to

The pipeline is green. Staging is green. Production is on fire.

You dig in, and the cause turns out to be embarrassingly small: one app setting that exists in the staging variable group and never made it into prod.

If you run Azure DevOps with a variable group per environment, you have probably lived this. The fix takes thirty seconds. Finding it takes thirty minutes: open Library, open one group, open another group in a second tab, squint at two lists of keys, give up, paste both into a spreadsheet.

I got tired of that routine, so I built ToolDock.

Live app: tooldock.nishantxrana.com Source code: github.com/nishantxrana/tooldock

ToolDock home page showing a preview of a variable group diff and the list of tools

ToolDock is 14 focused tools for people who live in Azure DevOps variable groups, App Service settings and release pipelines. It is a static single page app with a few deliberate rules:

  • No backend. Everything runs in your browser.
  • No database, no telemetry. Nothing is stored or sent anywhere except Azure DevOps itself.
  • No account for two of the tools. Paste text, get answers.

A note on the screenshots: every image in this post uses made-up data from a fictional contoso organization. No real tokens or projects were harmed.

The 10-second answer: Variable Group Diff

Pick two groups, say app-dev and app-prod. Every key appears once, with both values side by side.

Variable Group Diff comparing app-dev and app-prod with changed, missing and secret keys highlighted

The colors tell the story before you read a single value:

  • Amber: the value differs between the two groups. Expected for things like connection strings, suspicious for anything else.
  • Red: the key exists on only one side. That FeatureFlags__NewCheckout row, set to true in dev and not set in prod, is exactly the kind of thing that ruins a Friday.
  • Blue: a secret. More on this in a moment.

One detail I care about: Azure DevOps never returns the value of a secret variable. A lot of tooling quietly treats secrets as "empty" or "equal", which is a lie. ToolDock marks them as values can't be read, so you never assume two secrets match when nobody could actually check.

Then fix it, safely

Spotted the missing key? Copy Missing Keys adds the keys one group has and the other lacks.

Copy Missing Keys showing a review list with one key to add to app-prod

You review every key first and confirm before anything is written. It only adds. It never touches a variable that already exists, and secrets can be added empty so you fill in the real value in Azure DevOps. Of the 14 tools, only three write to Azure DevOps (this one, CSV Import and Copy Group to Project), and each one asks first.

Three environments at once

Real life has more than two environments. Multi-Group Compare lines up 2 to 8 groups, one column each.

Multi-Group Compare showing app-dev, app-staging and app-prod side by side with conflicts and missing keys marked

You can spot the odd one out in a glance: Throttling__RequestsPerMinute only exists in prod, and FeatureFlags__NewCheckout is missing from the one place it matters.

Where is this value used?

Two tools answer the "who depends on this?" questions that Azure DevOps makes surprisingly hard.

Variable Search finds a key or a value across every variable group in the project. Looking for everywhere redis shows up, or every group still pointing at an old SQL server? Type it in.

Variable Search results for "redis" across three variable groups with highlighted matches

Release Pipeline Mapping tells you which release pipelines and stages consume a given variable group, which is the thing you really want to know before you rename or delete one.

Release Pipeline Mapping showing two release pipelines that use the app-prod variable group

Paste-and-go tools (no account needed)

Some chores don't need an API at all.

Duplicate Finder takes pasted App Service settings and shows you every key listed more than once, with line numbers. Nothing leaves your browser, and you do not even need to connect to Azure DevOps.

Duplicate Finder flagging Redis__Host and Logging__MinLevel as listed twice

Sort App Settings alphabetizes pasted settings and removes duplicates.

Generate App Service Settings builds the -KEY "$(KEY)" string that the App Service Deploy task expects, from one or more variable groups, on one line or one per line. If you have ever hand-typed that string, you know why this exists.

Generate App Service Settings producing a one-line -KEY "$(KEY)" string from the app-prod group

There is also Compare vs App Settings, which diffs your groups against settings pasted from an App Service and sorts them into matched, missing, extra and duplicated.

Take it to Excel (without lying about secrets)

Variable Group Diff and Multi-Group Compare export to a styled XLSX. There are also exporters for a single group (CSV, JSON, TXT or XLSX), all groups at once (one sheet per group), and a release pipeline's inline variables.

An exported XLSX diff with navy header, color-coded status rows and [secret] and [not set] placeholders in gray italics

The export keeps three different situations visibly apart: [secret], [empty] and [not set]. Other formats follow the same idea. CSV gets a Secret column and leaves those values blank, TXT writes secrets as commented-out lines, and JSON uses "isSecret": true.

And a small rule that has probably saved someone a bad afternoon: CSV Import skips secret rows, so re-importing an export can never wipe a real secret.

Migrate mode: moving whole projects

Flip the Tools | Migrate switch in the header and ToolDock becomes a guided migration assistant, from one Azure DevOps project or organization to another, or from Jira Cloud into Azure Boards.

The Migrate overview with cards for variable groups, repos, pipelines, boards and Jira to Boards

Migration What it copies
Variable groups Groups and variables, with secrets created empty or left out
Repos Every branch, tag and commit via Azure DevOps' own import service, plus optional branch policies
Pipelines YAML and classic builds, classic releases and task groups, with pools, connections and repos mapped
Boards Work items with mapped types, states and fields, area and iteration paths, attachments, comments and links
Jira to Boards Issues, sprints as iterations, labels and components as tags, attachments, comments and links

Every migration follows the same six steps: connect both sides, choose what to copy, map, review, run, report. Some design choices I am happy with:

  • Honest review step. Before you can start, ToolDock lists what it knows it cannot copy, and you have to acknowledge it.
  • A report that is really a to-do list. Secrets to fill in, service connections to create, extensions to install, each item linking to the exact page in the target. Download it as Excel, Markdown or CSV.
  • Resumable. Progress and source-to-target ID maps are kept in IndexedDB for 30 days (never tokens). Re-run a job or hit Retry failed and anything already copied is skipped.
  • Polite to the API. It honors Retry-After and X-RateLimit-* headers and backs off on 429. Writes are never retried after a network error, because they may have actually landed.
  • Source is read-only. In the target it only creates or adds. It never deletes, and it never overwrites existing values.

The full walkthrough lives in the migration guide, including token scopes per side and a recommended order for a full project move.

The fun engineering problem: a browser app can't call Azure DevOps

Azure DevOps sends no CORS headers, so JavaScript in a browser cannot call dev.azure.com directly. ToolDock sends requests to same-origin paths, and a thin proxy forwards them upstream:

Browser  ->  /ado/{org}/_apis/...          ->  dev.azure.com
Browser  ->  /vsrm/{org}/{project}/...     ->  vsrm.dev.azure.com   (release definitions)
Browser  ->  /jira/{site}/rest/...         ->  {site}.atlassian.net (Jira to Boards, read-only)

Every request carries a standard Basic auth header built from your PAT: Authorization: Basic base64(":" + PAT).

A proxy that forwards tokens deserves some paranoia, so the deployment is locked down:

  • Method and endpoint allow-list. GET and PUT are forwarded. Every POST, PATCH and DELETE must match one exact endpoint the app really uses. Anything else gets a 405.
  • Same-origin only. Each proxy request must carry Sec-Fetch-Site: same-origin, a header the browser sets itself and other websites cannot fake. Anything else gets a 403.
  • Strict CSP. connect-src 'self' means page scripts can only talk to this site's own proxy. Add frame-ancestors 'none', Referrer-Policy: no-referrer and HSTS.
  • A test that guards the CSP. If you edit the inline theme script and forget to update its hash, npm test fails.

So where does my token go?

By default, only into memory. No localStorage, no sessionStorage, no cookies. Refresh the page and you are signed out.

If you want to stay signed in, there is an opt-in lock button. It encrypts the PAT with AES-GCM-256 under a non-extractable CryptoKey and keeps only the ciphertext in IndexedDB, for a rolling 30 minutes, with a countdown on the button.

I also wrote the limitations down instead of hiding them:

  • The 30-minute window slides, so every restore resets it.
  • The vault defends against someone inspecting your disk, not against script running on the same origin. An XSS on your deployment would expose the token.
  • On a shared machine, opting in means the next person to open the browser is connected as you.

Give your tokens a short expiry and revoke them when you are done. Read-only Variable Groups scope covers eleven of the fourteen tools.

A few quality-of-life touches

  • Command palette. Ctrl+K (or Cmd+K) jumps to any tool.
  • Dark mode that follows your system.
  • Inline connect. Click a tool that needs a connection and the connect form appears in place. The URL does not change and the sidebar stays put.

Variable Group Diff in dark mode comparing app-staging and app-prod

Under the hood

  • UI: React 18, TypeScript 5 (strict), Vite 6
  • Data and routing: TanStack Query 5, React Router
  • State: Zustand, in memory only
  • Styling: Tailwind CSS with a token-based design system, Radix primitives, Lucide icons
  • Spreadsheets: ExcelJS in the browser, for real cell styling
  • Tests: over a hundred Vitest unit tests covering the tools, migrations, the proxy allow-list and the security headers

The sidebar, home page and routes are all generated from a single tool registry. Adding a tool is two steps: create the component, then append one ToolDefinition to the TOOLS array. No router or sidebar edits.

Try it

Hosted: open tooldock.nishantxrana.com. Duplicate Finder and Sort App Settings work immediately, no account needed.

Locally:

git clone https://github.com/nishantxrana/tooldock
cd tooldock/ui
npm install
npm run dev

Then open http://localhost:5173, click any Azure DevOps tool, enter your organization and a Personal Access Token, and pick a project.

What should I build next?

ToolDock grew out of real, repetitive Azure DevOps chores, and I would love to hear about yours. Which part of working with variable groups, pipelines or migrations hurts the most for you?

Drop it in the comments, open an issue, or send a pull request. And if ToolDock saves you even one "why is prod different" hunt, a star on GitHub is the best thank you.