Skip to main content

mercato auth list-tenants

yarn mercato auth list-tenants enumerates tenants and reports their creation timestamps.

Usage

yarn mercato auth list-tenants

Output

Found 2 tenant(s):

ID | Name | Created
-------------------------------------|-------------------------|-------------------
81c3b8b0-6f06-44f6-9c22-12c0d9ec3c63 | Acme HQ Tenant | 2/18/2025
6f91bf53-1b24-4154-93ae-2dc8fc8b4661 | Sandbox Tenant | 2/19/2025

If no tenants exist, the command prints No tenants found.

Use Cases

  • Quickly retrieving tenant IDs for other commands such as mercato example seed-todos.
  • Auditing environments in development or staging without opening a database console.

Troubleshooting

  • Empty result – ensure migrations ran and that a tenant was created (e.g. via mercato auth setup).
  • Different timezone – timestamps use the Node.js process locale. Set TZ if you need predictable output.