{"id":17717,"library":"invect-cli","title":"Invect Command Line Interface","description":"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.","status":"active","version":"0.0.11","language":"javascript","source_language":"en","source_url":"https://github.com/robase/invect","tags":["javascript","automation","cli","invect","workflow"],"install":[{"cmd":"npm install invect-cli","lang":"bash","label":"npm"},{"cmd":"yarn add invect-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add invect-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This package is a thin wrapper that delegates core CLI functionality to @invect/cli.","package":"@invect/cli","optional":false},{"reason":"Provides core utilities like `defineConfig` used in `invect.config.ts` for project configuration.","package":"@invect/core","optional":false}],"imports":[{"note":"Used within `invect.config.ts` for project-level configuration, not typically imported in application code.","symbol":"defineConfig","correct":"import { defineConfig } from '@invect/core';"}],"quickstart":{"code":"npm install -D invect-cli\n\nnpx invect-cli init\n# Follow the interactive prompts to set up your project,\n# including framework detection, dependency installation,\n# invect.config.ts creation, initial schema generation, and migration.\n\nnpx invect-cli generate\n# Generates Drizzle schema files for configured database dialects.","lang":"typescript","description":"Demonstrates how to install the Invect CLI, initialize a new project interactively, and then generate database schema files based on your configuration."},"warnings":[{"fix":"Review the official documentation or changelog carefully for each update before upgrading your projects to identify and address any breaking changes.","message":"As a package in early development (version `0.0.x`), `invect-cli` may introduce breaking changes in minor or even patch releases. Ensure thorough testing when updating.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Prefer to rely on `invect-cli` for managing its internal dependency versions. If encountering issues, try reinstalling `invect-cli` to ensure consistent dependency resolution.","message":"This package is a 'thin wrapper' around `@invect/cli`. While `invect-cli` typically manages its underlying dependencies, unexpected behavior might occur if you manually install or update `@invect/cli` or `@invect/core` to incompatible versions.","severity":"gotcha","affected_versions":"*"},{"fix":"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.","message":"The `invect.config.ts` file must be present in your project's root directory for `invect-cli` commands to execute correctly. Misplacement or incorrect naming will lead to configuration errors.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-23T00:00:00.000Z","next_check":"2026-07-22T00:00:00.000Z","problems":[{"fix":"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.","cause":"The `@invect/core` package, a dependency for `invect.config.ts`, is either not installed or not resolvable in the current environment.","error":"Error: Cannot find module '@invect/core' or its corresponding type declarations."},{"fix":"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.","cause":"The `connectionString` provided in `invect.config.ts` is invalid, malformed, or the database server is inaccessible.","error":"Error: Database connection failed. Please check your connectionString in invect.config.ts."},{"fix":"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.","cause":"The `invect-cli` command was executed in a directory without the required `invect.config.ts` file, or the file is incorrectly named/placed.","error":"Error: `invect.config.ts` not found in project root. Run `invect-cli init` to create one."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}