Invect CLI (`invect-cli`) is a command-line interface tool designed to streamline the management of Invect workflow projects. It simplifies essential development tasks such as schema generation, database migrations, and initial project setup. Currently at version `0.0.11`, the package is in an early development stage, which implies a potentially frequent release cadence with minor version bumps that may introduce breaking changes. This CLI acts as a thin wrapper around the core `@invect/cli` package, offering an integrated experience for users. Its key functionalities include interactively initializing new projects, generating dialect-specific Drizzle schema files (supporting SQLite, PostgreSQL, and MySQL) by merging core and plugin schemas, applying database migrations, displaying diagnostic system and project information, and generating cryptographically secure encryption keys. It relies on `invect.config.ts` in the project root for configuration, facilitating seamless plugin integration and database connection management.
npm install invect-cliVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install the Invect CLI, initialize a new project interactively, and then generate database schema files based on your configuration.
Review the official documentation or changelog carefully for each update before upgrading your projects to identify and address any breaking changes.
Prefer to rely on `invect-cli` for managing its internal dependency versions. If encountering issues, try reinstalling `invect-cli` to ensure consistent dependency resolution.
Always run `npx invect-cli init` from your project's root to ensure the configuration file is created correctly, or manually verify its location and naming.
Ensure `@invect/core` is correctly installed in your project: `npm install @invect/core` (or `npm install -D @invect/core` if only used for config). If using `npx`, ensure node_modules are properly accessible.
Verify the `connectionString` format and credentials for your specific database type (SQLite, PostgreSQL, MySQL). Check server status, network access, and correct file paths for SQLite databases.
Execute `npx invect-cli init` from your project's root directory to generate the `invect.config.ts` file, or confirm it is present and correctly named in the root.