Skip to content

Available Commands

The nikogin CLI is available at the root of your plugin. All commands follow the make:* convention and scaffold classes from stubs.

Running commands

bash
# Using Lando
lando php wp-content/plugins/my-plugin/nikogin make:{command} {ClassName} [options]

All commands

CommandGeneratesOutput path
make:repositoryRepository classapp/Repository/{Type}/{Name}.php
make:listenerListener classapp/Listeners/{Type}/{Name}.php
make:controllerController classapp/Controllers/{Type}/{Name}.php
make:migrationMigration classapp/Migrations/{Name}.php
make:jobJob classapp/Jobs/{Name}.php
make:shortcodeShortcode classapp/Shortcodes/{Name}.php
make:providerService providerapp/Providers/{Name}.php

Common options

OptionCommandsDescription
--typerepository, listener, controllerDetermines parent class and output subdirectory
--namelistener, shortcode, jobSets the hook/tag/shortcode name (auto-derived if omitted)
--parentcontroller (submenu)Sets the parent menu slug

Error handling

bash
# Missing class name
Error: Class name is required.

# Missing --type
Error: --type is required. Available types: db, wp, taxonomy

# Unknown type
Error: Unknown type "custom". Available: db, wp, taxonomy

# File already exists
Error: File already exists: app/Repository/Db/UserRepository.php

Nikogin Framework — WordPress plugin development made simple.