Swiss Army Bench
(Installed and run as swissarmybench, alias sab.)
A desktop app for any tabular data: live grids, notebooks, SQL and analysis, in windows of its own (PySide6, the pages drawn by Qt WebEngine) over a local Python server that runs while the app is open. You push a DataFrame from Python and its grid opens; the same pages open in a browser too, if you want a tab. Everything stays on your machine: 127.0.0.1 only, a token on every data request, data in memory, nothing sent anywhere.
What a grid page does:
- Grid: scroll millions of rows (the server sends only the rows on screen). A header can show its column's distinct count, blank percentage and a small histogram (the switch is in the grid's top-left corner, above the row numbers); its arrow button sorts on the server. Enter or F2 on a cell opens its whole value. The horizontal scrollbar is always on screen.
- Excel-style selection: click or drag the row numbers to select rows, a header to select its column, drag across cells for a block, the corner (or Ctrl+A) for everything; Shift extends, Ctrl adds. The status bar shows Count, Average and Sum over the whole selection, loaded or not, and Ctrl+C copies it as tab-separated text.
- Ribbon: the transformation tools grouped by what they act on: Table (filter, sort, columns, group by, distinct, profile, analyze, export) and Column (sort, filter, rename, remove, keep, clean, bucket, categorize, group by and profile, for the selected columns); a cell's tools (keep or exclude rows with its value, view, copy) are on its right-click menu. Ctrl+Shift+P lists every action of the page by name.
- Steps (like Power Query's applied steps): filter, sort, choose and rename columns, group by, distinct, keep first rows, clean text, bucket, categorize and SQL. The grid has the whole page: a strip under its title counts the steps (a header sort among them), lists them on hover with a remove button each, and offers Undo, Redo (Ctrl+Z, Ctrl+Y) and Clear; Edit steps opens Table Transformations in a tab of its own, where each step can be edited, turned off or reordered, with row counts as it goes.
- Cell viewer: double-click a cell. JSON objects and arrays show as tables you can open one layer at a time, markdown is formatted, and long text wraps.
- Text matching (the ribbon's Table row): Match case, Wildcards (
%only, as in SQL LIKE), Trim, Empty = blank. - Column profile: a popup from the Column row's Profile: statistics and value counts; click a value to filter on it. Auto width fits every column (Table row) or the selected ones.
- SQL lives in your Python (DuckDB SQL does the transforming): every table has a read-only cell
in the Workbench notebook or script it belongs to, holding the grid's steps as one DuckDB query
whose result is the table's own name (
orders = duckdb.sql("""...""").df()). The cell follows the grid by itself and turns yellow (Out of date · Run) when the steps change; nothing runs by itself, and running it twice never transforms a table twice. All tables sit at the top of the file in a Tables group that folds to one line. Every cell has a number that never changes,@cell7in a comment links to it, and a cell that names a table starts with# uses orders @cell3. A SQL step (Edit steps, Add a SQL step) is one guarded SELECT over the table entering it. - HTML cells: a notebook or script cell that holds HTML and shows it as a design in a pane that
resizes: the HTML while you edit it, the design when you leave it. Its scripts run walled off from
the app and nothing loads from the internet.
{{ total }}is filled with a Python variable when the cell runs (a value as text, a table as its first 50 rows); such a cell turns yellow (Out of date · Run) when its HTML or a variable it names changes. In a notebook file it is a%%htmlcell. - Streamlit apps, from widgets: a widget is a small Streamlit program kept in your library (56 come with the app: buttons, inputs, tables, metrics, charts, text, filters, forms); its top-level values are its properties, each with a mask (a colour picker, a table picker, a column picker, a date, a number with its range). Widgets on the rail opens the Widgets window: write one with completion and help, Run it in place. Canvas on the rail lays a page out: draw containers on a grid (snap to 1 px or to the grid's cells), drag widgets in from the Widgets pane, set their properties; Play, Launch (a build kept in the project's builds/), Export (a folder that runs on a hosted Streamlit app). Streamlit runs in the project's own Python and is not installed with the app. App notebooks were replaced by widgets (2026-11-21).
- Tabs pop out: any Workbench tab pops out into a window of its own (its unsaved changes and kernel go with it), and back.
- Projects: a folder that starts with the data.
data.ipynbis where you work on the tables and variables;data.pyis its export, and what your notebooks and pages import (from data import orders). The app's canvas exportspages/*.pythe same way. - Export as one Python script… / as one notebook… (a document's … menu): any notebook or
script as ONE self-contained file for a scheduler or an Azure Function: its connections, key vault
lookups and grid steps (as DuckDB SQL) written out, no Swiss Army Bench, no passwords, no rows.
python orders_report_automation.pychecks its packages first (--installpips them), names every setting it reads and where it came from, and has amain()for a timer trigger; an Azure Key Vault is read by the function app's managed identity with the standard library. The notebook runs top to bottom with nbconvert or papermill. - New table from a query: the + after the last tab opens a SQL tray over a blank grid. A table name reads that table as its tab shows it (after its steps); Run turns the result into a table of its own, with every tool a pushed table has. The tray stays on the tab, so Run again rebuilds the table in place, and its own steps apply to the new rows.
- Copy transformations as SQL or Python (the steps window's Code tab, for a Python outside the
Workbench): the view's steps, SQL steps included, as one DuckDB
query over your own table by its variable name. Copy as SQL gives the query; Copy as
Python gives
import duckdband one line,orders_view = duckdb.sql("""...""").df()(.pl()for Polars,.to_arrow_table()for Arrow). The copy is run exactly as copied, in a fresh namespace holding only your table, and compared with the grid before it's offered; only verified code gets the Copy buttons. - Relationships: Find relationships works out how every open table joins, from
the data: each join with its kind, the share of values that match, the orphans and why (names that
don't match, a text column of numbers, two-column keys and second paths are handled; small number
columns that overlap by accident are not suggested). Accept the joins, Check them against the
open tables to see which hold, and Save as a set…: a
.relationships.jsonfile with a name, description and tags, kept in your library'srelationship-sets/or in a shared folder (the blade folders), where your coworkers' Relationships window lists it under Saved sets (rename, export and delete from its menu). In use now manages the joins you use, forty imported foreign keys as easily as four: tick rows (select all, shift-click a range), Delete selected, Run on / Run off (whether a join is used), change a row's Kind or Run in place, filter by table or column, sort by any column, group by From table; every change has one Undo in its toast. Deleting a connection takes the relationships its tables held out of the ones in use (the toast says how many); saved sets stay. With a project open, the ERD and In use now show only the tables the project uses (open, its own, or named in its notebooks' and scripts' code) and a join only when both ends are; All tables shows the rest, and the ERD says how many are not drawn. - Analyze (its own page on the rail): a toolbar of every analysis and one guided form beside the board.
The table is already picked, the columns are picked for you as chips (only the ones that fit are offered,
the rest listed with why), one sentence says what will run, and the result lands on the board by itself.
Check this table suggests the three analyses that suit a table; Make it fit proposes the steps
that would (text read as numbers or dates, a yes/no column...), applied only on your click; each form
shows a made-up sample of the data it needs. The analyses hand off to each other. Odds:
how often each value shows up, and with an outcome, each value's odds of it against the rest ("West:
late 46% of the time, against 15% elsewhere: 4.85 times the odds"). Find predictors: every column
tested against a target by chi-square, ranked by strength, with the pairs that say the same thing.
Fit test and Outliers (below). Show the math on any result puts its proof on the Analyze board:
each formula with the result's own numbers, worked to the values shown. Every result can go to
Analyze, open as a grid, or go to the notebook as Python (
swissarmybench.stats, the same code the window ran). Regression: linear or logistic (odds ratios), effects in words with ranges, what-if predictions, predicted and miss columns, and the miss column for outliers of what the model cannot explain. Time series: a metric per period from a date column, its trend, its season in words ("December runs 31% above a typical month"), the periods that stand out (Show these rows), steps in the level and how much one period predicts the next. Forecast: trend, season and steps carried forward with 80% and 95% ranges, predictors each with their own future, and the miss it earns on held-back periods. - Analyze as a report: results arrive as a readable note (with real tables) and a chart side by side; drag cards to arrange them, edit any note, see it as letter or landscape pages, Print to PDF, or Export markdown (one file, charts embedded as pictures, ready for an AI model). Right-click a cell or a header to send a value, a row, a profile or distinct values; every details window has Send to Analyze.
- Fit test and outliers (on the Analyze page): ask whether a column's values spread as expected (chi-square against even shares, Benford's law on the first one or two digits, another grid's spread, or two columns together), with the verdict in words and an effect size; or find the outliers in a column, by amount (robust median fences, Tukey's quartiles or z-scores, within each vendor or month if you like) or by frequency (a typo seen once, an amount copied forty times). Show these rows adds a step that keeps just them; Exclude these, one that leaves them out.
- Key Finder: pick another grid (or every other grid) and get the likely join columns: each column pair that shares values, with the percent of each side's distinct values found in the other, whether each side is unique (so which one looks like the key), and a score. Columns whose longest value is over 128 characters are left out. Click a pair for sample shared values and the values an inner join would drop.
- Export: CSV, delimited text, Excel or Parquet, with provenance and formula neutralization.
- Tabs, split and compare: every grid is a tab in one window (they wrap onto more rows, up to 50). Right-click a tab for Compare with… (or drag a tab onto another) to see two side by side; the key picker opens with the Key Finder already run and the key that is unique on both sides ticked, and compare keeps both grids aligned row by row (outer, anti, cross, or diff: only the rows and the columns that differ). A compare survives a reload. The ≡ button beside + lists every table: open, closed (each with Open) and in your Python sessions.
- Analyze (on the rail): a dashboard of cards for any table: Vega-Lite charts, notes, result tables, Mermaid diagrams, Plotly figures, and images. Every card resizes from its corner on a 12-column grid, and what it draws fills it. Charts open large with wheel zoom, and clicking a bar filters the grid. The page loads nothing from the internet: figures that need outside maps or pictures say so instead.
- Agent door (MCP): the agent sees what the page shows; its exports wait for the user's Allow. Settings lists its activity and has a copyable prompt that installs the MCP in any agent.
- Connections (the Application row's Connections): your databases and files. Add one with a
form per type (SQL Server, PostgreSQL, Snowflake... 21 databases; a Power BI workspace, its datasets read with DAX;
a Dataverse environment, its tables read through the Web API and SQL on its SQL endpoint;
a CSV, workbook, Parquet or JSON file, or a folder of them; or your own Python, for anything
else), its password kept in the system keyring, Test connection before
saving. Then
conn = sab.connection("Warehouse")in any Python, or a whole SQL cell on it:%%sql Warehousein Jupyter or IPython. - Blades and the catalog (its own tab, from Blades and catalog in the Application row): a blade is any
Python that reaches outside Python to load something (a database connection, a CSV or workbook,
an API, a vault). Save it once, then
conn = sab.blade("Warehouse")in any Python. Starters for 21 databases, 5 file patterns and 8 vaults; the save screen shows the packages a blade needs and installs missing ones. A blade can fill the catalog: every schema, table and column of its source with its type, as a searchable tree, readable by the agent so it can write SQL in the source's own dialect. - Jupyter and Python in the terminal are where code goes: drag a blade, table or column from the Scripts page's Blades pane into a cell or an editor for its line, query or name.
- Themes: light, dark, high contrast light and high contrast dark, following the system by default; Windows forced colors are supported. One zoom for the whole page, Analyze included: Ctrl+= and Ctrl+-.
The design is Plans/swissarmybench-build-plan.md; what has been checked against real versions is in docs/verified.md; decisions and open notes are in docs/ideas.md.
New here? The Tour button (the question mark in the Application row) explains every word, grid to pack, by lighting up each one on the page.
Renamed from SwissArmyGrid
Swiss Army Bench was called SwissArmyGrid until this release. Everything has the new name: the package
and the wheel (swissarmybench), the import (import swissarmybench as sab), the commands
(swissarmybench, sab, swissarmybench-mcp, swissarmybench-context), the MCP server, the Claude Code
plugin and its skill (swissarmybench-use), the state folder
(~/.swissarmybench), the environment variables (SWISSARMYBENCH_*), the blade header
(# /// swissarmybench-blade) and the notebook metadata (swissarmybench).
The old names went in 0.0.32 (the owner's simplicity pass, 2026-11-21): import swissarmygrid, the
swissarmygrid, sag, swissarmygrid-mcp and swissarmygrid-context commands, the SWISSARMYGRID_*
variables, ~/.swissarmygrid (no longer moved: move it to ~/.swissarmybench by hand), the old notebook
metadata, blade header, keyring service and remembered page settings are no longer read.
The installers remove the old swissarmygrid uv tool before installing the new one; by hand, that is
uv tool uninstall swissarmygrid, then the install below. The GitHub repository is now DylanCodyBrown/SwissArmyBench (the old address redirects).
Visualizations is now Analyze, and the analyses live there (the owner, 2026-11-19): the rail's Analyze page has a
toolbar of every analysis and one guided form beside the board; every result lands on the board by itself, and
the grid page has no analysis on it. Each analysis has a data contract the form, the agent (analyze_contracts,
analyze_check, analyze_run) and Python (sab.analyze.benford(df)) share. The old names
(?view=visualizations, visualizations_* and sandbox_* tools, sab.visualizations) went in 0.0.32.
The Sandbox is now Visualizations, and the Diagram is the ERD (the owner, 2026-11-16): the rail, the
pages' titles, the menus (Send to Analyze) and the help. The old names (sab.sandbox, app_navigate to
sandbox or diagram, ?view=sandbox, ?view=diagram, a project.json's sandbox key) went in 0.0.32.
A tang is now a relationship set (the owner, 2026-11-17: "drop tang its cheesy"): a saved, shared set of
relationships, a .relationships.json file in the library's relationship-sets/ folder, and the dialog
is Relationships (Saved sets, Save as a set…). On its first start this version writes the
library's tangs/*.tang as relationship-sets/*.relationships.json and keeps the old folder in
~/.swissarmybench/backup/before-relationship-sets-<date>/ (said once on the page). The old names work
for one release: .tang files (in a library, a shared folder, an import), the
routes /relationships/tangs and /relationships/tang, the agent's relationships_save_tang,
relationships_export_tang and relationships_import_tang (each runs its _set one; only the new names
are listed), relationships_check's tang argument.
Install it: one package, two installs
From a release (each release carries the wheel and two installers), one line:
irm https://github.com/DylanCodyBrown/SwissArmyBench/releases/latest/download/install.ps1 | iex
curl -LsSf https://github.com/DylanCodyBrown/SwissArmyBench/releases/latest/download/install.sh | sh
The installer sets up uv when it is missing, then downloads the release's wheel and installs the app with its
own Python, adds it to the Start menu (Windows; -DesktopShortcut adds a desktop shortcut too), to
~/Applications (macOS: a small Swiss Army Bench.app that runs the swissarmybench command; no icon of its
own yet) or to the applications menu (Linux: a .desktop entry and its icon), and opens it once (not with
--no-start/-NoStart, on a build machine or with no display). Give it a wheel path to install one you
downloaded instead. sh install.sh --uninstall (install.ps1 -Uninstall) removes the app, its launcher and its
uv tool; your projects and ~/.swissarmybench stay.
Size. The desktop app is Qt for Python with Qt WebEngine (Chromium inside: PySide6-Essentials,
PySide6-Addons and PySide6-WebEngine 6.12, LGPLv3). Measured on Linux x86-64 with Python 3.12, the [server]
install grew from 499 MB (0.0.21, the browser version) to 1,146 MB (Qt WebEngine adds 667 MB; the tray's
pystray and Pillow, 20 MB, went). On Windows x64 the three Qt wheels download as 82, 41 and 132 MB. Windows on
ARM has no Qt WebEngine in 6.12: there swissarmybench opens the browser instead.
Or straight from PyPI, with uv:
uv tool install "swissarmybench[server]" # the server, once per machine
uv pip install swissarmybench # the client, in any project's environment
Or by hand: build it with python build.py, then:
uv tool install --force "swissarmybench-<version>-py3-none-any.whl[server]" # the server, once per machine
uv pip install "swissarmybench-<version>-py3-none-any.whl" # the client, in any Python environment
The server install gives the swissarmybench command (the app; open, start, stop, status), the sab
agent command and swissarmybench-mcp. The client install is standard library only, so it goes into any
project's environment without touching that project's own packages:
import swissarmybench as sab
sab.push(orders) # a grid named "orders" opens; push again to refresh it in place
Where this is going (workspaces, sab.create_workspace(), an in-app Python terminal,
saved workspaces, a relationships view): Plans/standalone-workspaces.plan.md.
Grids open as tabs in one window, the workspace (/workspace): the first push opens it, and
every later push adds its grid as a tab there (or brings its tab forward) instead of opening a new
window. That holds for pushes made while the window is still loading, too: they wait for it (up to
15 seconds) rather than each opening one. Close a tab with its ×, middle-click, or Delete; drag
tabs to reorder them.
With pyarrow present, pushes keep their column types. A push opens the browser only when no page already shows that grid.
One-time setup for working on Swiss Army Bench itself
uv sync # Python environment in .venv
cd web
npm install # AG Grid, Monaco, Vega, esbuild, TypeScript (local, no CDN)
npm run build # bundles src/ into static/build/
cd ..
Made-up test data: python examples/sample_store.py --push pushes a nine-table store with known
relationships (and deliberate traps for autodetection) to the running server.
Run it
.venv\Scripts\python -m swissarmybench.server # start (reuses the last port if free)
.venv\Scripts\python -m swissarmybench.server --port 8790 # exactly this port, or a clear error
.venv\Scripts\python -m swissarmybench.server status
.venv\Scripts\python -m swissarmybench.server stop
uv run swissarmybench works too, but while a server started that way is running, uv can't
update the environment (Windows locks the launcher). python -m avoids that.
From a notebook or script (the client starts a server if none is running):
import swissarmybench as sab
orders = load_orders() # a pandas or Polars frame, Arrow table, DuckDB relation, or list of dicts
sab.push(orders) # the dataset (and the browser tab) is named "orders"; the grid opens
sab.push(orders) # again: every open grid on it refreshes in place, keeping its sort
sab.push(orders, name="q3", new_grid=True)
url = sab.push(orders, open=False) # no browser, just the link
SWISSARMYBENCH_OPEN=0 turns the browser off everywhere (the tests set it).
Or the demo data:
.venv\Scripts\python examples\push_demo.py --rows 1000000
swissarmybench opens the desktop app (it starts its server); swissarmybench start runs the server in the
console and opens the app's window (--no-window not to) and prints the page's full address, including the
#token= part. swissarmybench open --browser opens the app in the browser instead (in VS Code: Ctrl+Shift+P,
Simple Browser: Show, then paste the address). Once open, a page clears the token from the address bar and
keeps a cookie of its own (HttpOnly, SameSite=Strict, good until the server restarts), so a reload or a bookmark
of http://127.0.0.1:<port>/workspace works; with no cookie the page says to open the app again.
Projects: a folder
A project is a folder: its notebooks, scripts, apps and structures are ordinary files at its top, so it can
be a Git repository and shared like one. The app's own state is a hidden .sab/ folder beside them
(project.json: each table's source and steps, the tabs and windows; Analyze and its saved
dashboards; the relationships), plain JSON that reads well in a diff. Open it on any computer: each table
is read again from its source (a connection by name, never a password; a file inside the project first),
and one that cannot come back offers its fix (Add connection, Find orders.csv). A pasted or pushed table's
rows are kept only when you tick Keep its rows, in .sab/data/, which Git ignores.
The home page is the Project Explorer: every project as a card (sortable, a custom order by dragging,
the types explained), New project (name, type, where), Open project… (a folder) and the tour.
Save (Ctrl+S; Autosave is on by default) and Copy project to… are in the Application row.
Export outline (there and in the Workbench's project menu) writes ARCHITECTURE.md at the project's
top and offers its download: the project for someone joining it, the same eight sections every time
(overview, data sources, data model with an ER diagram, transformations, lineage, deliverables, running it,
open issues), names and types only, never a row or a value from the data.
Import copies notebooks, scripts and apps in from another project folder or a loose file; connections
and blades are the library's, shared by every project.
Projects are Local or Shared: Settings has a Local projects folder and a Shared projects folder (a folder you push and pull with Git, as you do the meta store). Every card says which; Share copies a local project into the shared folder and Make a local copy copies a shared one into yours (never its kept rows), and New project asks where.
The meta store is the library folder pointed at your clone of the team's GitHub repository (Settings, Meta
store folder): connections, key vaults, variables and the shared catalog (catalog/<connection>.json:
each connection's tables, columns, keys, relationships and which projects use them; names and types only, never
a value or a secret). The app keeps the catalog as connections are saved and listed and projects are saved, and
reads it again when your git pull changes it, so a teammate's tables are findable on the Data page before
anything is loaded. Set up from the meta store lists what a new computer still needs (each key vault's
sign-in, values to type once, each connection's status). The app never runs git.
swissarmybench open "C:\Users\me\Documents\sales" # a project's folder; starts the app when it is not running
The single-file .sab project of 0.0.17 is not read any more: swissarmybench open sales.sab says so in
one line, and the installers take away an earlier .sab file registration.
The Workbench
Notebooks and Python scripts, in a window of their own: the grid page's Workbench tab opens it (or brings it forward). On the left, your connections and blades (drag one into a cell or the script for its line) and the data explorer (drag a table or column for its name).
- Notebooks are Python, SQL, DAX, HTML and Markdown cells, saved as
.ipynb(Jupyter and VS Code open them; a SQL cell is saved as a%%sql <connection>cell, a DAX cell as%%dax <connection>/<dataset>). Shift+Enter runs a cell and moves on, Ctrl+Enter runs it in place; Run all, Interrupt, Restart. Outputs stream as they come: text, errors, DataFrames, pictures, Plotly figures. - Scripts are an editor over a Python console: F5 runs the file, Ctrl+Enter the selection or the line, and lines typed in the console run there too.
- Every connection is there by its name:
warehouse.cursor(),pd.read_csv(orders_file), with nosab.connection(...)line and no password or connection code in the document. A connection opens the first time a cell uses its name (one never used never connects); a variable of the same name you make yourself wins. The left panel shows each one's name in code (Sales DB issales_db). - Completion as you type: Python from the running kernel (your variables, their attributes, a
DataFrame's columns; hover for a signature and its help); a SQL cell from its connection's catalog
(schemas, tables, columns:
orders.gives orders' columns); a DAX cell from its dataset (DAX's functions,'Sales','Sales'[Amount],[Total Sales]);sab.connection("gives your connections. - Each notebook's own environment: pick New environment… in the Environment box: where it goes
(a
.venvbeside the notebook), the Python version, and libraries from presets (Data analysis, Charts, Statistics and models, Databases) or by group, plus any other package. It is made with uv (or venv and pip), its imports can go in as a first cell, and the Workbench remembers it for the notebook (a.venvbeside a notebook is found by itself).saband%%sqlwork in any environment, installed there or not. - Files: New, Open, Save, Save as (a file chooser showing real paths) and Recent. Save as starts in
~/Swiss Army Bench. A file changed on disk since it was opened is not overwritten without asking.
The kernel runs on your computer only when you press Run, in the Python you chose; an agent can never run code there.
Connections and SQL cells
A connection is a database, a file or a key vault you reach: added in the app (Connections in the Application row) with a form for its type, the Python it makes shown underneath. Each password says where it comes from: saved on this computer (the system keyring), an environment variable, or a key vault. SQL Server and Azure SQL (through Microsoft's mssql-python: no ODBC driver) have a Sign in choice: a user name and password, Microsoft Entra (managed identity, an app registration, as you) or Windows, each its own connection string, switched keeping what you typed. A choice that works only on this computer (Windows sign-in, Entra as you, an ODBC driver, a file on this disk, the keyring) says so in amber: what the app makes is meant to run on an Azure Function App or a hosted Streamlit app too. Trust server certificate and Encrypt are checkboxes (SQL Server, Azure SQL, Trino). Test connection runs the form before anything is saved. A connection's catalog (its tables and columns) loads itself in the background: when the connection is saved, when Swiss Army Bench starts, and the first time a SQL cell, the side bar or an agent uses it. Each load runs in its own process, a couple at a time, so nothing waits, and the SQL cell's suggestions pick it up as it lands. One that signs in with a browser window (MFA) is not loaded at start-up, only on first use. Refresh catalog reads it again after the database changes. Catalogs stay in memory only. Connections are kept with the blades (so folders, the catalog and Refresh work the same) but listed apart.
A Power BI workspace is a connection too: one connection reaches every dataset (semantic model)
in the workspace, each read with DAX through Power BI's Execute Queries request. Its form asks for the
workspace id (it is in the workspace's address in Power BI) and how to sign in, never for a dataset.
The first way is an app registration (service principal):
its tenant id, client id and client secret are each picked as an entry of your key vault, so the
connection's code reads them by name (secret("powerbi_client_secret")) and the same notebook runs in
an Azure Function, where the function app's Key Vault references put those names in the environment.
The ids may also be typed, with only the secret from the vault; Browser sign-in is for trying a
workspace by hand (it needs Microsoft's azure-identity, installed with the form's Install button; the
app registration's way needs no package).
The catalog shows the workspace's datasets, each with its tables, their columns and, marked, their
measures. Datasets are read one after another (the first 25, for at most 200 seconds); one that cannot
be read is marked on itself and the rest still load. Open as grid runs
EVALUATE TOPN(<rows to open>, 'Table') on the table's dataset and counts the table, so the grid says
"first N of M rows". A grid is named after its table; when two datasets have a table of that name,
after the dataset too (Sales_model_Date).
In a notebook, DAX has a cell kind of its own: pick DAX in a cell's kind picker (or the toolbar's
DAX, or X in command mode), pick the dataset (Finance/Sales model: the connection, a slash, the
dataset) and write EVALUATE .... It is coloured as DAX, completes DAX's functions and that dataset's
tables, columns and measures, and gives a DataFrame, as a SQL cell does. It is saved as a
%%dax Finance/Sales model cell, which plain Jupyter with the client runs too. In Python:
import swissarmybench as sab
by_region = sab.dax(
"Finance/Sales model",
"""
EVALUATE SUMMARIZECOLUMNS('Customer'[Region], "Total Sales", [Total Sales])
""",
)
conn = sab.connection("Finance") # the workspace itself
conn.datasets() # each dataset's name and id
conn.dataset("Sales model").cursor() # one dataset, used as a database's cursor is
A workspace with one dataset needs only the connection's name; with several, Finance alone is
refused with their names. In a script a DAX cell is that sab.dax(...) call under a # %% [dax]
marker.
Import its relationships (on a dataset in the catalog: its page and its right-click; and offered when one of its tables opens) reads that dataset's own relationships into the current model, so the ERD and the Key Finder's known joins show them: an inactive one stays inactive and is drawn dashed. Power BI gives at most 100,000 rows or 1,000,000 values (rows times columns) for one query; an answer that reaches that is refused with a message, never passed off as whole. The tenant must allow the Execute Queries request (the admin setting Dataset Execute Queries REST API) and, for an app registration, service principals to use the Power BI APIs; the sign-in needs Read and Build permission on each dataset. Not yet run against a real tenant: it is tested against a stand-in on this computer.
A Dataverse environment is a connection too: its form asks for the environment's address
(https://<name>.crm.dynamics.com) and how to sign in: As you (the Azure command line's sign-in,
else a browser window, through Microsoft's azure-identity), a managed identity (for an Azure
Function; no package) or an app registration whose client secret is a key vault's entry, never
typed into the app. Its catalog is the Web API's metadata: one schema (dbo), every table with its display
name, every column with its type. Open as grid, the preview and sab.read("Sales CRM", "account")
read a table through the Web API (OData $select, $filter, $top, paging by @odata.nextLink), so
they work in every environment with no admin setting; a choice column reads as its labels. SQL cells
(%%sql Sales CRM, sab.sql) run T-SQL on the environment's read-only SQL endpoint (TDS, port 5558)
through python-tds (pure Python: no ODBC driver) with the same Entra token; when an environment has that endpoint off,
the cell says so and the error panel offers the sab.read line instead. In Python:
conn = sab.connection("Sales CRM")
won = conn.read("opportunity", columns=["name", "estimatedvalue"], filter="statecode eq 1", limit=100)
rows = conn.fetch('<fetch top="10"><entity name="account"><attribute name="name"/></entity></fetch>')
Export as one Python script writes the connection out as it is, so a managed identity signs in inside an Azure Function. Tested against a stand-in on this computer; not yet run against a real environment.
A connection made of your own Python (Python (your own code), under Your own code) reaches
anything Python can: an internal web service, a vendor's library, your own files. Its form has three
code boxes. Connect makes conn, any object. List the tables returns its catalog: a list of
dicts or a DataFrame with table and column, and optionally schema, type and description.
Read a table returns a table's rows given conn, schema, table and limit (None means
all): a DataFrame, an Arrow table or a list of dicts, or (rows, total) so the grid can say how many
rows the source holds. The form finds every environment variable the boxes read
(os.environ["X"], os.environ.get("X"), os.getenv("X"), secret("X")) and asks where each comes
from: this computer's environment, saved on this computer, a key vault's entry, or a plain value that
is no secret. The code is not changed: the values are set as environment variables before it runs, so
the same code runs unchanged where those names are set some other way (an Azure Function's settings).
Test connection runs the three boxes and shows the first table's first rows. The catalog, Open as
grid, the preview and Load all rows then work as for a database. In a notebook:
api = sab.connection("Orders API") # what Connect made
orders = sab.read("Orders API", "orders") # a table, by your Read a table box
A key vault (Azure Key Vault, AWS Secrets Manager or Parameter Store, Google Secret Manager,
HashiCorp, 1Password, a .env file, the operating system's vault) is a connection whose secrets become
environment variables. By default it loads every secret in the vault, new ones included, each under
its own name: SqlPassword stays SqlPassword, Sql--Password becomes Sql__Password (Azure's
convention for a section), any other character a variable cannot hold becomes _. As soon as the vault
can be read (its address filled in, or opened to edit) the form lists its secrets by name, never a
value: leave a secret's box empty and it keeps the vault's name (shown faintly), or type another name
to map it. Untick Every secret to choose them instead.
Every Workbench kernel starts with those variables set, so os.environ["WAREHOUSE_PASSWORD"] and a
connection's secret("WAREHOUSE_PASSWORD") just work. The values go straight into the kernel's
environment: never saved, never shown, never sent to an agent. A password's A key vault offers
New vault when there is none yet, and comes back to the connection when it is saved.
import swissarmybench as sab
conn = sab.connection("Warehouse") # runs it here: the database connection, or the file's path
sab.sql("Warehouse", "SELECT TOP 10 * FROM sales.orders") # a DataFrame
In Jupyter and IPython a whole cell can be SQL on a connection, like the SQL Server extension's connection picker:
%%sql Warehouse -> late
SELECT * FROM sales.orders WHERE shipped > due
%sql_connect Warehousemakes it the default (a bare%%sqluses it);%sql_connectionslists them.-> namekeeps the result as a variable;--gridopens it as a grid.- A database runs the cell in its own SQL: any DB-API connection, DuckDB, BigQuery, ClickHouse, Spark and SQLAlchemy engines. A statement with no rows (UPDATE, INSERT) is committed and says how many rows changed.
- A file runs it in DuckDB in your Python: a CSV, Parquet or JSON file is a table named after the file; a workbook's sheets are tables named after the sheets (read again when the file is saved); a folder's files are tables. A blade that makes a DataFrame can be queried by its variable's name.
- Tab in the cell offers that connection's tables and columns. An error stops the cell with one line.
%%sqlis taken only where no other extension (JupySQL) has it;%%sabalways works.SWISSARMYBENCH_SQL_CELL=0turns the cells off.
Blades and the catalog
A blade is saved Python that reaches outside Python to load something. Write it once on the blades
page (Blades and catalog in the Application row, or /catalog), then use it anywhere:
import swissarmybench as sab
conn = sab.blade("Warehouse") # runs the saved code here and returns its variable
sab.blade("Azure vault") # a vault blade: reads its secrets live, sets environment variables
sab.blade("Warehouse login") # a secret blade: asks for values this Python does not have yet
sab.blades() # every blade's name, favourites first
sab.blades(search="orders-function-app") # by name, description or tag
sab.blades(tag="sales")
Analyze can wear its own theme (the grid keeps the app's): twenty built in, high contrast and colourblind-safe first, every one readable by construction; import your own as a small JSON file (and remove an imported one with the button beside the picker). The PDF and the markdown export take it.
sab.analyze(fig, "Title", key="monthly") puts a matplotlib, seaborn, Plotly or Altair
figure, a picture, a DataFrame's first rows, Markdown text or a file on the Analyze board; the same key
replaces the card in place when the cell runs again.
- Kinds: SQL connection (with its dialect), other (any code), vault (Azure Key Vault, AWS,
Google, HashiCorp, 1Password, a
.envfile, the operating system's vault: each secret mapped to an environment variable), secret (variable names only; the values are typed each session) and analysis: your own analysis,def analyze(df, columns): ...over the grid's rows as a pandas DataFrame, returning markdown, a table or a figure. It shows under Your analyses in the Analyze menu, runs in a child process like Refresh, and its result can go to the Analyze board. Three starters. - Secrets:
secret("password")in a blade's code. Its value is kept in the operating system's vault (Windows Credential Manager, macOS Keychain), never in the blade's file; an environment variable of the same name works too. - Packages: the save screen reads the code's imports, names the pip packages (and calls such as
read_excel, which needs openpyxl), and installs missing ones into Swiss Army Bench's Python on your click.sab.blade()turns a missing driver into the exactuv pip installcommand. - The catalog: a blade's catalog command (SQL on its connection, or Python) returns one row per column of the source; Refresh runs it in a child process and loads it. Or load one directly:
sab.load(conn.execute("SELECT * FROM INFORMATION_SCHEMA.COLUMNS").df(), name="Warehouse", dialect="sqlserver")
The starter pack
Every install has Swiss Army Bench starters, 113 read-only blades and snippets shipped inside the
package (src/swissarmybench/starters/*.blade.py), listed under Starters in the blade list by
family. Copy as your own makes one of your blades from a starter; a new version of the app brings
new starters and never touches your copies.
| Family | What | How it is used |
|---|---|---|
| Power BI (13) | refresh a dataset or a dataflow, refresh and wait, status and history, list datasets, reports and dataflows, read and update parameters, take over a dataset, the refresh schedule | refresh = sab.blade("Power BI refresh dataset"), refresh("Finance/Sales model"): signed in through the workspace connection's own sign-in (its new conn.access_token()), never a copy of the secret |
| Dataverse (2) | a FetchXML query's rows, a choice column's options (numbers and labels) | fetch_xml = sab.blade("Dataverse FetchXML query"), fetch_xml("<fetch>...</fetch>"): through the Dataverse connection's own sign-in |
| Excel (3) | read a workbook (a sheet or a named table, by the adapter), make a workbook (plain, or laid out by a design: formats, totals, colour rules, pivots, charts), fill a template (its table grows) | make_workbook = sab.blade("Excel make a workbook"), make_workbook("report.xlsx", {"Orders": orders}) (one module, sab_excel.build, on openpyxl; the twelve cell-level starters went: each old name says where its effect is now) |
| Files (3) | combine a folder of CSVs, split a CSV by a column, change a delimiter or encoding | a function each |
| DAX (11) | year to date, same period last year, running total, top N, percent of total, a measure by month, date table checks, the INFO functions | a snippet: dragged onto a DAX cell |
| HTML (10) | a styled table, KPI tile and row, progress bar, badge, CSS bar chart, list, header, card grid, invoice | a snippet for an HTML cell |
| Streamlit (29) | filters, metrics, tables, charts, a map, layout, downloads, a form, an upload, session state, a cache, messages | a snippet for a Python cell, documented for a learner; it names its cell |
Snippets are a blade kind of their own: text for a cell with <<name>> placeholders
(<<measure>>, <<date column>>, <<name: by_{column}>>), kept in their file as one Python string
(snippet = r"""...""") so a blade file stays Python. A placeholder asks for what its name says (a
table, a column of it, a measure, a Python name, a number, text); the form fills it from a DAX cell's
dataset or the open tables, and the server writes each value safely for where it stands (DAX's quotes
doubled, Python strings escaped, names only where code goes, HTML escaped). sab.blade("DAX year to date") gives a snippet's text.
Portable blades, blade folders, tags and favourites
A blade travels as one plain Python file, <name>.blade.py: its own code under a header, like a
script's inline metadata, that holds what the app needs (TOML):
# /// swissarmybench-blade
# format = 1
# name = "Orders app DB"
# kind = "sql"
# description = "The database the orders function app reads"
# tags = ["orders-function-app", "sales"]
# dialect = "postgres"
# variable = "conn"
# secrets = ["password"]
# ///
import psycopg
conn = psycopg.connect(host="db.example", user="reader", password=secret("password"))
- Only names of secrets travel, never their values: the person importing types their own.
- Import (the up-arrow above the blades, or drop
.blade.pyor.zipfiles on them) shows every blade first: its code, its description and tags, the secrets it asks for, and whether its name is taken (keep both, replace or skip). Importing runs nothing. Export gives one blade's file (on its save screen) or every blade as a zip. - Blade folders (the folder button, or
SWISSARMYBENCH_BLADE_FOLDERS, paths separated as inPATH): folders searched, four levels deep, for Python files that start with the header. Ordinary Python files, virtual environments,node_modulesand hidden folders are left alone, so blades can live in a Git repository beside other code. A folder blade saves back into its own file; removing it is yours to do in the folder. A blade kept by the app wins a name clash. - Description and tags on the save screen. The search above the blades finds a blade by its name, its description or any tag, and the tag chips narrow the list: tag a blade with the app it serves and searching for that app finds it.
- Favourites: the star pins a blade to the top. Kept on this computer, never in the file.
- Fill in your values. A blade from someone else is written with their server, database, user or
file path. Swiss Army Bench finds these settings in the code (read, never run): connection arguments
such as
host=anddbname=, the parts of a connection string (Server=...;Database=...;), and top-level values and paths (path = Path(r"C:\data\orders.csv")). The import review and the save screen show a field for each, mark the ones still holding an example value (my-server,<your host>, a starter's path) as needs your value, and suggest values from your other blades and from standard environment variables such asPGHOST. Whatever you type is written into exactly that place in the code. Passwords are never settings: they staysecret("..."), and the import review lets you type them straight into this computer's vault.
This repository is a marketplace too. /plugin marketplace add DylanCodyBrown/SwissArmyBench
offers the swissarmybench plugin (the user guide as a skill, and the agent tools, the
swissarmybench-mcp server the installer puts on your computer; remove a copy you added by hand so the
tools are not listed twice). Packs (a plugin carrying blades and relationship sets) went 2026-11-21: a
team shares blades through its team library.
The agent reads catalogs with catalog_list, catalog_schemas, catalog_tables, catalog_columns
(with a first SELECT quoted for the source) and catalog_search.
The agent can make blades for you. blades_create saves one as you would on the save screen
(the golden rule; the older window that asked you to Allow each new blade is gone). blades_list gives
it your blades' names, descriptions and tags (so it can reuse one), blades_get one blade's code and
blades_templates the starters. No answer it gets holds a password's value: it writes
secret("password") and you type the value.
Code to your Python
Copy code (on an analysis result) copies the analysis as Python to the clipboard, its imports
first: the grid's steps as checked DuckDB SQL over your table by its own name, then one
swissarmybench.stats call, the same code the window ran. Paste it into Jupyter or any Python.
Tables your Python makes still show in the grid page's Open list: importing swissarmybench in Jupyter
or IPython starts the watcher (sab.watch() in a plain script).
SQL completion. In Jupyter and IPython, Tab inside SQL (a string with a SELECT, FROM or JOIN, or a
%%sql cell) offers the loaded catalogs' tables and columns; orders.cu Tab gives orders' columns.
It asks the running server and never starts one (SWISSARMYBENCH_COMPLETE=0 turns it off).
The agent commands: sab and the MCP server
The golden rule: everything you can do, the agent can do too (215 commands, each an MCP tool): grids and steps, analyses, Analyze and dashboards, connections and blades (made, changed, tested, refreshed), packs and relationship sets, and the Workbench (open and save notebooks and scripts, start kernels and run code in them, read their variables, make environments). It acts directly, no prompts, with two exceptions: its exports still wait for your Allow (and it cannot answer an approval), and no answer the app gives it holds a password's value. Code it runs in a Workbench kernel can read whatever that Python can, as yours can. The audit log (Settings) names everything it did.
Every action the page has is a named command in one registry (swissarmybench/cli/commands.py), 215 of
them. A command is named for the part of the app it works on, then the action, so a flat list sorts
into the app's layout: tabs_new_query (the + tab), table_filter and table_group_by (the ribbon's
Table row), column_keep and column_bucket (the Column row), cell_exclude (a cell's right-click menu),
steps_add and steps_apply_sql (Table Transformations), compare_create, visualizations_add,
relationships_set, erd_draw, and agent_context / agent_events for what only an agent has. The
registry is ordered the same way, and commands returns the catalog grouped by area. Two front ends
run it:
swissarmybench-mcpis a stdio MCP server that registers one typed tool per command, generated from the registry, so the model seessteps_add(grid, kind, params, index?)with its real arguments rather than composing a generic call. Descriptions are one line each and the schemas are slimmed, so the whole tool list is about 11,000 tokens for 215 tools (a test holds it under a budget). The agent reads a short index first (the resourceswissarmybench://index, orguidewith no arguments; under 4,000 characters, checked against the registry's prefixes);guide(topic=...)(alsoswissarmybench://guide/<topic>) andcommands(the catalog) carry the detail. A command added to the registry becomes a tool with no change to the MCP server.sabis the same commands in a terminal (standard library only, in the plain wheel):sab tabs_new_query top "SELECT ...",sab steps_add g1 filter @step.json,sab agent_events --seconds 60.@filereads a file and-reads standard input.sab --helpprints the catalog.
agent_events listens to the server's live broadcasts (a grid changed and who changed it, a table
opened, an export approval asked for), so an agent can work alongside the user instead of polling.
app_snapshot returns a PNG of the page as the user sees it (the whole window, or the ribbon, grid,
steps strip or Analyze). The server draws nothing: it asks the open page, which draws itself with
html-to-image and uploads the picture, and the server hands it to the agent without writing it to disk.
The MCP returns it as image content; sab app_snapshot saves it and prints the path. It shows real
cell values, and each one is written to the audit log.
The ribbon's Column buttons and a cell's right-click menu act on the selected columns or cells, which only the browser knows, so their commands take the column names or values as arguments.
row_read with format=csv returns the grid's view as CSV. The agent picks start and end (up to
1,048,576 rows, an Excel sheet, per read), and every read starts with the view's total row_count,
which the step commands report too. An agent export always waits for the user's click: the export
route writes an agent's file only against the one-time ticket that click gives.
Left out on purpose, because the server refuses an agent or they are the user's to do: resolving an
approval, shutting the server down, the audit log,
pushing table contents (an agent passes a path to datasets_load), and opening a table from
a Python session. Zoom, column widths and the theme live in the browser, so no command reaches them.
The plugin's UserPromptSubmit hook (plugin/hooks/hooks.json) runs swissarmybench-context, which
adds to each prompt what you sent your agent from the Workbench (right-click an error or selected code,
Send to the agent: once, then it is marked read; the agent_inbox tool reads it too) and a short
summary of the table in front (grid, row count, columns and types, steps; never cell values), the way an
IDE hands Claude the open file. It prints nothing when no server is running.
Build the one wheel (the page inside it) with python build.py. (The optional VS Code extension went
2026-11-21, the owner's simplicity pass: the agent's tools come from the swissarmybench MCP server.)
Launch Claude
The status bar's Launch Claude (the grids' page and the Workbench) starts Claude Code in the user's own
terminal, in ~/.swissarmybench/claude/<project>/ (CLAUDE.md with the app's index and what is open,
metadata only; .mcp.json; the prompt hook; --add-dir the project's working folder), or Claude Desktop
with the swissarmybench server added to its claude_desktop_config.json (asked once, a backup first, the
other entries kept). Both are found wherever they are installed, a company's own build included (the
registry, Start menu, Store, /Applications and Spotlight, .desktop files, PATH, npm). Settings, Claude
chooses the install and turns on bypass permissions. The agent reads (app_claude); only the user launches.
The desktop app, its server's life, and updates
Swiss Army Bench is a desktop app (the owner, 2026-11-18: "It's not an extension it is the app framework now
and it should have been since the start"). swissarmybench (or the Start menu's, Applications', the
applications menu's Swiss Army Bench) opens it: one process (server/desktop_shell.py), each page a window
with a Qt WebEngine view, every window on one persistent profile in ~/.swissarmybench/desktop/profile
(cookies, local storage, the cache).
- window.open becomes a window of the app: the Workbench, a pop-out, a steps or SQL window. Chromium finds
a named window that is open (the home window,
sab-home), and a page'sfocus()brings its window forward. Each kind of window remembers its size and place (desktop/windows.json). - Only the app's own address loads inside; any other link or window.open opens in the system's browser, and a frame that would load from elsewhere is refused. The clipboard is granted to the app's origin; every other permission is denied.
- Downloads ask with the system's Save dialog, then show their progress and Show in folder;
window.print()(Analyze's Print to PDF) and Ctrl+P save a PDF where you say. - Keys: F11 full screen, F12 the developer tools (a window of their own), Alt+Left/Right back and forward, F5 reload, Ctrl+W close the window (its page asked first: unsaved work says so), Ctrl+Shift+B or the right-click menu's Open in browser: the page in the browser.
- The channel: the app listens on 127.0.0.1 with a key of its own (both in
desktop.json, beside the server's connection file) soswissarmybench open, the server's own "open a page" and a second start of the app send it pages; a page travels without its token, which the app reads from the connection file. - Where the app cannot run (no display, no Qt WebEngine) the browser opens instead, as before.
The server runs while the app is open (the owner, 2026-11-18: "I wanted the server to simply run while the
app is active and shutdown when it's not instead of all this crazy server background junk"). It stops 30
seconds after the last window of the app closes (a reload or a slow tab never ends it), at once when the
desktop app closes its last window, or, when the agent, VS Code or a Python session made a request in the last
10 minutes, 10 minutes after that request with still no window open. While VS Code is connected or a request is
under way it stays. Before it stops, an open project's unsaved changes are saved (as Autosave does); with
Autosave off it waits. The times are settings (SWISSARMYBENCH_LIFE_GRACE, _START_GRACE (120 s before the
first window), _IDLE). app_lifecycle tells the agent when and why. There is no tray icon and no start at
sign-in any more: swissarmybench tray, autostart and --no-tray say so for one release, and the first
start of this version removes an older version's sign-in entry and ends its tray (the page says so once).
Updates: the server asks PyPI (https://pypi.org/pypi/swissarmybench/json, then GitHub's latest
release if PyPI cannot be read) at start and every 30 minutes. That one request is the only thing that
leaves the computer, and it carries nothing but itself. A pre-release is offered only to someone on one.
When a newer version exists, the grid page's and the Workbench's status bars say Update available (with
Update to X and What's new). Update to
X asks first only when notebooks have unsaved changes or kernels are running, and saves nothing for you;
the app stops, a small helper installs the version with uv tool install --force "swissarmybench[server]==X" (the app's windows close: the helper ends the app by desktop.json), and the new
version's app opens. If it fails, the old
version starts again and says why. While an update is available, Settings, Updates shows Click here to update (it warns that the app
restarts first); otherwise Settings shows nothing about updates.
The agent has app_update_check and app_update (which waits for your Allow).
Extensions
Swiss Army Bench is the base; extensions plug into it (Plans/editions.plan.md). The rail's
Extensions page lists them: Streamlit is preinstalled (its own package, swissarmybench-streamlit:
the installers put it in beside the base, every update keeps it, and an update from a version that had it
built in installs it once at its first start); Accounting (an Excel workbook from a Python automation,
statements and invoices), Power Apps (code apps) and GitHub Copilot (Copilot's ghost text in the
Workbench's cells and scripts) are available. Streamlit can be removed like any
other (Remove asks first, and it is never brought back by itself); without it the app is the BI base: no Apps
area and no Streamlit canvas, and its agent tools say which extension they need. An available extension installs with one click: the app stops, the update's
helper runs uv tool install --force "swissarmybench[server]==<this version>" --with <the extension's wheel> (the wheel from the GitHub release of this exact version), and the app starts again; Remove is the
same without it. An update of the base keeps each installed extension (--with its wheel at the new
version). An extension package registers itself under the entry-point group swissarmybench.extensions;
SWISSARMYBENCH_EXTENSIONS=<id>,... treats ids as installed, for tests and development only. The agent has
extensions_list, extensions_install and extensions_remove (both wait for your Allow).
Git (an extension, available): GitHub sync for the meta store and shared projects with no Git on the computer (clone, connect, pull with line merges and conflicts beside the file, push fast-forward only), a Git page (the rail's Git) that is VS Code's Source Control view and graph with Monaco's diff editor, and a footer mark when the open project is out of sync. Sign in with a fine-grained token (kept in the keyring only). Code adapted from VS Code (MIT) is listed in THIRD_PARTY_NOTICES.md.
Beta mode: the beta log and notes
During the beta, Swiss Army Bench keeps a beta log in ~/.swissarmybench/logs: server errors with
their stacks, slow requests, kernel, Streamlit, blade and catalog processes, page errors, and the notes
you leave by right-clicking anything and choosing Leave a note…. It holds no cell values, SQL, code,
secrets or full paths; table and column names are aliases (table#1, col#3). A note's picture is
there only when you tick "Attach a picture of this window".
Settings, Beta, Export beta log… writes one zip: send this zip to Claude. Beta mode turns the
log and the notes off or on (kept across restarts; SWISSARMYBENCH_BETA=0 or 1 wins). The agent reads
the same redacted log with app_beta_log and app_beta_notes.
Iterate on the page
cd web
npm run watch # rebuilds on save; reload the tab
npm run typecheck
Checks (run before a commit)
.venv\Scripts\python -m pytest -q --ignore=tests\e2e -n 4 --dist loadfile # the unit tests, four at once
.venv\Scripts\python -m pytest -q tests\e2e -n 2 --dist loadfile # the browser tests (Edge, headless), two at once
.venv\Scripts\python -m pytest -q # everything in one process (slower; what a failure is retried with)
.venv\Scripts\python -m ruff check .
.venv\Scripts\python -m ruff format --check .
.venv\Scripts\python -m mypy
cd web; npm run typecheck
-n is pytest-xdist (a dev dependency): --dist loadfile keeps each test file in one process, so a
file's shared server and browser are its own. Every test binds its ports through the system (port 0, the
socket handed over, tests/live_server.py) and keeps its files in its own temporary folder, so parallel
runs do not meet. A browser test waits for what it checks (an expect, a server read polled, a response),
never a fixed time, unless it checks that something does not happen; then the wait is short and says why.
The real-world test bed (tools/testbed/README.md) runs eleven of the owner's use cases end to end
in a real browser against real PostgreSQL and MariaDB and stand-ins for Power BI and Azure Key Vault,
counting the user's actions: python tools/testbed/testbed.py up, then
python -m pytest -q tests/e2e/test_real_world.py, then python tools/testbed/testbed.py down. Without
it up, those tests skip and say why.
tools\screenshots.py photographs every screen into docs\screenshots\.
Credits
Swiss Army Bench is built with Claude, by Anthropic.
How it was built. Dylan Brown designed it and decided every feature, one question at a time; Claude wrote the code, the tests and the documentation, and checked each change in a real browser with made-up data. The commit history covers four days, 12 to 15 November 2026: 268 commits and 12 releases (0.10.0 to 1.6.0), with commits spread over about 66 hours. Larger pieces (read-only table cells, HTML cells, the cleanup and the last round of usability changes) were built by Claude working as several agents in parallel, each checked before it was kept. The work before 1.0.0 was squashed into that release's single commit, so it is not counted here.
License
Licensed under either of the Apache License, Version 2.0 or the MIT License, at your option.
Unless you explicitly state otherwise, any contribution you intentionally submit for inclusion in this project, as defined in the Apache-2.0 license, is dual licensed as above, without any additional terms or conditions.
Metadata
Release files for swissarmybench 0.0.35
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swissarmybench-0.0.35-py3-none-any.whl | Python 3 | none | any | Details for swissarmybench-0.0.35-py3-none-any.whl |
Release files / swissarmybench-0.0.35-py3-none-any.whl
| Download URL | swissarmybench-0.0.35-py3-none-any.whl |
|---|---|
| Size | 20.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb4675ecf7dca98ad387e425728fd4ff1bc963a5411c9e2df611d83dd12f35cb
|
|
BLAKE2b-256 checksum How to use checksums |
1fe7cadc993ec8f3e69e175a738f78650d4ec57fed8feede11a7bb7319cbceec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for swissarmybench 0.0.35
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for swissarmybench-0.0.35-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.