YndigoBlue · .NET Global Tool

Database operations from the command line — powered by Velocity

Schema builds, data import/export, and migrations as simple foundry commands — scriptable in your terminal, your CI/CD pipeline, or your deployment scripts. No bespoke C# project required.

dotnet tool install -g YndigoBlue.Foundry
terminal
# Install once, globally
dotnet tool install -g YndigoBlue.Foundry

# Scaffold a new project — schema template, datasource file, run script
foundry create my-database SQLServer

# Build the schema against a live database
foundry build schema --datasource connection.json --file schemas/customers.xml

# Import seed data straight from CSV
foundry import --datasource connection.json --schema dbo --table customers --file seed/customers.csv

# Run a multi-step deployment from a single project file
foundry run deploy.json
7
Supported Databases
5
Platform Packages
.NET 10
Global Tool
Zero
Custom Code Required
Capabilities

Everything Velocity can do — from the shell

Every schema build, data operation, and migration that Velocity Framework supports is available as a simple, scriptable command.

Schema Management

Build schemas from definition files, load live database structure back to files, apply incremental updates, and validate that a database matches its definition.

Data Operations

Import CSV data into any table, and export table data or full schema/database definitions back to files — for backup, seeding, or migration between environments.

Database Maintenance

Drop schemas, tables, views, and indexes; empty tables or schemas without dropping the underlying structure. Tidy up environments without writing one-off scripts.

SQL Generation

Generate platform-correct DDL scripts from a definition file without touching a live database — for review and audit before deployment.

Batch Workflows

Define multi-step operations in a single JSON project file and run them as one command, with per-step overrides and nested run scripts for composing larger deployments.

Project Scaffolding

foundry create bootstraps a ready-to-go project directory: schema templates, log configuration, a starter run script, and a connection file for your chosen database.

Compatibility

Same engine, every database

Foundry is built on the Velocity Framework engine, so it speaks every vendor dialect Velocity does — connect via a datasource file or an inline connection string.

DB2
MySQL
Oracle
PostgreSQL
SQL Server
SQLite
Teradata
Built For Real Environments

Ships where your pipeline runs

Platform-specific packages for Windows, Linux, macOS, and Raspberry Pi — plus a cross-platform package for teams that don't need DB2 or SQLite.

Windows x64

Full support, including DB2 and SQLite

Linux x64

Full support, including DB2 and SQLite

macOS Arm64

Full support, including DB2 and SQLite

Raspberry Pi Arm64

All capabilities except DB2; SQLite included

Code

One command at a time

From scaffolding a new project to running a full multi-step deployment, every Foundry operation is a single, scriptable command.

# Scaffold a new project directory for a SQL Server target
foundry create my-database SQLServer
cd my-database
# Generated:
#   project.json             — entry point for `foundry run`
#   connection.json          — datasource file (edit with real credentials)
#   velocity.log.config      — log configuration
#   logs/                    — log output directory
#   schemas/                 — Velocity definition schema files

# Build the schema defined in the XML file against the live database
foundry build schema --datasource connection.json --file schemas/my-database.xml

# Validate a definition file before building it
foundry definition schema validate --datasource connection.json --file schemas/my-database.xml

# Pull the live structure back down to a file (reverse of build)
foundry load schema --datasource connection.json --schema dbo --out schemas/my-database.actual.xml

# Apply the changes in the definition file to the live database
foundry update schema --datasource connection.json --file schemas/my-database.xml
# Import CSV data into a table
foundry import --datasource connection.json --schema dbo --table customers --file seed/customers.csv

# Export a single table's data back out to CSV
foundry export data --datasource connection.json --schema dbo --table customers --out backup/customers.csv

# Export a schema definition (and optionally its data) — useful for capturing drift
foundry export schema --datasource connection.json --target dbo --out exports/ --format Json

# Export an entire database — every schema, every table — in one call
foundry export database --datasource connection.json --out backup/full-export/
# Empty a table's rows without dropping the table itself
foundry empty table --datasource connection.json --schema dbo --table staging_imports

# Empty every table in a schema — continue past tables blocked by FK constraints
foundry empty schema --datasource connection.json --schema staging --ignore-failures

# Drop a single index or view
foundry drop index --datasource connection.json --schema dbo --table customers --index ix_customers_email
foundry drop view --datasource connection.json --schema dbo --view v_active_customers

# Drop an entire schema and everything in it — use with care
foundry drop schema --datasource connection.json --schema staging
# Generate CREATE SQL from a definition file to a file — no execution against a live database
foundry sql schema --datasource connection.json --file schemas/my-database.xml --out scripts/my-database.sql

# Include DROP statements ahead of each CREATE, for a clean-room deploy
foundry sql schema --datasource connection.json --file schemas/my-database.xml --drop --out scripts/my-database.sql

# Same generation for an entire database definition
foundry sql database --datasource connection.json --file my-database.xml --drop --out scripts/my-database.sql
-- scripts/my-database.sql (excerpt) — generated for review before deployment
CREATE TABLE dbo.customers (
    customer_id   BIGINT IDENTITY(1,1) PRIMARY KEY,
    name          VARCHAR(200) NOT NULL,
    email         VARCHAR(320) NOT NULL,
    created_at    DATETIME2 NOT NULL DEFAULT SYSUTCDATETIME()
);
CREATE INDEX ix_customers_email ON dbo.customers (email);

project.json — each step carries exactly one command property, named after the CLI command it runs:

{
  "$schema": "schemas/run-script.schema.json",
  "name": "Customer DB Deployment",
  "datasource": "connection.json",
  "logConfig": "velocity.log.config",
  "steps": [
    { "name": "Build core schema",  "build-schema": { "file": "schemas/core.xml" } },
    { "name": "Load customers",     "import": { "schema": "dbo", "table": "customers", "file": "seed/customers.csv" } },
    { "name": "Load products",      "import": { "schema": "dbo", "table": "products",  "file": "seed/products.csv" } },
    { "name": "Run post-deploy",    "run": { "file": "scripts/post-deploy.json" } }
  ]
}
# Run the whole deployment as one command — ideal for CI/CD pipelines
foundry run deploy.json

# Run and continue past any step that fails
foundry run deploy.json --continue-on-error

Project files can nest run steps to compose larger, multi-stage deployments from smaller, reusable pieces. Full command reference in the documentation.

Architecture

A thin CLI over the Velocity engine

Foundry parses your command or project file and drives the same battle-tested Velocity Framework engine that powers application code — no separate engine to maintain, no behavior drift between your app and your pipeline.

Terminal / CI Pipeline foundry [command] CLI args / JSON Foundry Command Parser & Runner Schema Build / Validate Import / Export / SQL Gen Velocity Framework Core Native drivers DB2 MySQL Oracle PostgreSQL SQL Server SQLite Teradata

Put database lifecycle management in version control

Install Foundry as a global tool, run it anywhere .NET 10 runs, and turn every schema build, migration, and data load into a command you can commit, review, and repeat.