Install the get-dotenv host (optional peer) and wire the DynamoDB plugin.
npm i -D @karmaniverous/get-dotenv
Create a host CLI
// mycli.ts
import { createCli } from '@karmaniverous/get-dotenv';
import { dynamodbPlugin } from '@karmaniverous/entity-client-dynamodb/get-dotenv';
await createCli({ alias: 'mycli' })
.use(dynamodbPlugin) // namespaced as "dynamodb"
.run(process.argv.slice(2));
Minimal config (getdotenv.config.json)
{
"plugins": {
"dynamodb": {
"tablesPath": "./tables",
"tokens": {
"table": "table",
"entityManager": "entityManager",
"transform": "transform"
}
}
}
}
Next