Warlock CLI
Warlock CLI
The warlock tool is included with Hazaar and provides functionality for managing and interacting with Warlock servers, agents, and authentication users.
Usage
You can run the Warlock CLI from your project using:
vendor/bin/warlockExample output:
Warlock v1.0.0
Environment: development
Hazaar Console Application
Usage: warlock [GLOBAL OPTIONS] [COMMAND OPTIONS]To see available commands and options:
vendor/bin/warlock helpGlobal Options
--env,-e: The environment to use. OverridesAPPLICATION_ENV.--path,-p: Path to the application. Defaults to the current directory.
Command Reference
help
Display help information for a command:
vendor/bin/warlock help [command]run
Start the Warlock server using a config file:
vendor/bin/warlock run --config configs/warlock.jsonstop
Stop the Warlock server (when running as a background process):
vendor/bin/warlock stoprestart
Restart the Warlock server (when running as a background process):
vendor/bin/warlock restartagent
Manage the Warlock agent, which connects to the server and executes delayed jobs, services, and event handlers.
To see agent subcommands:
vendor/bin/warlock help agentAgent Subcommands
agent run
Start the Warlock agent:
vendor/bin/warlock agent run --path /path/to/appagent stop
Stop the Warlock agent:
vendor/bin/warlock agent stopagent restart
Restart the Warlock agent:
vendor/bin/warlock agent restartuser
Manage users in the Warlock authentication database (basic auth mode).
To see user subcommands:
vendor/bin/warlock help userUser Subcommands
user list
List users in the authentication database:
vendor/bin/warlock user list --dbfile /var/warlock/auth.dbuser add
Add a user:
vendor/bin/warlock user add alice --password 'S3curePass!' --dbfile /var/warlock/auth.dbuser del
Delete a user:
vendor/bin/warlock user del alice --yes --dbfile /var/warlock/auth.dbuser check
Check whether a username/password can authenticate:
vendor/bin/warlock user check alice 'S3curePass!' --dbfile /var/warlock/auth.dbRelated Documentation
Tips
Use vendor/bin/warlock help for the most accurate command list in your installed version.