0.1.48 • Published 10 months ago

@linkbcms/cli v0.1.48

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

linkb CMS CLI

A command-line interface tool for the linkb Content Management System.

Installation

Using npm

npm install -g @linkbcms/cli

Using yarn

yarn global add @linkbcms/cli

Using pnpm

pnpm add -g @linkbcms/cli

Using npx

You can also use it directly without installation:

npx @linkbcms/cli [command]

Prerequisites

Before using the linkb CLI, ensure you have:

  1. A .env file in your project directory with the following variables:

    • DATABASE_TYPE: The type of database you're using
    • DATABASE_URL: The connection string for your database
  2. A cms.config.tsx file in your project directory

Usage

Running the command without arguments will display the help menu:

linkb

Creating a New Application

You can create a new linkb application using the create-app command:

linkb create-app my-app

Or using npx directly:

npx @linkbcms/cli linkb create-app my-app

The create-app command accepts the following options:

  • -t, --template <name>: Template to use (default: basic)
  • --use-npm: Use npm as the package manager
  • --use-yarn: Use yarn as the package manager
  • --use-pnpm: Use pnpm as the package manager

This will create a new application based on the specified template. The dependencies will be automatically installed.

Database Operations

The CLI provides several database management commands:

linkb db [command]

Available database commands:

  • gen-schema: Generate database migration from your CMS configuration

    linkb db gen-schema
  • migrate: Run database migrations

    linkb db migrate
  • status: Check migration status

    linkb db status
  • test-connection: Test database connectivity

    linkb db test-connection

Error Handling

The CLI will check for:

  • Existence of .env file
  • Required environment variables
  • Existence of cms.config.tsx file
  • Proper execution of database operations

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run in development mode
npm run dev

License

MIT

0.1.48

10 months ago

0.1.47

10 months ago

0.1.46

11 months ago

0.1.45

11 months ago

0.1.44

11 months ago

0.1.43

11 months ago

0.1.42

11 months ago

0.1.41

11 months ago

0.1.39

11 months ago

0.1.38

11 months ago

0.1.37

11 months ago

0.1.36

11 months ago

0.1.35

11 months ago

0.1.34

11 months ago

0.1.33

11 months ago

0.1.32

11 months ago

0.1.31

11 months ago

0.1.30

11 months ago

0.1.28

11 months ago

0.1.27

11 months ago

0.1.26

11 months ago

0.1.25

11 months ago

0.1.24

11 months ago

0.1.23

11 months ago

0.1.22

11 months ago

0.1.21-beta.0

11 months ago

0.1.21

11 months ago

0.1.20

11 months ago

0.1.19

11 months ago

0.1.18

11 months ago

0.1.17

11 months ago

0.1.16

11 months ago

0.1.15

11 months ago

0.1.14

11 months ago

0.1.13

11 months ago

0.1.11-beta.3

11 months ago

0.1.11-beta.2

11 months ago

0.1.11-beta.1

11 months ago

0.1.11-beta.0

11 months ago

0.1.12

11 months ago

0.1.11

11 months ago

0.1.10

11 months ago

0.1.9

11 months ago

0.1.8

11 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.5

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

12 months ago