@creopse/cli
v0.0.15
Published
Creopse CLI tools
Readme
Creopse CLI
A command-line utility for managing sections, widgets, and pages (Vue or React) in the Creopse ecosystem.
Requirements
- Laravel project with Creopse installed
Installation
npm install -g @creopse/cliUsage
creopse [command] [options]Commands
creopse install
Installs the Creopse package in your Laravel project.
| Option | Description |
|---|---|
| -t, --template <template> | Frontend template (vue or react, default: vue) |
| --no-force | Disable force mode (enabled by default) |
creopse section
Manage section components.
| Subcommand | Alias | Description |
|---|---|---|
| add <name...> | make | Add one or more section components and DB entries |
| remove <name...> | delete | Remove one or more section components and DB entries |
| edit <name> | update | Update title (per locale), data structure, and/or settings structure |
Section add options (single name only): -t/--title <locale:value> (repeatable), --data-structure <json>, --settings-structure <json>.
Section edit options: -t/--title <locale:value> (repeatable), --data-structure <json>, --settings-structure <json>.
creopse widget
Manage widget components.
| Subcommand | Alias | Description |
|---|---|---|
| add <name...> | make | Add one or more widget components |
| remove <name...> | delete | Remove one or more widget components |
creopse page
Manage pages.
| Subcommand | Alias | Description |
|---|---|---|
| add <name> | make | Create an empty page (sections attached separately) |
| edit <name> | update | Update title, content, and/or position |
Page add options: -t/--title <locale:value> (repeatable), --content <text>, --position <number> (default: 0).
Page edit options: -t/--title <locale:value> (repeatable), --content <text>, --position <number>.
Examples
# Install the package
creopse install
# Add a section
creopse section add HeroBanner
# Remove a section
creopse section remove HeroBanner
# Edit a section
creopse section edit HeroBanner --title "en:Hero" --title "fr:Héros"
# Add a widget
creopse widget add NewsletterForm
# Remove a widget
creopse widget remove NewsletterForm
# Add multiple sections at once
creopse section add HeroBanner ContactForm Footer
# Create a page
creopse page add home --title "en:Home" --position 1
# Update a page
creopse page edit home --content "<h1>Hello</h1>" --position 2Development
pnpm install
pnpm run build # compile TypeScript to build/
pnpm run check:ts # type-check only (no emit)
pnpm test # run tests (Vitest)
pnpm test:watch # run tests in watch mode
pnpm run format # format with Prettier