CLI

The Plash CLI tool

This module implements the Plash CLI functions. As they’re built with fastcore @call_parse they can also be used in python directly.


source

login

 login ()

Authenticate CLI with server and save config

CLI usage:

plash_login --help
usage: plash_login [-h]

Authenticate CLI with server and save config

options:
  -h, --help  show this help message and exit

source

deploy

 deploy (path:pathlib._local.Path=Path('.'), name:str=None,
         force_data:bool=False)

Deploys app to production. By default, this command erases all files in your app which are not in data/. Then uploads all files and folders, except paths starting with . and except the local data/ directory. If --force_data is used, then it erases all files in production. Then it uploads all files and folders, including data/, except paths starting with ..

Type Default Details
path Path . Path to project
name str None Overrides the .plash file in project root if provided
force_data bool False Overwrite data/ directory during deployment

CLI usage:

plash_deploy --help
usage: plash_deploy [-h] [--path PATH] [--name NAME] [--force_data]

Deploys app to production. By default, this command erases all files in your app which are not in data/. Then uploads
all files and folders, except paths starting with `.` and except the local data/ directory. If `--force_data` is used,
then it erases all files in production. Then it uploads all files and folders, including `data/`, except paths starting
with `.`.

options:
  -h, --help    show this help message and exit
  --path PATH   Path to project (default: .)
  --name NAME   Overrides the .plash file in project root if provided
  --force_data  Overwrite data/ directory during deployment (default: False)

source

view

 view (path:pathlib._local.Path=Path('.'), name:str=None)

Open your app in the browser

Type Default Details
path Path . Path to project directory
name str None Overrides the .plash file in project root if provided

CLI usage:

plash_view --help
usage: plash_view [-h] [--path PATH] [--name NAME]

Open your app in the browser

options:
  -h, --help   show this help message and exit
  --path PATH  Path to project directory (default: .)
  --name NAME  Overrides the .plash file in project root if provided

source

delete

 delete (path:pathlib._local.Path=Path('.'), name:str=None,
         force:bool=False)

Delete your deployed app

Type Default Details
path Path . Path to project
name str None Overrides the .plash file in project root if provided
force bool False Skip confirmation prompt

CLI usage:

plash_delete --help
usage: plash_delete [-h] [--path PATH] [--name NAME] [--force]

Delete your deployed app

options:
  -h, --help   show this help message and exit
  --path PATH  Path to project (default: .)
  --name NAME  Overrides the .plash file in project root if provided
  --force      Skip confirmation prompt (default: False)

source

start

 start (path:pathlib._local.Path=Path('.'), name:str=None)

Start your deployed app

CLI usage:

plash_start --help
usage: plash_start [-h] [--path PATH] [--name NAME]

Start your deployed app

options:
  -h, --help   show this help message and exit
  --path PATH  (default: .)
  --name NAME

source

stop

 stop (path:pathlib._local.Path=Path('.'), name:str=None)

Stop your deployed app

CLI usage:

plash_stop --help
usage: plash_stop [-h] [--path PATH] [--name NAME]

Stop your deployed app

options:
  -h, --help   show this help message and exit
  --path PATH  (default: .)
  --name NAME

source

logs

 logs (path:pathlib._local.Path=Path('.'), name:str=None,
       mode:fastcore.basics.log_modes='build', tail:bool=False)

Prints the logs for your deployed app

Type Default Details
path Path . Path to project
name str None Overrides the .plash file in project root if provided
mode log_modes build Choose between build or app logs
tail bool False Tail the logs

CLI usage:

plash_logs --help
usage: plash_logs [-h] [--path PATH] [--name NAME] [--mode {build,app}] [--tail]

Prints the logs for your deployed app

options:
  -h, --help          show this help message and exit
  --path PATH         Path to project (default: .)
  --name NAME         Overrides the .plash file in project root if provided
  --mode {build,app}  Choose between build or app logs (default: build)
  --tail              Tail the logs (default: False)

source

download

 download (path:pathlib._local.Path=Path('.'), name:str=None,
           save_path:pathlib._local.Path=Path('download'))

Download your deployed app

Type Default Details
path Path . Path to project
name str None Overrides the .plash file in project root if provided
save_path Path download Save path (optional)

CLI usage:

plash_download --help
usage: plash_download [-h] [--path PATH] [--name NAME] [--save_path SAVE_PATH]

Download your deployed app

options:
  -h, --help             show this help message and exit
  --path PATH            Path to project (default: .)
  --name NAME            Overrides the .plash file in project root if provided
  --save_path SAVE_PATH  Save path (optional) (default: download)

source

apps

 apps (verbose:bool=False)

List your deployed apps (verbose shows status table: 1=running, 0=stopped)

CLI usage:

plash_apps --help
usage: plash_apps [-h] [--verbose]

List your deployed apps (verbose shows status table: 1=running, 0=stopped)

options:
  -h, --help  show this help message and exit
  --verbose   (default: False)