0.1.48 • Published 12 months ago

@linkbcms/cli v0.1.48

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

12 months ago

0.1.47

12 months ago

0.1.46

12 months ago

0.1.45

1 year ago

0.1.44

1 year ago

0.1.43

1 year ago

0.1.42

1 year ago

0.1.41

1 year ago

0.1.39

1 year ago

0.1.38

1 year ago

0.1.37

1 year ago

0.1.36

1 year ago

0.1.35

1 year ago

0.1.34

1 year ago

0.1.33

1 year ago

0.1.32

1 year ago

0.1.31

1 year ago

0.1.30

1 year ago

0.1.28

1 year ago

0.1.27

1 year ago

0.1.26

1 year ago

0.1.25

1 year ago

0.1.24

1 year ago

0.1.23

1 year ago

0.1.22

1 year ago

0.1.21-beta.0

1 year ago

0.1.21

1 year ago

0.1.20

1 year ago

0.1.19

1 year ago

0.1.18

1 year ago

0.1.17

1 year ago

0.1.16

1 year ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago

0.1.11-beta.3

1 year ago

0.1.11-beta.2

1 year ago

0.1.11-beta.1

1 year ago

0.1.11-beta.0

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago