├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── LICENSE.md ├── README.md ├── app ├── .DS_Store ├── Commands │ ├── .DS_Store │ ├── .gitkeep │ ├── AddForgeToken.php │ ├── ListForgeTokens.php │ ├── RemoveForgeToken.php │ └── Ssh.php ├── Exceptions │ └── NoConfigFileFoundException.php ├── Fonts │ └── small.flf ├── Forge.php ├── Providers │ └── AppServiceProvider.php └── TokenHandler.php ├── bootstrap └── app.php ├── box.json ├── builds └── forge ├── composer.json ├── composer.lock ├── config ├── app.php ├── commands.php ├── filesystems.php └── logo.php ├── forge ├── logo.jpg ├── phpunit.xml.dist └── tests ├── CreatesApplication.php ├── Feature └── InspiringCommandTest.php ├── Pest.php ├── TestCase.php └── Unit └── ExampleTest.php /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.yml] 15 | indent_style = space 16 | indent_size = 2 17 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | CONSUMER_KEY= -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | .travis.yml export-ignore 3 | .styleci.yml export-ignore 4 | .scrutinizer.yml export-ignore 5 | BACKERS.md export-ignore 6 | CONTRIBUTING.md export-ignore 7 | CHANGELOG.md export-ignore 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /.idea 3 | /.vscode 4 | /.vagrant 5 | .env 6 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Thomas Nørgaard 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Logo](logo.jpg) 2 | 3 | [![Total Downloads](https://img.shields.io/packagist/dt/wackystudio/forge-ssh-assistant.svg?style=flat-square)](https://packagist.org/packages/wackystudio/forge-ssh-assistant) 4 | 5 | Forge SSH Assistant is a CLI tool built with [Laravel Zero](https://laravel-zero.com) for macOS and Linux that fetches your Laravel Forge 6 | servers and lists these in a menu so you can easily choose which server you want to connect to using SSH. 7 | 8 | With Forge SSH Assistant you don't have to open Laravel Forge to check the IP address of the server(s) you want to work with. 9 | 10 | You don't have to maintain aliases on every machine you use for development, all Forge SSH Assistant needs is a valid Laravel Forge token to be able to access your Laravel Forge account 11 | and fetch a list of your servers. 12 | 13 | ------ 14 | 15 | ## Installation 16 | 17 | You can install Forge SSH Assistant through Composer like this: 18 | 19 | ```bash 20 | composer global require wackystudio/forge-ssh-assistant 21 | ``` 22 | 23 | This will install Forge SSH Assistant globally on your machine. 24 | Make sure to add Composers global bin directory to your `$PATH` so the Forge SSH Assistant 25 | can be accessed anywhere. 26 | 27 | The Composer global bin directory is placed differently based on your operation system 28 | and some common locations are: 29 | * macOS: `$HOME/.composer/vendor/bin` 30 | * GNU / Linux Distributions: `$HOME/.config/composer/vendor/bin` 31 | 32 | After the installation you will be able to run Forge SSH Assistant through the `forge` command. 33 | 34 | ### Adding a token 35 | To be able to interact with one or more Laravel Forge account(s), Forge SSH Assistant needs a valid Laravel Forge token together with a name of the account the token belongs to. 36 | 37 | To create a token you'll need to head into your account settings on Laravel Forge and choose **API** in the menu. 38 | 39 | Here you should create a new token, you can name it whatever you want but we recommend that you name it 40 | `Forge SSH Assistant ` where you replace the `` with the actual name of your computer, 41 | such as `Office` or `MacBook Pro` 42 | 43 | An overlay will open with the actual token, which you should copy. Make sure that you copy everything. 44 | 45 | Go into your terminal and run the following command and replace the `` with the name of your token or the Forge account this belongs to and replace `` 46 | with the actual token you copied from Laravel Forge: 47 | ```bash 48 | forge token:add 49 | ``` 50 | 51 | To test that everything works, run the following command: 52 | ```bash 53 | forge ssh 54 | ``` 55 | You should now be able to see the servers you have provisioned through Laravel Forge and select these to SSH into them. 56 | 57 | ## License 58 | 59 | Forge SSH Assistant is an open-source software licensed 60 | under the [MIT license](https://raw.githubusercontent.com/WackyStudio/ForgeSSHAssistant/master/LICENSE.md). 61 | -------------------------------------------------------------------------------- /app/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WackyStudio/forge-ssh-assistant/267efbaacf85b2d91b07bc200e19f737dd11b2e0/app/.DS_Store -------------------------------------------------------------------------------- /app/Commands/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WackyStudio/forge-ssh-assistant/267efbaacf85b2d91b07bc200e19f737dd11b2e0/app/Commands/.DS_Store -------------------------------------------------------------------------------- /app/Commands/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WackyStudio/forge-ssh-assistant/267efbaacf85b2d91b07bc200e19f737dd11b2e0/app/Commands/.gitkeep -------------------------------------------------------------------------------- /app/Commands/AddForgeToken.php: -------------------------------------------------------------------------------- 1 | (For communication with your Laravel Forge account)'; 24 | 25 | /** 26 | * @var TokenHandler 27 | */ 28 | private $tokenHandler; 29 | 30 | public function __construct(TokenHandler $tokenHandler) 31 | { 32 | parent::__construct(); 33 | $this->tokenHandler = $tokenHandler; 34 | } 35 | 36 | /** 37 | * Execute the console command. 38 | * 39 | * @return mixed 40 | */ 41 | public function handle() 42 | { 43 | $token = $this->argument('token'); 44 | $name = $this->argument('name'); 45 | 46 | if (empty($token)) { 47 | $this->error('ERROR: No token given'); 48 | exit(1); 49 | } 50 | 51 | if (empty($name)) { 52 | $this->error('ERROR: No name given for the token'); 53 | exit(1); 54 | } 55 | 56 | $this->tokenHandler->addToken($name, $token); 57 | $this->info('The token has been added'); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/Commands/ListForgeTokens.php: -------------------------------------------------------------------------------- 1 | tokenHandler = $tokenHandler; 34 | } 35 | 36 | /** 37 | * Execute the console command. 38 | * 39 | * @return mixed 40 | */ 41 | public function handle() 42 | { 43 | $tokens = $this->tokenHandler->readToken(); 44 | 45 | if (empty($tokens)) { 46 | $this->info('There is no token saved to the config file at the moment'); 47 | exit(1); 48 | } 49 | 50 | $this->line(""); 51 | foreach ($tokens as $name => $token) { 52 | $this->info($name.' : '.$token); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/Commands/RemoveForgeToken.php: -------------------------------------------------------------------------------- 1 | (Communication with your Laravel Forge account will no longer be possible)'; 24 | 25 | /** 26 | * @var TokenHandler 27 | */ 28 | private $tokenHandler; 29 | 30 | public function __construct(TokenHandler $tokenHandler) 31 | { 32 | parent::__construct(); 33 | $this->tokenHandler = $tokenHandler; 34 | } 35 | 36 | /** 37 | * Execute the console command. 38 | * 39 | * @return mixed 40 | */ 41 | public function handle() 42 | { 43 | $name = $this->argument('name'); 44 | 45 | if (empty($name)) { 46 | $this->error('ERROR: No name given for the token to remove'); 47 | exit(1); 48 | } 49 | 50 | $this->tokenHandler->removeToken($name); 51 | $this->info('The token has been removed'); 52 | } 53 | 54 | /** 55 | * Define the command's schedule. 56 | * 57 | * @param \Illuminate\Console\Scheduling\Schedule $schedule 58 | * @return void 59 | */ 60 | public function schedule(Schedule $schedule): void 61 | { 62 | // $schedule->command(static::class)->everyMinute(); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /app/Commands/Ssh.php: -------------------------------------------------------------------------------- 1 | forge = $forge; 51 | $this->tokenHandler = $tokenHandler; 52 | } 53 | 54 | /** 55 | * Execute the console command. 56 | * 57 | * @return mixed 58 | */ 59 | public function handle() 60 | { 61 | $this->fetchServersOfTokens(); 62 | 63 | /** @var Menu $menu */ 64 | $menu = $this->menu('Forge SSH Assistant by Wacky Studio ') 65 | ->setTitleSeparator('_') 66 | ->setBackgroundColour('black') 67 | 68 | ->setForegroundColour('white'); 69 | //->setUnselectedMarker(' ') 70 | //->setSelectedMarker('➡ '); 71 | 72 | 73 | foreach ($this->servers as $name => $servers) { 74 | if ($name !== array_key_first($this->servers)) { 75 | $menu->addStaticItem(''); 76 | } 77 | 78 | $menu->addStaticItem(' ' . ucfirst($name) . ' servers:'); 79 | $menu->addLineBreak('_', 1); 80 | $menu->addStaticItem(''); 81 | 82 | $menu->addOptions($servers); 83 | $menu->addLineBreak('_', 1); 84 | } 85 | 86 | $ip = $menu->addStaticItem('') 87 | ->open(); 88 | 89 | 90 | if ($ip === null) { 91 | $this->info('Good bye!'); 92 | exit(0); 93 | } 94 | 95 | $this->runSSH($ip); 96 | $this->handle(); 97 | } 98 | 99 | public function getTokens() 100 | { 101 | $tokens = $this->tokenHandler->readToken(); 102 | if (empty($tokens)) { 103 | $this->error('No Laravel Forge token has been added!'); 104 | exit(1); 105 | } 106 | 107 | return $tokens; 108 | } 109 | 110 | public function fetchServersOfTokens() 111 | { 112 | 113 | foreach ($this->getTokens() as $tokenName => $token) { 114 | $this->forge->fetchServers($token); 115 | $servers = $this->forge->listServerNames(); 116 | 117 | foreach ($servers as $ip => $serverName) { 118 | $servers[$ip] = $serverName; 119 | } 120 | 121 | $this->servers[$tokenName] = $servers; 122 | } 123 | 124 | ksort($this->servers); 125 | } 126 | 127 | /** 128 | * @param $ip 129 | */ 130 | public function runSSH($ip): void 131 | { 132 | $connectTo = Arr::collapse($this->servers)[$ip]; 133 | $this->info("Setting up SSH connection to {$connectTo}"); 134 | $process = new Process(["ssh", "forge@{$ip}"]); 135 | $process->setTty(Process::isTtySupported()); 136 | $process->setTimeout(null); 137 | $process->setIdleTimeout(null); 138 | $process->run(); 139 | $this->info('SSH Connection closed - Bye!'); 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /app/Exceptions/NoConfigFileFoundException.php: -------------------------------------------------------------------------------- 1 | 12/96 to include new parameter 9 | supported by FIGlet and FIGWin. May also be slightly modified for better use 10 | of new full-width/kern/smush alternatives, but default output is NOT changed. 11 | 12 | $@ 13 | $@ 14 | $@ 15 | $@ 16 | $@@ 17 | _ @ 18 | | |@ 19 | |_|@ 20 | (_)@ 21 | @@ 22 | _ _ @ 23 | ( | )@ 24 | V V @ 25 | $ @ 26 | @@ 27 | _ _ @ 28 | _| | |_ @ 29 | |_ . _|@ 30 | |_ _|@ 31 | |_|_| @@ 32 | @ 33 | ||_@ 34 | (_-<@ 35 | / _/@ 36 | || @@ 37 | _ __ @ 38 | (_)/ / @ 39 | / /_ @ 40 | /_/(_)@ 41 | @@ 42 | __ @ 43 | / _|___ @ 44 | > _|_ _|@ 45 | \_____| @ 46 | @@ 47 | _ @ 48 | ( )@ 49 | |/ @ 50 | $ @ 51 | @@ 52 | __@ 53 | / /@ 54 | | | @ 55 | | | @ 56 | \_\@@ 57 | __ @ 58 | \ \ @ 59 | | |@ 60 | | |@ 61 | /_/ @@ 62 | @ 63 | _/\_@ 64 | > <@ 65 | \/ @ 66 | @@ 67 | _ @ 68 | _| |_ @ 69 | |_ _|@ 70 | |_| @ 71 | @@ 72 | @ 73 | @ 74 | _ @ 75 | ( )@ 76 | |/ @@ 77 | @ 78 | ___ @ 79 | |___|@ 80 | $ @ 81 | @@ 82 | @ 83 | @ 84 | _ @ 85 | (_)@ 86 | @@ 87 | __@ 88 | / /@ 89 | / / @ 90 | /_/ @ 91 | @@ 92 | __ @ 93 | / \ @ 94 | | () |@ 95 | \__/ @ 96 | @@ 97 | _ @ 98 | / |@ 99 | | |@ 100 | |_|@ 101 | @@ 102 | ___ @ 103 | |_ )@ 104 | / / @ 105 | /___|@ 106 | @@ 107 | ____@ 108 | |__ /@ 109 | |_ \@ 110 | |___/@ 111 | @@ 112 | _ _ @ 113 | | | | @ 114 | |_ _|@ 115 | |_| @ 116 | @@ 117 | ___ @ 118 | | __|@ 119 | |__ \@ 120 | |___/@ 121 | @@ 122 | __ @ 123 | / / @ 124 | / _ \@ 125 | \___/@ 126 | @@ 127 | ____ @ 128 | |__ |@ 129 | / / @ 130 | /_/ @ 131 | @@ 132 | ___ @ 133 | ( _ )@ 134 | / _ \@ 135 | \___/@ 136 | @@ 137 | ___ @ 138 | / _ \@ 139 | \_, /@ 140 | /_/ @ 141 | @@ 142 | _ @ 143 | (_)@ 144 | _ @ 145 | (_)@ 146 | @@ 147 | _ @ 148 | (_)@ 149 | _ @ 150 | ( )@ 151 | |/ @@ 152 | __@ 153 | / /@ 154 | < < @ 155 | \_\@ 156 | @@ 157 | @ 158 | ___ @ 159 | |___|@ 160 | |___|@ 161 | @@ 162 | __ @ 163 | \ \ @ 164 | > >@ 165 | /_/ @ 166 | @@ 167 | ___ @ 168 | |__ \@ 169 | /_/@ 170 | (_) @ 171 | @@ 172 | ____ @ 173 | / __ \ @ 174 | / / _` |@ 175 | \ \__,_|@ 176 | \____/ @@ 177 | _ @ 178 | /_\ @ 179 | / _ \ @ 180 | /_/ \_\@ 181 | @@ 182 | ___ @ 183 | | _ )@ 184 | | _ \@ 185 | |___/@ 186 | @@ 187 | ___ @ 188 | / __|@ 189 | | (__ @ 190 | \___|@ 191 | @@ 192 | ___ @ 193 | | \ @ 194 | | |) |@ 195 | |___/ @ 196 | @@ 197 | ___ @ 198 | | __|@ 199 | | _| @ 200 | |___|@ 201 | @@ 202 | ___ @ 203 | | __|@ 204 | | _| @ 205 | |_| @ 206 | @@ 207 | ___ @ 208 | / __|@ 209 | | (_ |@ 210 | \___|@ 211 | @@ 212 | _ _ @ 213 | | || |@ 214 | | __ |@ 215 | |_||_|@ 216 | @@ 217 | ___ @ 218 | |_ _|@ 219 | | | @ 220 | |___|@ 221 | @@ 222 | _ @ 223 | _ | |@ 224 | | || |@ 225 | \__/ @ 226 | @@ 227 | _ __@ 228 | | |/ /@ 229 | | ' < @ 230 | |_|\_\@ 231 | @@ 232 | _ @ 233 | | | @ 234 | | |__ @ 235 | |____|@ 236 | @@ 237 | __ __ @ 238 | | \/ |@ 239 | | |\/| |@ 240 | |_| |_|@ 241 | @@ 242 | _ _ @ 243 | | \| |@ 244 | | .` |@ 245 | |_|\_|@ 246 | @@ 247 | ___ @ 248 | / _ \ @ 249 | | (_) |@ 250 | \___/ @ 251 | @@ 252 | ___ @ 253 | | _ \@ 254 | | _/@ 255 | |_| @ 256 | @@ 257 | ___ @ 258 | / _ \ @ 259 | | (_) |@ 260 | \__\_\@ 261 | @@ 262 | ___ @ 263 | | _ \@ 264 | | /@ 265 | |_|_\@ 266 | @@ 267 | ___ @ 268 | / __|@ 269 | \__ \@ 270 | |___/@ 271 | @@ 272 | _____ @ 273 | |_ _|@ 274 | | | @ 275 | |_| @ 276 | @@ 277 | _ _ @ 278 | | | | |@ 279 | | |_| |@ 280 | \___/ @ 281 | @@ 282 | __ __@ 283 | \ \ / /@ 284 | \ V / @ 285 | \_/ @ 286 | @@ 287 | __ __@ 288 | \ \ / /@ 289 | \ \/\/ / @ 290 | \_/\_/ @ 291 | @@ 292 | __ __@ 293 | \ \/ /@ 294 | > < @ 295 | /_/\_\@ 296 | @@ 297 | __ __@ 298 | \ \ / /@ 299 | \ V / @ 300 | |_| @ 301 | @@ 302 | ____@ 303 | |_ /@ 304 | / / @ 305 | /___|@ 306 | @@ 307 | __ @ 308 | | _|@ 309 | | | @ 310 | | | @ 311 | |__|@@ 312 | __ @ 313 | \ \ @ 314 | \ \ @ 315 | \_\@ 316 | @@ 317 | __ @ 318 | |_ |@ 319 | | |@ 320 | | |@ 321 | |__|@@ 322 | /\ @ 323 | |/\|@ 324 | $ @ 325 | $ @ 326 | @@ 327 | @ 328 | @ 329 | @ 330 | ___ @ 331 | |___|@@ 332 | _ @ 333 | ( )@ 334 | \|@ 335 | $ @ 336 | @@ 337 | @ 338 | __ _ @ 339 | / _` |@ 340 | \__,_|@ 341 | @@ 342 | _ @ 343 | | |__ @ 344 | | '_ \@ 345 | |_.__/@ 346 | @@ 347 | @ 348 | __ @ 349 | / _|@ 350 | \__|@ 351 | @@ 352 | _ @ 353 | __| |@ 354 | / _` |@ 355 | \__,_|@ 356 | @@ 357 | @ 358 | ___ @ 359 | / -_)@ 360 | \___|@ 361 | @@ 362 | __ @ 363 | / _|@ 364 | | _|@ 365 | |_| @ 366 | @@ 367 | @ 368 | __ _ @ 369 | / _` |@ 370 | \__, |@ 371 | |___/ @@ 372 | _ @ 373 | | |_ @ 374 | | ' \ @ 375 | |_||_|@ 376 | @@ 377 | _ @ 378 | (_)@ 379 | | |@ 380 | |_|@ 381 | @@ 382 | _ @ 383 | (_)@ 384 | | |@ 385 | _/ |@ 386 | |__/ @@ 387 | _ @ 388 | | |__@ 389 | | / /@ 390 | |_\_\@ 391 | @@ 392 | _ @ 393 | | |@ 394 | | |@ 395 | |_|@ 396 | @@ 397 | @ 398 | _ __ @ 399 | | ' \ @ 400 | |_|_|_|@ 401 | @@ 402 | @ 403 | _ _ @ 404 | | ' \ @ 405 | |_||_|@ 406 | @@ 407 | @ 408 | ___ @ 409 | / _ \@ 410 | \___/@ 411 | @@ 412 | @ 413 | _ __ @ 414 | | '_ \@ 415 | | .__/@ 416 | |_| @@ 417 | @ 418 | __ _ @ 419 | / _` |@ 420 | \__, |@ 421 | |_|@@ 422 | @ 423 | _ _ @ 424 | | '_|@ 425 | |_| @ 426 | @@ 427 | @ 428 | ___@ 429 | (_-<@ 430 | /__/@ 431 | @@ 432 | _ @ 433 | | |_ @ 434 | | _|@ 435 | \__|@ 436 | @@ 437 | @ 438 | _ _ @ 439 | | || |@ 440 | \_,_|@ 441 | @@ 442 | @ 443 | __ __@ 444 | \ V /@ 445 | \_/ @ 446 | @@ 447 | @ 448 | __ __ __@ 449 | \ V V /@ 450 | \_/\_/ @ 451 | @@ 452 | @ 453 | __ __@ 454 | \ \ /@ 455 | /_\_\@ 456 | @@ 457 | @ 458 | _ _ @ 459 | | || |@ 460 | \_, |@ 461 | |__/ @@ 462 | @ 463 | ___@ 464 | |_ /@ 465 | /__|@ 466 | @@ 467 | __@ 468 | / /@ 469 | _| | @ 470 | | | @ 471 | \_\@@ 472 | _ @ 473 | | |@ 474 | | |@ 475 | | |@ 476 | |_|@@ 477 | __ @ 478 | \ \ @ 479 | | |_@ 480 | | | @ 481 | /_/ @@ 482 | /\/|@ 483 | |/\/ @ 484 | $ @ 485 | $ @ 486 | @@ 487 | _ _ @ 488 | (_)(_)@ 489 | /--\ @ 490 | /_/\_\@ 491 | @@ 492 | _ _ @ 493 | (_)(_)@ 494 | / __ \@ 495 | \____/@ 496 | @@ 497 | _ _ @ 498 | (_) (_)@ 499 | | |_| |@ 500 | \___/ @ 501 | @@ 502 | _ _ @ 503 | (_)(_)@ 504 | / _` |@ 505 | \__,_|@ 506 | @@ 507 | _ _ @ 508 | (_)_(_)@ 509 | / _ \ @ 510 | \___/ @ 511 | @@ 512 | _ _ @ 513 | (_)(_)@ 514 | | || |@ 515 | \_,_|@ 516 | @@ 517 | ___ @ 518 | / _ \@ 519 | | |< <@ 520 | | ||_/@ 521 | |_| @@ 522 | 160 NO-BREAK SPACE 523 | $@ 524 | $@ 525 | $@ 526 | $@ 527 | $@@ 528 | 161 INVERTED EXCLAMATION MARK 529 | _ @ 530 | (_)@ 531 | | |@ 532 | |_|@ 533 | @@ 534 | 162 CENT SIGN 535 | @ 536 | || @ 537 | / _)@ 538 | \ _)@ 539 | || @@ 540 | 163 POUND SIGN 541 | __ @ 542 | _/ _\ @ 543 | |_ _|_ @ 544 | (_,___|@ 545 | @@ 546 | 164 CURRENCY SIGN 547 | /\_/\@ 548 | \ . /@ 549 | / _ \@ 550 | \/ \/@ 551 | @@ 552 | 165 YEN SIGN 553 | __ __ @ 554 | \ V / @ 555 | |__ __|@ 556 | |__ __|@ 557 | |_| @@ 558 | 166 BROKEN BAR 559 | _ @ 560 | | |@ 561 | |_|@ 562 | | |@ 563 | |_|@@ 564 | 167 SECTION SIGN 565 | __ @ 566 | / _)@ 567 | /\ \ @ 568 | \ \/ @ 569 | (__/ @@ 570 | 168 DIAERESIS 571 | _ _ @ 572 | (_)(_)@ 573 | $ $ @ 574 | $ $ @ 575 | @@ 576 | 169 COPYRIGHT SIGN 577 | ____ @ 578 | / __ \ @ 579 | / / _| \@ 580 | \ \__| /@ 581 | \____/ @@ 582 | 170 FEMININE ORDINAL INDICATOR 583 | __ _ @ 584 | / _` |@ 585 | \__,_|@ 586 | |____|@ 587 | @@ 588 | 171 LEFT-POINTING DOUBLE ANGLE QUOTATION MARK 589 | ____@ 590 | / / /@ 591 | < < < @ 592 | \_\_\@ 593 | @@ 594 | 172 NOT SIGN 595 | ____ @ 596 | |__ |@ 597 | |_|@ 598 | $ @ 599 | @@ 600 | 173 SOFT HYPHEN 601 | @ 602 | __ @ 603 | |__|@ 604 | $ @ 605 | @@ 606 | 174 REGISTERED SIGN 607 | ____ @ 608 | / __ \ @ 609 | / | -) \@ 610 | \ ||\\ /@ 611 | \____/ @@ 612 | 175 MACRON 613 | ___ @ 614 | |___|@ 615 | $ @ 616 | $ @ 617 | @@ 618 | 176 DEGREE SIGN 619 | _ @ 620 | /.\@ 621 | \_/@ 622 | $ @ 623 | @@ 624 | 177 PLUS-MINUS SIGN 625 | _ @ 626 | _| |_ @ 627 | |_ _|@ 628 | _|_|_ @ 629 | |_____|@@ 630 | 178 SUPERSCRIPT TWO 631 | __ @ 632 | |_ )@ 633 | /__|@ 634 | $ @ 635 | @@ 636 | 179 SUPERSCRIPT THREE 637 | ___@ 638 | |_ /@ 639 | |__)@ 640 | $ @ 641 | @@ 642 | 180 ACUTE ACCENT 643 | __@ 644 | /_/@ 645 | $ @ 646 | $ @ 647 | @@ 648 | 181 MICRO SIGN 649 | @ 650 | _ _ @ 651 | | || |@ 652 | | .,_|@ 653 | |_| @@ 654 | 182 PILCROW SIGN 655 | ____ @ 656 | / |@ 657 | \_ | |@ 658 | |_|_|@ 659 | @@ 660 | 183 MIDDLE DOT 661 | @ 662 | _ @ 663 | (_)@ 664 | $ @ 665 | @@ 666 | 184 CEDILLA 667 | @ 668 | @ 669 | @ 670 | _ @ 671 | )_)@@ 672 | 185 SUPERSCRIPT ONE 673 | _ @ 674 | / |@ 675 | |_|@ 676 | $ @ 677 | @@ 678 | 186 MASCULINE ORDINAL INDICATOR 679 | ___ @ 680 | / _ \@ 681 | \___/@ 682 | |___|@ 683 | @@ 684 | 187 RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK 685 | ____ @ 686 | \ \ \ @ 687 | > > >@ 688 | /_/_/ @ 689 | @@ 690 | 188 VULGAR FRACTION ONE QUARTER 691 | _ __ @ 692 | / |/ /__ @ 693 | |_/ /_' |@ 694 | /_/ |_|@ 695 | @@ 696 | 189 VULGAR FRACTION ONE HALF 697 | _ __ @ 698 | / |/ /_ @ 699 | |_/ /_ )@ 700 | /_//__|@ 701 | @@ 702 | 190 VULGAR FRACTION THREE QUARTERS 703 | ___ __ @ 704 | |_ // /__ @ 705 | |__) /_' |@ 706 | /_/ |_|@ 707 | @@ 708 | 191 INVERTED QUESTION MARK 709 | _ @ 710 | (_) @ 711 | / /_ @ 712 | \___|@ 713 | @@ 714 | 192 LATIN CAPITAL LETTER A WITH GRAVE 715 | __ @ 716 | \_\ @ 717 | /--\ @ 718 | /_/\_\@ 719 | @@ 720 | 193 LATIN CAPITAL LETTER A WITH ACUTE 721 | __ @ 722 | /_/ @ 723 | /--\ @ 724 | /_/\_\@ 725 | @@ 726 | 194 LATIN CAPITAL LETTER A WITH CIRCUMFLEX 727 | /\ @ 728 | |/\| @ 729 | /--\ @ 730 | /_/\_\@ 731 | @@ 732 | 195 LATIN CAPITAL LETTER A WITH TILDE 733 | /\/|@ 734 | |/\/ @ 735 | /--\ @ 736 | /_/\_\@ 737 | @@ 738 | 196 LATIN CAPITAL LETTER A WITH DIAERESIS 739 | _ _ @ 740 | (_)(_)@ 741 | /--\ @ 742 | /_/\_\@ 743 | @@ 744 | 197 LATIN CAPITAL LETTER A WITH RING ABOVE 745 | __ @ 746 | (()) @ 747 | /--\ @ 748 | /_/\_\@ 749 | @@ 750 | 198 LATIN CAPITAL LETTER AE 751 | ____ @ 752 | /, __|@ 753 | / _ _| @ 754 | /_/|___|@ 755 | @@ 756 | 199 LATIN CAPITAL LETTER C WITH CEDILLA 757 | ___ @ 758 | / __|@ 759 | | (__ @ 760 | \___|@ 761 | )_) @@ 762 | 200 LATIN CAPITAL LETTER E WITH GRAVE 763 | __ @ 764 | \_\@ 765 | | -<@ 766 | |__<@ 767 | @@ 768 | 201 LATIN CAPITAL LETTER E WITH ACUTE 769 | __@ 770 | /_/@ 771 | | -<@ 772 | |__<@ 773 | @@ 774 | 202 LATIN CAPITAL LETTER E WITH CIRCUMFLEX 775 | /\ @ 776 | |/\|@ 777 | | -<@ 778 | |__<@ 779 | @@ 780 | 203 LATIN CAPITAL LETTER E WITH DIAERESIS 781 | _ _ @ 782 | (_)(_)@ 783 | | -< @ 784 | |__< @ 785 | @@ 786 | 204 LATIN CAPITAL LETTER I WITH GRAVE 787 | __ @ 788 | \_\ @ 789 | |_ _|@ 790 | |___|@ 791 | @@ 792 | 205 LATIN CAPITAL LETTER I WITH ACUTE 793 | __ @ 794 | /_/ @ 795 | |_ _|@ 796 | |___|@ 797 | @@ 798 | 206 LATIN CAPITAL LETTER I WITH CIRCUMFLEX 799 | //\ @ 800 | |/_\|@ 801 | |_ _|@ 802 | |___|@ 803 | @@ 804 | 207 LATIN CAPITAL LETTER I WITH DIAERESIS 805 | _ _ @ 806 | (_)_(_)@ 807 | |_ _| @ 808 | |___| @ 809 | @@ 810 | 208 LATIN CAPITAL LETTER ETH 811 | ____ @ 812 | | __ \ @ 813 | |_ _|) |@ 814 | |____/ @ 815 | @@ 816 | 209 LATIN CAPITAL LETTER N WITH TILDE 817 | /\/|@ 818 | |/\/ @ 819 | | \| |@ 820 | |_|\_|@ 821 | @@ 822 | 210 LATIN CAPITAL LETTER O WITH GRAVE 823 | __ @ 824 | \_\_ @ 825 | / __ \@ 826 | \____/@ 827 | @@ 828 | 211 LATIN CAPITAL LETTER O WITH ACUTE 829 | __ @ 830 | _/_/ @ 831 | / __ \@ 832 | \____/@ 833 | @@ 834 | 212 LATIN CAPITAL LETTER O WITH CIRCUMFLEX 835 | /\ @ 836 | |/\| @ 837 | / __ \@ 838 | \____/@ 839 | @@ 840 | 213 LATIN CAPITAL LETTER O WITH TILDE 841 | /\/|@ 842 | |/\/ @ 843 | / __ \@ 844 | \____/@ 845 | @@ 846 | 214 LATIN CAPITAL LETTER O WITH DIAERESIS 847 | _ _ @ 848 | (_)(_)@ 849 | / __ \@ 850 | \____/@ 851 | @@ 852 | 215 MULTIPLICATION SIGN 853 | @ 854 | /\/\@ 855 | > <@ 856 | \/\/@ 857 | @@ 858 | 216 LATIN CAPITAL LETTER O WITH STROKE 859 | ____ @ 860 | / _//\ @ 861 | | (//) |@ 862 | \//__/ @ 863 | @@ 864 | 217 LATIN CAPITAL LETTER U WITH GRAVE 865 | __ @ 866 | _\_\_ @ 867 | | |_| |@ 868 | \___/ @ 869 | @@ 870 | 218 LATIN CAPITAL LETTER U WITH ACUTE 871 | __ @ 872 | _/_/_ @ 873 | | |_| |@ 874 | \___/ @ 875 | @@ 876 | 219 LATIN CAPITAL LETTER U WITH CIRCUMFLEX 877 | //\ @ 878 | |/ \| @ 879 | | |_| |@ 880 | \___/ @ 881 | @@ 882 | 220 LATIN CAPITAL LETTER U WITH DIAERESIS 883 | _ _ @ 884 | (_) (_)@ 885 | | |_| |@ 886 | \___/ @ 887 | @@ 888 | 221 LATIN CAPITAL LETTER Y WITH ACUTE 889 | __ @ 890 | _/_/_@ 891 | \ V /@ 892 | |_| @ 893 | @@ 894 | 222 LATIN CAPITAL LETTER THORN 895 | _ @ 896 | | |_ @ 897 | | -_)@ 898 | |_| @ 899 | @@ 900 | 223 LATIN SMALL LETTER SHARP S 901 | ___ @ 902 | / _ \@ 903 | | |< <@ 904 | | ||_/@ 905 | |_| @@ 906 | 224 LATIN SMALL LETTER A WITH GRAVE 907 | __ @ 908 | \_\_ @ 909 | / _` |@ 910 | \__,_|@ 911 | @@ 912 | 225 LATIN SMALL LETTER A WITH ACUTE 913 | __ @ 914 | _/_/ @ 915 | / _` |@ 916 | \__,_|@ 917 | @@ 918 | 226 LATIN SMALL LETTER A WITH CIRCUMFLEX 919 | /\ @ 920 | |/\| @ 921 | / _` |@ 922 | \__,_|@ 923 | @@ 924 | 227 LATIN SMALL LETTER A WITH TILDE 925 | /\/|@ 926 | |/\/ @ 927 | / _` |@ 928 | \__,_|@ 929 | @@ 930 | 228 LATIN SMALL LETTER A WITH DIAERESIS 931 | _ _ @ 932 | (_)(_)@ 933 | / _` |@ 934 | \__,_|@ 935 | @@ 936 | 229 LATIN SMALL LETTER A WITH RING ABOVE 937 | __ @ 938 | (()) @ 939 | / _` |@ 940 | \__,_|@ 941 | @@ 942 | 230 LATIN SMALL LETTER AE 943 | @ 944 | __ ___ @ 945 | / _` -_)@ 946 | \__,___|@ 947 | @@ 948 | 231 LATIN SMALL LETTER C WITH CEDILLA 949 | @ 950 | __ @ 951 | / _|@ 952 | \__|@ 953 | )_)@@ 954 | 232 LATIN SMALL LETTER E WITH GRAVE 955 | __ @ 956 | \_\ @ 957 | / -_)@ 958 | \___|@ 959 | @@ 960 | 233 LATIN SMALL LETTER E WITH ACUTE 961 | __ @ 962 | /_/ @ 963 | / -_)@ 964 | \___|@ 965 | @@ 966 | 234 LATIN SMALL LETTER E WITH CIRCUMFLEX 967 | //\ @ 968 | |/_\|@ 969 | / -_)@ 970 | \___|@ 971 | @@ 972 | 235 LATIN SMALL LETTER E WITH DIAERESIS 973 | _ _ @ 974 | (_)_(_)@ 975 | / -_) @ 976 | \___| @ 977 | @@ 978 | 236 LATIN SMALL LETTER I WITH GRAVE 979 | __ @ 980 | \_\@ 981 | | |@ 982 | |_|@ 983 | @@ 984 | 237 LATIN SMALL LETTER I WITH ACUTE 985 | __@ 986 | /_/@ 987 | | |@ 988 | |_|@ 989 | @@ 990 | 238 LATIN SMALL LETTER I WITH CIRCUMFLEX 991 | //\ @ 992 | |/_\|@ 993 | | | @ 994 | |_| @ 995 | @@ 996 | 239 LATIN SMALL LETTER I WITH DIAERESIS 997 | _ _ @ 998 | (_)_(_)@ 999 | | | @ 1000 | |_| @ 1001 | @@ 1002 | 240 LATIN SMALL LETTER ETH 1003 | \\/\ @ 1004 | \/\\ @ 1005 | / _` |@ 1006 | \___/ @ 1007 | @@ 1008 | 241 LATIN SMALL LETTER N WITH TILDE 1009 | /\/| @ 1010 | |/\/ @ 1011 | | ' \ @ 1012 | |_||_|@ 1013 | @@ 1014 | 242 LATIN SMALL LETTER O WITH GRAVE 1015 | __ @ 1016 | \_\ @ 1017 | / _ \@ 1018 | \___/@ 1019 | @@ 1020 | 243 LATIN SMALL LETTER O WITH ACUTE 1021 | __ @ 1022 | /_/ @ 1023 | / _ \@ 1024 | \___/@ 1025 | @@ 1026 | 244 LATIN SMALL LETTER O WITH CIRCUMFLEX 1027 | //\ @ 1028 | |/_\|@ 1029 | / _ \@ 1030 | \___/@ 1031 | @@ 1032 | 245 LATIN SMALL LETTER O WITH TILDE 1033 | /\/|@ 1034 | |/\/ @ 1035 | / _ \@ 1036 | \___/@ 1037 | @@ 1038 | 246 LATIN SMALL LETTER O WITH DIAERESIS 1039 | _ _ @ 1040 | (_)_(_)@ 1041 | / _ \ @ 1042 | \___/ @ 1043 | @@ 1044 | 247 DIVISION SIGN 1045 | _ @ 1046 | (_) @ 1047 | |___|@ 1048 | (_) @ 1049 | @@ 1050 | 248 LATIN SMALL LETTER O WITH STROKE 1051 | @ 1052 | ___ @ 1053 | / //\@ 1054 | \//_/@ 1055 | @@ 1056 | 249 LATIN SMALL LETTER U WITH GRAVE 1057 | __ @ 1058 | \_\_ @ 1059 | | || |@ 1060 | \_,_|@ 1061 | @@ 1062 | 250 LATIN SMALL LETTER U WITH ACUTE 1063 | __ @ 1064 | _/_/ @ 1065 | | || |@ 1066 | \_,_|@ 1067 | @@ 1068 | 251 LATIN SMALL LETTER U WITH CIRCUMFLEX 1069 | /\ @ 1070 | |/\| @ 1071 | | || |@ 1072 | \_,_|@ 1073 | @@ 1074 | 252 LATIN SMALL LETTER U WITH DIAERESIS 1075 | _ _ @ 1076 | (_)(_)@ 1077 | | || |@ 1078 | \_,_|@ 1079 | @@ 1080 | 253 LATIN SMALL LETTER Y WITH ACUTE 1081 | __ @ 1082 | _/_/ @ 1083 | | || |@ 1084 | \_, |@ 1085 | |__/ @@ 1086 | 254 LATIN SMALL LETTER THORN 1087 | _ @ 1088 | | |__ @ 1089 | | '_ \@ 1090 | | .__/@ 1091 | |_| @@ 1092 | 255 LATIN SMALL LETTER Y WITH DIAERESIS 1093 | _ _ @ 1094 | (_)(_)@ 1095 | | || |@ 1096 | \_, |@ 1097 | |__/ @@ 1098 | -------------------------------------------------------------------------------- /app/Forge.php: -------------------------------------------------------------------------------- 1 | servers = $forge->servers(); 26 | } 27 | 28 | /** 29 | * @return array 30 | */ 31 | public function listServerNames() 32 | { 33 | return collect($this->servers)->mapWithKeys(function (Server $server) { 34 | $ready = $server->isReady ? 'Yes':'No'; 35 | return [$server->ipAddress => "{$server->name}"]; 36 | })->toArray(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | filesystem = $filesystem; 21 | } 22 | 23 | public function addToken($name, $token) 24 | { 25 | $this->prepareConfigFile(); 26 | 27 | $tokens = $this->readToken(); 28 | 29 | if ($tokens === null) { 30 | $tokens = [$name => $token]; 31 | } else { 32 | $tokens[$name] = $token; 33 | } 34 | 35 | Storage::put('.config/fssh/config.json', json_encode($tokens)); 36 | } 37 | 38 | public function removeToken($name) 39 | { 40 | $this->prepareConfigFile(); 41 | $tokens = $this->readToken(); 42 | 43 | unset($tokens[$name]); 44 | 45 | Storage::put('.config/fssh/config.json', json_encode($tokens)); 46 | } 47 | 48 | public function readToken() 49 | { 50 | if (!Storage::has('.config/fssh/config.json')) { 51 | throw new NoConfigFileFoundException('No config file found, this will be created when you add a token.'); 52 | } 53 | 54 | $config = json_decode(Storage::get('.config/fssh/config.json'), true); 55 | return $config; 56 | } 57 | 58 | private function prepareConfigFile() 59 | { 60 | if (!Storage::has('.config')) { 61 | Storage::makeDirectory('.config'); 62 | } 63 | 64 | if (!Storage::has('.config/fssh')) { 65 | Storage::makeDirectory('.config/fssh'); 66 | } 67 | if (!Storage::has('.config/fssh/config.json')) { 68 | Storage::put('.config/fssh/config.json', json_encode([ 69 | ])); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Console\Kernel::class, 31 | LaravelZero\Framework\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Debug\ExceptionHandler::class, 36 | Illuminate\Foundation\Exceptions\Handler::class 37 | ); 38 | 39 | /* 40 | |-------------------------------------------------------------------------- 41 | | Return The Application 42 | |-------------------------------------------------------------------------- 43 | | 44 | | This script returns the application instance. The instance is given to 45 | | the calling script so we can separate the building of the instances 46 | | from the actual running of the application and sending responses. 47 | | 48 | */ 49 | 50 | return $app; 51 | -------------------------------------------------------------------------------- /box.json: -------------------------------------------------------------------------------- 1 | { 2 | "chmod": "0755", 3 | "directories": [ 4 | "app", 5 | "bootstrap", 6 | "config", 7 | "vendor" 8 | ], 9 | "files": [ 10 | "composer.json" 11 | ], 12 | "exclude-composer-files": false, 13 | "compression": "GZ", 14 | "compactors": [ 15 | "KevinGH\\Box\\Compactor\\Php", 16 | "KevinGH\\Box\\Compactor\\Json" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /builds/forge: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WackyStudio/forge-ssh-assistant/267efbaacf85b2d91b07bc200e19f737dd11b2e0/builds/forge -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wackystudio/forge-ssh-assistant", 3 | "description": "Forge SSH Assistant", 4 | "keywords": ["laravel", "forge", "ssh", "cli"], 5 | "homepage": "https://laravel-zero.com", 6 | "type": "project", 7 | "license": "MIT", 8 | "support": { 9 | "issues": "https://github.com/WackyStudio/forge-ssh-assistant/issues", 10 | "source": "https://github.com/WackyStudio/forge-ssh-assistant" 11 | }, 12 | "authors": [ 13 | { 14 | "name": "Thomas Nørgaard", 15 | "email": "tgn@wackystudio.com" 16 | } 17 | ], 18 | "require": { 19 | "php": "^7.3|^8.0", 20 | "laravel-zero/framework": "^8.8", 21 | "nunomaduro/laravel-console-menu": "^3.2.0", 22 | "symfony/process": "^5.1", 23 | "laravel/forge-sdk": "^3.6.0" 24 | }, 25 | "require-dev": { 26 | "mockery/mockery": "^1.4.3", 27 | "pestphp/pest": "^1.3" 28 | }, 29 | "autoload": { 30 | "psr-4": { 31 | "App\\": "app/" 32 | } 33 | }, 34 | "autoload-dev": { 35 | "psr-4": { 36 | "Tests\\": "tests/" 37 | } 38 | }, 39 | "config": { 40 | "preferred-install": "dist", 41 | "sort-packages": true, 42 | "optimize-autoloader": true 43 | }, 44 | "minimum-stability": "dev", 45 | "prefer-stable": true, 46 | "bin": ["./builds/forge"] 47 | } 48 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | 'Forge SSH Assistant', 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Application Version 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This value determines the "version" your application is currently running 24 | | in. You may want to follow the "Semantic Versioning" - Given a version 25 | | number MAJOR.MINOR.PATCH when an update happens: https://semver.org. 26 | | 27 | */ 28 | 29 | 'version' => app('git.version'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Application Environment 34 | |-------------------------------------------------------------------------- 35 | | 36 | | This value determines the "environment" your application is currently 37 | | running in. This may determine how you prefer to configure various 38 | | services the application utilizes. This can be overridden using 39 | | the global command line "--env" option when calling commands. 40 | | 41 | */ 42 | 43 | 'env' => 'development', 44 | 45 | /* 46 | |-------------------------------------------------------------------------- 47 | | Autoloaded Service Providers 48 | |-------------------------------------------------------------------------- 49 | | 50 | | The service providers listed here will be automatically loaded on the 51 | | request to your application. Feel free to add your own services to 52 | | this array to grant expanded functionality to your applications. 53 | | 54 | */ 55 | 56 | 'providers' => [ 57 | App\Providers\AppServiceProvider::class, 58 | ], 59 | 60 | ]; 61 | -------------------------------------------------------------------------------- /config/commands.php: -------------------------------------------------------------------------------- 1 | NunoMaduro\LaravelConsoleSummary\SummaryCommand::class, 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Commands Paths 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This value determines the "paths" that should be loaded by the console's 24 | | kernel. Foreach "path" present on the array provided below the kernel 25 | | will extract all "Illuminate\Console\Command" based class commands. 26 | | 27 | */ 28 | 29 | 'paths' => [app_path('Commands')], 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Added Commands 34 | |-------------------------------------------------------------------------- 35 | | 36 | | You may want to include a single command class without having to load an 37 | | entire folder. Here you can specify which commands should be added to 38 | | your list of commands. The console's kernel will try to load them. 39 | | 40 | */ 41 | 42 | 'add' => [ 43 | // .. 44 | ], 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Hidden Commands 49 | |-------------------------------------------------------------------------- 50 | | 51 | | Your application commands will always be visible on the application list 52 | | of commands. But you can still make them "hidden" specifying an array 53 | | of commands below. All "hidden" commands can still be run/executed. 54 | | 55 | */ 56 | 57 | 'hidden' => [ 58 | NunoMaduro\LaravelConsoleSummary\SummaryCommand::class, 59 | Symfony\Component\Console\Command\HelpCommand::class, 60 | Illuminate\Console\Scheduling\ScheduleRunCommand::class, 61 | Illuminate\Console\Scheduling\ScheduleFinishCommand::class, 62 | Illuminate\Foundation\Console\VendorPublishCommand::class, 63 | ], 64 | 65 | /* 66 | |-------------------------------------------------------------------------- 67 | | Removed Commands 68 | |-------------------------------------------------------------------------- 69 | | 70 | | Do you have a service provider that loads a list of commands that 71 | | you don't need? No problem. Laravel Zero allows you to specify 72 | | below a list of commands that you don't to see in your app. 73 | | 74 | */ 75 | 76 | 'remove' => [ 77 | // .. 78 | ], 79 | 80 | ]; 81 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | 'local', 4 | 'disks' => [ 5 | 'local' => [ 6 | 'driver' => 'local', 7 | 'root' => getenv('HOME'), 8 | ], 9 | ], 10 | ]; -------------------------------------------------------------------------------- /config/logo.php: -------------------------------------------------------------------------------- 1 | true, 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Font 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This option defines the font which should be used for rendering. 24 | | By default, one default font is shipped. However, you are free 25 | | to download and use additional fonts: http://www.figlet.org. 26 | | 27 | */ 28 | 29 | 'font' => __DIR__.'/../app/Fonts/small.flf', 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Output Width 34 | |-------------------------------------------------------------------------- 35 | | 36 | | This option defines the maximum width of the output string. This is 37 | | used for word-wrap as well as justification. Be careful when using 38 | | small values, because they may result in an undefined behavior. 39 | | 40 | */ 41 | 42 | 'outputWidth' => 80, 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Justification 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This option defines the justification of the logo text. By default, 50 | | justification is provided, which will work well on most of your 51 | | console apps. Of course, you are free to change this value. 52 | | 53 | */ 54 | 55 | 'justification' => null, 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Right To Left 60 | |-------------------------------------------------------------------------- 61 | | 62 | | This option defines the option in which the text is written. By, default 63 | | the setting of the font-file is used. When justification is not defined, 64 | | a text written from right-to-left is automatically right-aligned. 65 | | 66 | | Possible values: "right-to-left", "left-to-right", null 67 | | 68 | */ 69 | 70 | 'rightToLeft' => null, 71 | 72 | ]; 73 | -------------------------------------------------------------------------------- /forge: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WackyStudio/forge-ssh-assistant/267efbaacf85b2d91b07bc200e19f737dd11b2e0/logo.jpg -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Feature 14 | 15 | 16 | ./tests/Unit 17 | 18 | 19 | 20 | 21 | ./app 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/InspiringCommandTest.php: -------------------------------------------------------------------------------- 1 | artisan('inspiring') 5 | ->expectsOutput('Simplicity is the ultimate sophistication.') 6 | ->assertExitCode(0); 7 | }); 8 | -------------------------------------------------------------------------------- /tests/Pest.php: -------------------------------------------------------------------------------- 1 | in('Feature'); 4 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | toBeTrue(); 5 | }); 6 | --------------------------------------------------------------------------------