0.1.48 • Published 8 months ago

@linkbcms/cli v0.1.48

Weekly downloads
-
License
MIT
Repository
-
Last release
8 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

8 months ago

0.1.47

8 months ago

0.1.46

8 months ago

0.1.45

8 months ago

0.1.44

8 months ago

0.1.43

8 months ago

0.1.42

8 months ago

0.1.41

8 months ago

0.1.39

8 months ago

0.1.38

8 months ago

0.1.37

8 months ago

0.1.36

8 months ago

0.1.35

8 months ago

0.1.34

8 months ago

0.1.33

8 months ago

0.1.32

8 months ago

0.1.31

8 months ago

0.1.30

8 months ago

0.1.28

8 months ago

0.1.27

8 months ago

0.1.26

8 months ago

0.1.25

8 months ago

0.1.24

8 months ago

0.1.23

8 months ago

0.1.22

8 months ago

0.1.21-beta.0

8 months ago

0.1.21

8 months ago

0.1.20

8 months ago

0.1.19

8 months ago

0.1.18

8 months ago

0.1.17

8 months ago

0.1.16

8 months ago

0.1.15

8 months ago

0.1.14

8 months ago

0.1.13

8 months ago

0.1.11-beta.3

8 months ago

0.1.11-beta.2

8 months ago

0.1.11-beta.1

8 months ago

0.1.11-beta.0

8 months ago

0.1.12

8 months ago

0.1.11

9 months ago

0.1.10

9 months ago

0.1.9

9 months ago

0.1.8

9 months ago

0.1.7

9 months ago

0.1.6

9 months ago

0.1.5

9 months ago

0.1.4

9 months ago

0.1.3

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago