@kooboo/cli
v0.5.0
Published
> Command alias: `kb` - You can use `kb` instead of `kooboo-cli` as the prefix for all commands
Readme
Kooboo CLI
Command alias:
kb- You can usekbinstead ofkooboo-clias the prefix for all commands
Kooboo CLI is a command-line tool for Kooboo local development.
Install
# Using npm
npm install -g @kooboo/cli
# Using pnpm
pnpm add -g @kooboo/cli
# Using yarn
yarn global add @kooboo/cliCommands
kooboo-cli <command> [options]
# or use the shorthand form
kb <command> [options]| Command | Description | Aliases |
| ---------- | --------------------------------------------- | ------- |
| config | Set or get configuration values | |
| new | Create a new Kooboo site | n |
| clone | Clone a remote Kooboo site | c |
| pull | Pull remote Kooboo site code to local | |
| push | Push local Kooboo site code to remote | |
| generate | Generate Kooboo code resources | g |
| sync | Synchronize Kooboo site code to server | |
| export | Export Kooboo site resources to zip file | |
Usage
config
Set or get configuration values.
# Get all configs (full command)
kooboo-cli config
# Get all configs (shorthand command)
kb config
# Get a specific config (full command)
kooboo-cli config <key>
# Get a specific config (shorthand command)
kb config <key>
# Set a config (full command)
kooboo-cli config <key> <value>
# Set a config (shorthand command)
kb config <key> <value>
# Set a global config (full parameter)
kooboo-cli config <key> <value> --global
# Set a global config (shorthand parameter)
kb config <key> <value> -gnew
Create a new Kooboo site.
# Create a new site (full command)
kooboo-cli new <site-name>
# Create a new site (shorthand command)
kb new <site-name>
# Specify host (full parameter)
kooboo-cli new <site-name> --host <host>
# Specify host (shorthand parameter)
kb new <site-name> -h <host>clone
Clone a remote Kooboo site.
# Clone a site (full command)
kooboo-cli clone <siteUrl>
# Clone a site (shorthand command)
kb clone <siteUrl>
# Specify directory (full command)
kooboo-cli clone <siteUrl> <dir>
# Specify directory (shorthand command)
kb clone <siteUrl> <dir>
# Specify template (full parameter)
kooboo-cli clone <siteUrl> <dir> --template <templateName>
# Specify template (shorthand parameter)
kb clone <siteUrl> <dir> -t <templateName>
# Specify authentication (full parameter)
kooboo-cli clone <siteUrl> <dir> --username <username> --password <password>
# Specify authentication (shorthand parameter)
kb clone <siteUrl> <dir> -u <username> -p <password>pull
Pull remote Kooboo site code to local environment.
# Pull all resources (full command)
kooboo-cli pull
# Pull all resources (shorthand command)
kb pull
# Pull a specific resource type (full command)
kooboo-cli pull <resource>
# Pull a specific resource type (shorthand command)
kb pull <resource>
# Pull a specific resource by name (full command)
kooboo-cli pull <resource> <name>
# Pull a specific resource by name (shorthand command)
kb pull <resource> <name>push
Push local Kooboo site code to remote environment.
# Push all changes (full command)
kooboo-cli push
# Push all changes (shorthand command)
kb push
# Push a specific resource type (full command)
kooboo-cli push <resource>
# Push a specific resource type (shorthand command)
kb push <resource>
# Push a specific resource by name (full command)
kooboo-cli push <resource> <name>
# Push a specific resource by name (shorthand command)
kb push <resource> <name>generate
Generate Kooboo code resources.
# Generate a resource (full command)
kooboo-cli generate <resource> <name>
# Generate a resource (shorthand command)
kb generate <resource> <name>
# Generate a resource (shorthand command with alias)
kb g <resource> <name>sync
Synchronize Kooboo site code to server environment.
# Sync changes (full command)
kooboo-cli sync
# Sync changes (shorthand command)
kb sync
# Initialize synchronization (full parameter)
kooboo-cli sync --init
# Initialize synchronization (shorthand parameter)
kb sync -i
# Specify site information (full parameter)
kooboo-cli sync --site-url <url> --username <username> --password <password>
# Specify site information (shorthand parameter)
kb sync -s <url> -u <username> -p <password>
# Specify common module path (full parameter)
kooboo-cli sync --common-module-path <path>
# Specify common module path (shorthand parameter)
kb sync -c <path>export
Export Kooboo site resources to zip file.
# Export site resources (full command and parameters)
kooboo-cli export --site-url <url> --username <username> --password <password> --file <file>
# Export site resources (shorthand command and parameters)
kb export -s <url> -u <username> -p <password> -f <file>