AutoMax
ReferenceCLI commands

automax data, db

Import and preview datasets; migrate, inspect and switch the platform database.

data

automax data preview <file> [--limit <n>]
automax data import <dataset> <file> -p <slug> [-e <env>] [--to db|table] [--truncate]
automax data list -p <slug>
automax data seed -p <slug> [-e <env>] [--to db|table]
CommandPurpose
previewfirst rows and inferred columns of a CSV, JSON or YAML file
importload a file into datasets/dataset_rows (--to db) or into a td_<project>_<dataset> table (--to table); -e scopes rows to an environment (default *); --truncate replaces rows for that environment
listdatasets stored in the database for a project
seedimport every file under projects/<slug>/data/<env>/ and data/common/

db

automax db migrate [--to <name>] [--down]
automax db status
automax db sync
automax db reset --yes                                                     # sqlite only
automax db switch <sqlite|postgres> [--target-url <url>] [--target-path <file>] [--dry-run] [--truncate] [--env-file <file>] [--yes]
automax db export <dir>
automax db import <dir>
automax db prune [--keep-runs <n>] [--keep-days <n>] [-p <slug>] [--dry-run]
CommandPurpose
migrateapply pending migrations (creates the SQLite file on first use); --to targets one migration, --down rolls back one
statusapplied and pending migrations
syncupsert organization, workspaces, projects, modules and processes from automax.workspace.yaml and the project YAML files
resetdrop every AutoMax table (SQLite only)
switchmigrate the target, copy every table, verify row counts and rewrite DB_DRIVER / DATABASE_URL / SQLITE_PATH in the env file (--dry-run only verifies)
exportone JSONL file per table
importload JSONL files with ON CONFLICT DO NOTHING
prunedelete old runs and their artifact directories

Environment: DB_DRIVER (sqlite default, postgres), DATABASE_URL, SQLITE_PATH (default .automax/automax.db).

On this page