0.1.0 • Published 2 years 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
2 years ago
1.0.0-alpha.16
3 years ago
1.0.0-alpha.15
3 years ago
1.0.0-alpha.14
3 years ago
1.0.0-alpha.13
3 years ago
1.0.0-alpha.12
3 years ago
1.0.0-alpha.11
3 years ago
1.0.0-alpha.10
3 years ago
1.0.0-alpha.9
3 years ago
1.0.0-alpha.8
3 years ago
1.0.0-alpha.7
3 years ago
1.0.0-alpha.6
3 years ago
1.0.0-alpha.5
3 years ago
1.0.0-alpha.4
3 years ago
1.0.0-alpha.3
3 years ago
1.0.0-alpha.2
3 years ago
1.0.0-alpha.1
3 years ago
0.1.0
3 years ago