{"library":"onetable-cli","title":"OneTable CLI","description":"The OneTable CLI is a command-line interface tool designed to orchestrate DynamoDB migrations specifically for applications utilizing `dynamodb-onetable` and `onetable-migrate`. Currently at version 1.3.5, it receives frequent minor patch releases for bug fixes and dependency updates, with major feature releases occurring less often to introduce new capabilities like named migrations (v1.3.0). It serves as a crucial utility for development teams to initialize, reset, and evolve DynamoDB schema and data, and for production environments to manage step-wise database upgrades, downgrades, and maintenance tasks. Its key differentiators include supporting reversible, versioned, and named migrations, operating on both local and remote DynamoDB instances, and facilitating the successful evolution of single-table DynamoDB patterns by allowing automated and ordered sequencing of schema changes and data seeding.","language":"javascript","status":"active","last_verified":"Thu Apr 23","install":{"commands":["npm install onetable-cli"],"cli":{"name":"onetable","version":null}},"imports":["import { loadModel } from 'onetable-cli/util/model';","import { loadSchema } from 'onetable-cli/util/schema';","import { upgradeSchema } from 'onetable-cli/util/upgrade';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"npm i onetable-cli -g\nmkdir ./migrations\necho \"{\\n    onetable: {\\n        name: 'your-dynamo-table',\\n        partial: true\\n    },\\n    dir: './migrations'\\n}\" > migrate.json5\nonetable init\nonetable create my-first-migration\nonetable up --dry-run\nonetable up\n","lang":"bash","description":"This quickstart demonstrates how to install the CLI globally, set up a migration directory with a `migrate.json5` configuration file, initialize the migration system, create a new migration stub, and then run it in dry-run mode before applying it.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}