Registry / devops / invect-cli

invect-cli

JSON →
library0.0.11jsnpmunverified

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-cli
INSTALL
IMPORT
SIG · INVECT-CLI
I
invect-cli
devopsjavascriptv0.0.11
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

defineConfig
import { defineConfig } from '@invect/core';
Used within `invect.config.ts` for project-level configuration, not typically imported in application code.

Demonstrates how to install the Invect CLI, initialize a new project interactively, and then generate database schema files based on your configuration.

npm install -D invect-cli npx invect-cli init # Follow the interactive prompts to set up your project, # including framework detection, dependency installation, # invect.config.ts creation, initial schema generation, and migration. npx invect-cli generate # Generates Drizzle schema files for configured database dialects.
invect --version
Debug
Known issues
breakingAs 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.
fix
Review the official documentation or changelog carefully for each update before upgrading your projects to identify and address any breaking changes.
affects: >=0.0.1
gotchaThis 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.
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.
affects: *
gotchaThe `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.
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.
affects: *
Errors
Common errors & fixes
Error: Cannot find module '@invect/core' or its corresponding type declarations.
The `@invect/core` package, a dependency for `invect.config.ts`, is either not installed or not resolvable in the current environment.
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.
Error: Database connection failed. Please check your connectionString in invect.config.ts.
The `connectionString` provided in `invect.config.ts` is invalid, malformed, or the database server is inaccessible.
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.
Error: `invect.config.ts` not found in project root. Run `invect-cli init` to create one.
The `invect-cli` command was executed in a directory without the required `invect.config.ts` file, or the file is incorrectly named/placed.
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.
Upgrade
Version history
0.0.11latest on npm
Audit
Dependencies
@invect/clirequiredThis package is a thin wrapper that delegates core CLI functionality to @invect/cli.
@invect/corerequiredProvides core utilities like `defineConfig` used in `invect.config.ts` for project configuration.
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
invect-cli — npm install invect-cli · libregistry