0.1.0 • Published 1 year ago
@tusken/cli v0.1.0
@tusken/cli
The CLI for tusken Postgres clients
Configuration
If no tusken.config.ts
file is found, a default connection to localhost:5432
is used. The environment variables used by node-postgres
are respected.
tusken.config.ts
import { defineConfig } from 'tusken/config'
export default defineConfig({
// The directory where the Postgres data directory is found.
dataDir: './postgres',
// The directory where the generated client is emitted.
schemaDir: './src/generated',
// The Postgres connection options.
connection: {
host: 'localhost',
port: 5432,
user: 'postgres',
password: ' ',
},
// The Postgres connection pool options. Same as node-postgres.
pool: {...},
})
Commands
tusken generate
Generate a database client from a Postgres database.
Usage:
$ tusken generate
Options:
-c, --config <path> Path to config file
-d, --database <name> The database to generate types for
-w, --watch Enable watch mode
-h, --help Display this message
tusken wipe
Delete all rows in a database's public
schema.
Usage:
$ tusken wipe
Options:
-c, --config <path> Path to config file
-d, --database <name> The database to wipe
-h, --help Display this message
The --config
argument is required, in order to prevent mistakes.
tusken import
Import one or more CSV files into a database.
Usage:
$ tusken import [...files]
Options:
-c, --config <path> Path to config file
-d, --database <name> The database to import into
-t, --table <name> The table to import into
--noConflicts Fail if a row conflict is found
-h, --help Display this message
1.0.0-alpha.17
1 year ago
1.0.0-alpha.16
1 year ago
1.0.0-alpha.15
2 years ago
1.0.0-alpha.14
2 years ago
1.0.0-alpha.13
2 years ago
1.0.0-alpha.12
2 years ago
1.0.0-alpha.11
2 years ago
1.0.0-alpha.10
2 years ago
1.0.0-alpha.9
2 years ago
1.0.0-alpha.8
2 years ago
1.0.0-alpha.7
2 years ago
1.0.0-alpha.6
2 years ago
1.0.0-alpha.5
2 years ago
1.0.0-alpha.4
2 years ago
1.0.0-alpha.3
2 years ago
1.0.0-alpha.2
2 years ago
1.0.0-alpha.1
2 years ago
0.1.0
2 years ago