All Projects → candrianarijaona → slim-command

candrianarijaona / slim-command

Licence: MIT License
Useful commands for slim application

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to slim-command

Simple Console
Add an elegant command-line interface to any page
Stars: ✭ 107 (+723.08%)
Mutual labels:  console, command
Rxterm
Functional reactive terminals in C++ ⚡⌨️
Stars: ✭ 226 (+1638.46%)
Mutual labels:  console, console-application
Nload
Real-time network traffic monitor
Stars: ✭ 121 (+830.77%)
Mutual labels:  console, console-application
Libcon.ahk
LibCon - AutoHotkey Library For Console Support
Stars: ✭ 50 (+284.62%)
Mutual labels:  console, console-application
ansiart2utf8
Processes legacy BBS-style ANSI art (ACiDDraw, PabloDraw, etc.) to UTF-8. Escape codes and line endings are processed for terminal friendliness.
Stars: ✭ 32 (+146.15%)
Mutual labels:  console, console-application
Laravel Console Logger
Logging and Notifications for Laravel Console Commands.
Stars: ✭ 79 (+507.69%)
Mutual labels:  console, command
Hexed
Windows console-based hex editor
Stars: ✭ 145 (+1015.38%)
Mutual labels:  console, console-application
Nestjs Console
A nestjs module that provide a cli to your application.
Stars: ✭ 284 (+2084.62%)
Mutual labels:  console, command
px
ps and top for human beings
Stars: ✭ 151 (+1061.54%)
Mutual labels:  console, console-application
Sc Im
sc-im - Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal
Stars: ✭ 3,081 (+23600%)
Mutual labels:  console, console-application
Htop
htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
Stars: ✭ 5,626 (+43176.92%)
Mutual labels:  console, console-application
Slim-Console
Slim Framework Console
Stars: ✭ 26 (+100%)
Mutual labels:  console, slim
Mapscii
🗺 MapSCII is a Braille & ASCII world map renderer for your console - enter => telnet mapscii.me <= on Mac (brew install telnet) and Linux, connect with PuTTY on Windows
Stars: ✭ 5,886 (+45176.92%)
Mutual labels:  console, console-application
Zui
⬢ Zsh User Interface library – CGI+DHTML-like rapid application development with Zsh
Stars: ✭ 95 (+630.77%)
Mutual labels:  console, console-application
Php Console
🖥 PHP CLI application library, provide console argument parse, console controller/command run, color style, user interactive, format information show and more. 功能全面的PHP命令行应用库。提供控制台参数解析, 命令运行,颜色风格输出, 用户信息交互, 特殊格式信息显示
Stars: ✭ 310 (+2284.62%)
Mutual labels:  console, console-application
Criterion
Microbenchmarking for Modern C++
Stars: ✭ 140 (+976.92%)
Mutual labels:  console, console-application
conso
💢 PHP console applications for cool kids 💢
Stars: ✭ 40 (+207.69%)
Mutual labels:  console, console-application
Tty Markdown
Convert a markdown document or text into a terminal friendly output.
Stars: ✭ 275 (+2015.38%)
Mutual labels:  console, console-application
Laravel Zero
A PHP framework for console artisans
Stars: ✭ 2,821 (+21600%)
Mutual labels:  console, console-application
impress-cli
Impress Application Server Command line interface
Stars: ✭ 25 (+92.31%)
Mutual labels:  console, command

Slim Framework Command Line

This repository contains a set of useful command lines for slim application. It uses the symfony console component.

Install

Via composer

$ composer require candrianarijaona/slim-command

Requires Slim 3.0.0 or newer.

Usage

First, you need to create a PHP script to define the console application. In this case, let's put it under the directory /bin. Make you sure that your console has an access to your slim app.

#!/usr/bin/env php
<?php

require __DIR__.'/../bootstrap.php'; //The bootstrap file where you init your slim app

use Symfony\Component\Console\Application;

$application = new Application();
$container = $app->getContainer();

// ... register commands

$application->run();

You can register additionnal command using add().

Available commands

Container

Display the registered services for an application.

<?php

use Candrianarijaona\Command\Container\DebugContainerCommand;

$application->add(new DebugContainerCommand($container));

Executing the command:

php bin/console debug:container

Controller

Generate a new controller for an application

<?php

use Candrianarijaona\Command\Controller\GenerateControllerCommand;

$baseDir  = __DIR__ . '/../app/Example';

$application->add(
    new GenerateControllerCommand($baseDir)
);

Executing the command:

php bin/console generate:controller

Router

Display routes for an application.

<?php

use Candrianarijaona\Command\Router\DebugRouterCommand;

$application->add(new DebugRouterCommand($container->router));

Executing the command:

php bin/console debug:router
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].