Package: viur-cli
viur-cliCommand-line interface forViUR frameworkproject maintenance.What does it do?viur-cliallows to control, maintain and develop a ViUR project from one central location by using theviurcommand.InstallationTo useviur-cliin your ViUR projects, install thePyPI packageviur-cli.$pipenvinstall--devviur-cliUsage$viur--helpwill show all the commands that are currently supported by viur-cli$viurcreatemyappthis will create a new project folder, clone the base project and then callviur initto prepare a project.json
you can use this to get started quickly with a new viur project from scratch.$viurinitthis will initialize a new project in the current folder, you will be asked a couple of questions like if
you would like to create a new project.json file, what components should be preinstalled and what the
projectID of your application will be.$viurrun[target]run the appserver and start your app locally. You may specify a target projectID.$viurcheck{npm|--dev|--autofix}Runs a security check for the python environment and for each npm project registered under builds.$viurdeploy{app|index}[target]you can deploy the app or the index.yaml to a google cloud project target of your choice, though the target is optional.
By default this would be the projectID you gave when initializing the project, but you can add targets to the project.json
if you would like to have an additional system for testing for example.$viurenable{backup}create a backup bucket and enable the gcloud service worker account to access it.$viurinstall{vi|scriptor}ask viur-cli to install either vi or the scriptor into your project$viurbuildreleasebuild all npm apps and produce a release that can be deployed$viurbuildapp[appname]build a specific app$viurenvcheck the environment you are in right now, show versions of viur-cli, viur-core and vi etc.$viurproject{add|remove|list}with this you can manage your project.json or generate a new one. You can add or remove targets to/from the
project.json, list what has been added to the project.json, to be built when runningviur build release.$viurupdate{requirements}with this you can update your project specific requirements.txt file automaticallyViur scripting interfaceThere is a new core component that enables us to pull and push python scripts from/to a deployed application and run these in a sandbox or even locally.
The GUI version is called scriptor and can be accessed via a webinterface, but viur-cli also has a cli for this:$viurscript{configure|pull|push|run|setup}Commands:configureManage configuration settings.pullPull contents from server to working_dir.pushPush contents of working_dir to server.runLocally run a script located in the working_dir.setupSetup user session with a given username and...Packaged toolsIn order to use the packaged tools, you can run:$viurtool{2to3|pyodide|ssl-fix}Scripts:2to3viur porting scriptpyodiderun the get_pyodide commandssl-fixssl fix for MacOSfor example the 2to3 script helps porting viur2 project to viur3, it can be used to automatically rename some things that are deprecated
in viur3 as well, so you can use it whenever a new core version is released for viur3 projects as well:$viurtool2to3-d.will dry-run the script in the current directory and not make any changes, only suggestions. If you want to make the changes,
leave out the -d argument and if you are a daring go-getter and like to live dangerously, replace the -d with -x,
which will write the suggested changes without making a backup of the changed files.DevelopmentIf you want to hackviur-cli, clone this repository next to the folder of your ViUR project.$gitclonegit@github.com:viur-framework/viur-cli.git
$ls-1
viur-cli
your-projectThen, add it to your project as an editable dependency using$cdyour-project
$pipenvinstall--dev--editable../viur-cliDependenciesviur-cli depends onclickapp_serverpipfile-requirementswatchgodpython-minifierLicenseCopyright © 2023 by Mausbrand Informationssysteme GmbH.Mausbrand and ViUR are registered trademarks of Mausbrand Informationssysteme GmbH.This project is free software under the MIT license.Please see the LICENSE file for details.