albinvar/termux-webzone

The Termux Webzone CLI App.

v4.1.3 2022-02-19 06:15 UTC

README

68747470733a2f2f692e6962622e636f2f504d7278386a4a2f64353635316332622d306566622d343566652d383162372d6134643464393761663733322e706e67

68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c62696e7661722f7465726d75782d7765627a6f6e653f6c6162656c3d76657273696f6e 68747470733a2f2f706f7365722e707567782e6f72672f616c62696e7661722f7465726d75782d7765627a6f6e652f646f776e6c6f616473 badge.svg 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f616c62696e7661722f7465726d75782d7765627a6f6e65 68747470733a2f2f696d672e736869656c64732e696f2f61706d2f6c2f476974687562

 _    _      _       ______                 
| |  | |    | |     |___  /                 
| |  | | ___| |__      / /  ___  _ __   ___ 
| |/\| |/ _ \ '_ \    / /  / _ \| '_ \ / _ \
\  /\  /  __/ |_) | ./ /__| (_) | | | |  __/
 \/  \/ \___|_.__/  \_____/\___/|_| |_|\___|
                                            
                                            

Table of Contents

Introduction

Termux Webzone is a CLI application which provides a ton of features for web developers to build, run and test their php applications within the limits of android. The application is designed only to work with Termux.

Requirements

  • php 7.3+
  • curl
  • termux

Installation

Basics

Basically, we need to update and upgrade our packages first. After that we will install php and setup permission to use storage.

pkg update -y
pkg upgrade -y
pkg install php wget -y
termux-setup-storage

Using wget

Run the command and the script will take care of the rest.

wget https://raw.githubusercontent.com/albinvar/webzone-api/main/installer/installer.php -O - | php

Using curl

Run the command and the script will take care of the rest.

curl -s https://raw.githubusercontent.com/albinvar/webzone-api/main/installer/installer.php | php

Using composer

Remember, installing with composer requires each and every libraries should be downloaded first.

composer global require albinvar/termux-webzone 

Manual installation

  • Download the script from here.
  • Execute the file using php.
php installer.php
  • You can also install via composer by adding the flag -c or --composer.
php installer.php --composer

Updation

You can update webzone simply using the inbuilt command.

webzone self-update

Or if you have installed via composer, use

composer global update albinvar/termux-webzone

Additionaly, old users needs to regenerate settings using the command webzone settings:init -f for any major updates.

Features

  • Install PhpMyAdmin
  • Create Wordpress site
  • Create Development server
  • Configure composer globally
  • Create almost 4+ php framework projects.
  • Create onion sites (tor)
  • Portforwading through Ngrok
  • Portforwading through Localhost.run
  • Settings option to configure everything.
  • More features coming soon...

Screenshots

Installer Webzone CLI
desktop desktop

Commands

The following commands are available in our tool. You can use the individual crafting routines which are similar to the Artisan commands.

basics Commands
  • about
  • manager
  • settings
  • self-update
Installable packages
  • install:mysql
  • install:pma
Create Commands
  • create:codelighniter
  • create:laravel
  • create:nette
  • create:symfony
  • create:sapper
  • create:zend
Installer Commands
  • installer:laravel
  • installer:symfony
  • installer:fixer
  • installer:phpstan
  • installer:wordpress
Server Commands
  • server:all
  • server:dev
  • server:pma
  • server:mysql
  • server:wordpress
Port-forwarding Commands
  • share:localhost.run
  • share:ngrok
  • share:tor
Others
  • composer:global
  • project:list (Beta)

Available Commands

You can use this Commands specifically builded for each features.

Basic Commands

manager

$ webzone manager 

Use : An interactive web interface for managing files inside termux storage built using php. Thanks to Ging-dev for this attractive feature.

options

  • -f | --force -> reinstall file manager forcefully if you have any errors.

settings

$ webzone settings

Use : Helps to configure ports and paths to be used for each commands.

self-update

$ webzone self-update

Use : Automatically updates webzone to latest version.

composer:global

$ webzone composer:global

Use : Configure composer globally.

Create Commands

create:codelighniter

$ webzone create:codelighniter blog 

Use : Create a fresh new codelighniter project on default project root.

arguments

  • name -> Sets App/Project name.

options

  • --path (optional) -> Overides default app/project root to a custom root.

create:laravel

$ webzone create:laravel blog 

Use : Create a fresh new laravel project on default project root.

arguments

  • name -> Sets App/Project name.

options

  • --path(optional) -> Overides default app/project root to a custom root.

create:symfony

$ webzone create:symfony blog --type api

Use : Create a fresh new Symfony project on default project root.

arguments

  • name -> Sets App/Project name.

options

  • --path (optional) -> Overides default app/project root to a custom root.
  • --type (optional) -> Sets application type. By default uses web as type. Expects web or api.

create:zend

$ webzone create:zend blog 

Use : Create a fresh new zend project on default project root.

arguments

  • name -> Sets App/Project name.

options

  • --path (optional) -> Overides default app/project root to a custom root.

create:nette

$ webzone create:nette blog

Use : Create a fresh new nette project on default project root.

arguments

  • name -> Sets App/Project name.

options

  • --path (optional) -> Overides default app/project root to a custom root.

create:lumen

$ webzone create:lumen blog

Use : Create a fresh new lumen project on default project root.

arguments

  • name -> Sets app/project name.

options

  • --path (optional) -> Overides default app/project root to a custom root.

create:cakephp

$ webzone create:cakephp blog

Use : Create a fresh new nette project on default project root.

arguments

  • name -> Sets app/project name.

options

  • --path (optional) -> Overides default app/project root to a custom root.

create:yii

$ webzone create:yii blog --type=basic

Use : Create a fresh new Yii project on default project root.

arguments

  • name -> Sets app/project name.

options

  • --path (optional) -> Overides default app/project root to a custom root.
  • --type (optional) -> Sets application type. By default uses basic as type. Expects basic or advanced.

create:sapper

$ webzone create:sapper --name blog 

Use : Create a fresh new sapper project on default project root.

options

  • --name -> Set's sapper project name.
  • --path(optional) -> Overides default app/project root to a custom root.

Installable packages

install:mysql

$ webzone install:mysql

Use : Install MySql Database (mariadb).

install:pma

$ webzone install:pma

Use : Download and Install PhpMyAdmin latest version from server.

options

  • -fresh -> Remove existing PhpMyAdmin and install latest version from PhpMyAdmin website.

Installer Commands

installer:fixer

$ webzone installer:fixer 

Use : Install and configure php-cs-fixer globally. You can use php-cs-fixer -h for more details.

options

  • --uninstall -> Remove php-cs-fixer from device.

installer:laravel

$ webzone installer:laravel

Use : Install laravel-installer latest version from packagist.

options

  • --uninstall -> Remove laravel-installer globally.

installer:phpstan

$ webzone installer:phpstan

Use : Install phpstan latest version from packagist.

options

  • --uninstall -> Remove phpstan globally.

installer:symfony

$ webzone installer:symfony

Use : Install Symfony CLI from server.

installer:wordpress

$ webzone installer:wordpress

Use : Install wordpress latest version from server.

options

  • -f|--force -> Reinstall wordpress from server.

Server Commands

server:all

$ webzone server:all

Use : Enable Localhost, Pma, Mysql just in one command (BETA).

server:dev

$ webzone server:dev

Use : Start localhost for development with the path set in settings. by default uses /sdcard/www.

options

  • --n -> Prevent opening browser after starting server.
  • --port -> Overides default port (8080) set in settings.
  • --path -> Overides default path (/sdcard/www) set in settings.

server:mysql

$ webzone server:mysql

Use : Start MySql database with the default port set in settings. by default uses /sdcard/www.

options

  • --port -> Overides default port (3306) set in settings.
  • -s | --stop -> Kill all Mysql processes.

server:pma

$ webzone server:pma

Use : Start PhpMyAdmin on default port (8000) in settings.

options

  • --n -> Prevent opening browser after starting server.
  • --port -> Overides default port (8000) set in settings.

server:wordpress

$ webzone server:wordpress

Use : Start wordpress site on default port (7070) in settings.

options

  • --n -> Prevent opening browser after starting server.
  • --port -> Overides default port (7070) set in settings.
Port-forwarding Commands

share:localhost.run

$ webzone share:localhost.run

Use : Connect a tunnel to your web appplication running on port 8080 (default)

options

  • --port -> Overides default port (8080).

share:localhost.run

$ webzone share:localhost.run

Use : Connect a tunnel to your web appplication running on port 8080 (default)

options

  • --port -> Overides default port (8080).

share:localhost.run

$ webzone share:localhost.run

Use : Connect a tunnel to your web appplication running on port 8080 (default)

options

  • --port -> Overides default port (8080).

share:ngrok

$ webzone share:ngrok

Use : ngrok provides a real-time web UI where you can introspect all HTTP traffic running over your tunnels. Replay any request against your tunnel with one click.

options

  • --port -> Overides ngrok port setting.
  • -s | --stop -> Kill all Ngrok processes.

share:tor

$ webzone share:tor

Use : Set up a website in the Onion/Tor network.

(NB: The developer of webzone will not be responsible for any misuses done by users.)

options

  • --reset -> Reset tor configuration.
  • --port -> Set the port to be shared to tor Network

project:list (beta)

$ webzone project:list

Use : Show all directories inside project root folder.

Credits

@albinvar @shmshd

Contributing

License

MIT. See LICENSE for more details.