{"content":"# aux4/mdb\n\nMicrosoft Access (.mdb) database tools for the aux4 CLI.\n\nThe aux4/mdb package lets you read legacy Microsoft Access database files directly from the command line — no Microsoft Access installation required. You can list the tables in a database, inspect a table's schema, and extract rows with column selection and pagination. Every command outputs JSON, so results pipe cleanly into jq and other aux4 commands for reporting, migration, and ETL tasks.\n\n## Installation\n\n``bash\naux4 aux4 pkger install aux4/mdb\n`\n\n## Quick Start\n\n`bash\n# List the tables in a database\naux4 mdb tables --file inventory.mdb\n\n# Inspect a table's schema\naux4 mdb describe --file inventory.mdb --table Products\n\n# Read the first 10 rows of a table\naux4 mdb data --file inventory.mdb --table Products --limit 10\n`\n\n## Usage\n\n### Commands\n\n- [aux4 mdb tables](./commands/mdb/tables) - List the tables in an Access database as a JSON array.\n- [aux4 mdb describe](./commands/mdb/describe) - Describe a table's schema as a JSON object.\n- [aux4 mdb data](./commands/mdb/data) - Read rows from a table as a JSON array.\n- [aux4 mdb stream](./commands/mdb/stream) - Stream rows from a table as newline-delimited JSON (NDJSON).\n\nThe --file option accepts the path to the .mdb file and can also be passed as the first positional argument (e.g. aux4 mdb tables inventory.mdb). Password-protected databases are supported through the --password option on every command.\n\n### aux4 mdb tables\n\nList the tables contained in a database. By default only normal (user) tables are returned.\n\n`bash\naux4 mdb tables \\\n --file <file.mdb> \\\n [--password <password>] \\\n [--normalTables <true|false>] \\\n [--systemTables <true|false>] \\\n [--linkedTables <true|false>] \\\n [--showCount <true|false>]\n`\n\nOptions:\n\n- --file <file.mdb> Path to the Access database file\n- --password <password> Database password (default: none)\n- --normalTables Include normal tables (default: true)\n- --systemTables Include system tables (default: false)\n- --linkedTables Include linked tables (default: false)\n- --showCount Include the row count for each table (default: false)\n\nExamples:\n\n`bash\n# List user tables\naux4 mdb tables --file inventory.mdb\n\n# List user tables with their row counts\naux4 mdb tables --file inventory.mdb --showCount true\n\n# List only system tables\naux4 mdb tables --file inventory.mdb --normalTables false --systemTables true\n`\n\n### aux4 mdb describe\n\nDescribe a table's schema, including its columns and row count.\n\n`bash\naux4 mdb describe \\\n --file <file.mdb> \\\n --table <table> \\\n [--password <password>]\n`\n\nOptions:\n\n- --file <file.mdb> Path to the Access database file\n- --table <table> Table name to describe\n- --password <password> Database password (default: none)\n\nExample:\n\n`bash\naux4 mdb describe --file inventory.mdb --table Products\n`\n\n### aux4 mdb data\n\nRead rows from a table, with optional column selection and pagination.\n\n`bash\naux4 mdb data \\\n --file <file.mdb> \\\n --table <table> \\\n [--password <password>] \\\n [--columns <c1,c2,...>] \\\n [--offset <n>] \\\n [--limit <n>]\n`\n\nOptions:\n\n- --file <file.mdb> Path to the Access database file\n- --table <table> Table name to read\n- --password <password> Database password (default: none)\n- --columns <c1,c2,...> Comma-separated list of columns to return (default: all)\n- --offset <n> Number of rows to skip (default: 0)\n- --limit <n> Maximum number of rows to return (default: all)\n\nExamples:\n\n`bash\n# Read every row\naux4 mdb data --file inventory.mdb --table Products\n\n# Read specific columns\naux4 mdb data --file inventory.mdb --table Products --columns Id,Name\n\n# Page through the table 100 rows at a time\naux4 mdb data --file inventory.mdb --table Products --offset 100 --limit 100\n`\n\n### aux4 mdb stream\n\nRead rows from a table and emit them as newline-delimited JSON (NDJSON) — one object per line — instead of a single array. Useful for piping row-by-row into other commands or processing large extracts. Accepts the same options as aux4 mdb data.\n\n`bash\naux4 mdb stream \\\n --file <file.mdb> \\\n --table <table> \\\n [--password <password>] \\\n [--columns <c1,c2,...>] \\\n [--offset <n>] \\\n [--limit <n>]\n`\n\nExamples:\n\n`bash\n# Stream every row as NDJSON\naux4 mdb stream --file inventory.mdb --table Products\n\n# Stream selected columns\naux4 mdb stream --file inventory.mdb --table Products --columns Id,Name\n`\n\nNote: mdb-reader reads the requested rows into memory before emitting them, so stream changes the output *format* (NDJSON vs a JSON array) rather than making the read lazy. Use --offset/--limit to bound large tables.\n\n## Output\n\nAll commands emit JSON to stdout, which makes it easy to post-process results:\n\n`bash\n# Pretty-print a schema\naux4 mdb describe --file inventory.mdb --table Products | jq .\n\n# Extract a single column with jq\naux4 mdb data --file inventory.mdb --table Products | jq '.[].Name'\n``\n\n## License\n\nApache-2.0. See the LICENSE file for details.\n"}