enginiq-cli
v1.0.2
Published
CLI for EnginiQ database tooling
Maintainers
Readme
EnginiQ CLI
EnginiQ CLI is the terminal interface for the safe Postgres runtime in EnginiQ.
Use it to:
- inspect schema
- create tables
- add columns
- run JSON migrations
- verify setup with
enginiq doctor - preview or block writes with trust controls like
--dry-run,--read-only, and--require-approval
Install
npm install enginiq-cliThis is the fastest way to try EnginiQ against a Postgres or Supabase database from the command line.
Or run it without installing globally:
npx enginiq --helpConfiguration
The CLI resolves the database URL in this order:
--database_urlENGINIQ_DATABASE_URLDATABASE_URL.enginiqrc.json
Example config:
{
"database_url": "postgresql://postgres:postgres@localhost:5432/postgres"
}Commands
enginiq init
enginiq tools
enginiq schema
enginiq create-table posts
enginiq add-column posts title:text
enginiq migrate
enginiq doctorMigration format
Place JSON files inside ./migrations.
[
{ "tool": "create_table", "params": { "table_name": "users" } },
{
"tool": "add_column",
"params": {
"table": "users",
"column": { "name": "email", "type": "text" }
}
}
]Example flow
export ENGINIQ_DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres"
npx enginiq doctor
npx enginiq create-table users
npx enginiq add-column users email:text
npx enginiq schema --jsonTrust controls
npx enginiq create-table posts --dry-run
npx enginiq add-column posts title:text --read-only
npx enginiq migrate --require-approval
npx enginiq migrate --require-approval --approval-token approvedOptional metadata for audit logs:
npx enginiq create-table posts --dry-run --actor mohan --environment stagingOutput
- human-friendly text by default
- machine-friendly JSON with
--json
