Command-line interface for ViUR application maintenance.
Project description
What does it do?
viur-cli allows to control, maintain, develop and deploy a ViUR project from one central
location by using the viur command.
Installation
To use viur-cli in your ViUR projects, install the PyPI package viur-cli.
$ pipenv install --dev viur-cli
Shell Autocompletion
viur-cli supports shell autocompletion for bash, zsh, and fish shells. This makes it easier to use the CLI by providing tab-completion for commands and options.
Installing Autocompletion
To install autocompletion for your shell, run:
$ viur setup-autocomplete
This will automatically detect your shell and set up the appropriate completion script. You can also specify a shell explicitly:
$ viur setup-autocomplete --shell=bash # For bash
$ viur setup-autocomplete --shell=zsh # For zsh
$ viur setup-autocomplete --shell=fish # For fish
After installation, restart your shell or source your shell configuration file:
# For bash
$ source ~/.bashrc
# For zsh
$ source ~/.zshrc
Checking Autocompletion Status
To see if autocompletion is installed and get more information:
$ viur autocomplete-info
Uninstalling Autocompletion
To remove the autocompletion setup:
$ viur uninstall-autocomplete
Usage
$ viur -h
will show all the commands that are currently supported by viur-cli
$ viur --version
will show your current viur-cli version
$ viur create myapp
this will create a new project folder, clone the base project and then call viur init to prepare a project.json
you can use this to get started quickly with a new viur project from scratch.
$ viur run [profile]
run the appserver and start your app locally. You may specify a target profile.
$ viur check [--dev]
Runs a security check for the python environment and for each npm project registered under builds.
$ viur package {install|update} {vi|scriptor|admin|all}
handles ViUR ecosystem package operations
Commands:
installinstalls a ViUR package (in a specific version)updateupdates a ViUR package to the newest version
Arguments:
profileprofile to install toversionversion to install
$ viur build {app|clean|release} [option]
Builds ViUR Project or specific apps Commands:
appBuild a specific applicationcleanClean up Build ArtifactsreleaseBuild all relevant applications to deploy the project
$ viur cloud deploy {app|index|cloudfunction} {profile} {--ext|--yes|--name}
This Function deploys the Google Cloud application and / or different .yaml files Scripts:
appDeploy application to the Google AppengineindexDeploy index.yaml to Google AppengingecloudfunctionDeploy Cloudfunction to Google Appengine Commands:profileThe project.json profile you want to Work from
$ viur cloud init {service} {profile}
This Function makes the init deployment for a ViUR project. This Function needs to be called so that the development server works locally.
$ viur cloud {enable|disable} backup
Enable/ Disable the Backup buckets you need to Backup a cloud project in the Google Cloud Console
$ viur cloud setup {gcloud|gcroles}
Scripts:
gcloudThis Function setups your project to work on the gcloud plattformgcrolesThis function lets you set up Roles for your google appengine Workspace
$ viur cloud get {gcroles}
Scripts:
gcrolesThis function lets you get Roles for your google appengine Workspace in a readable .json Format
$ viur package {update|install} {vi|admin|scriptor|all} [profile] [version]
Performs operations on packages
Scripts:
updateUpdates an installed packageinstallInstalls a declared package
Options:
viadminscriptorall
$ viur env
Show information about your current environment.
$ viur project list
Pretty prints your project.json file on the console.
$ viur update {requirements}
with this you can update your project specific requirements.txt file automatically
The project.json
The project.json is your core project configuration file for every viur related operation.
It contains the default viur project profile and it can be expanded with several individual project profiles.
Example project.json
{
/*
The format Key, Value pair defines the project json format, the viur-cli uses
*/
"format": "2.0.0",
/*
The first level contains of your profiles
"default" is a profile, which is inherited by "develop" and "live" and can be customized for particular versions
and/or GAE projects. Therefore, every profile can contain all keys from the "default" profile.*/
"default": {
/*
The builds level declares steps for the `viur build` command.
It can contain viur components and other components that need to be build before project deployment
*/
"builds": {
"admin": {
"command": "viur install admin",
"kind": "exec",
"version": "4.0.8"
},
"npm": {
"command": "build",
"kind": "npm",
"source": ""
}
/* OPTIONAL arguments, can be set in default or in a specific profile */
"appyaml": "app_stub.yaml", // Use a name other than "app.yaml"
"appyaml_substitition": true, // Set to true to replace only standard variables in app.yaml
"appyaml_substitition": { // Set to an object to replace these in addition to the standard variables in app.yaml
"$REGION": "europe-west3"
}
},
"gcloud": {
"functions": { //Declarations for a cloud function
"testfunction1": {
"entry-point": "main",
"env-vars-file": "env.yaml",
"memory": "512MB",
"runtime": "python311",
"source": "deploy/cloudfunction/function1",
"trigger": "http"
}
},
"max-instances": "1",
"region": "europe-west3"
},
"core": "3.5.1", // viur-core version of your project
"distribution_folder": "./deploy", // Deploy folder uploaded to GAE
"sources_folder": "./sources",
"version": "live-$(year)-$(month)-$(day)", // Version string; Variables can be used here.
"application_name": "my-live-app-viur3" // Name of the GAE project *4
},
"develop": {
"application_name": "my-dev-app-viur3",
"version": "dev-$(user)"
}
}
Viur scripting interface
There 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:
$ viur script {configure|pull|push|run|setup}
Manage your ViUR Scriptor Scripts via the CLI 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 tools
In order to use the packaged tools, you can run:
$ viur tool {2to3|pyodide|ssl-fix}
Scripts:
2to3viur porting scriptpyodiderun the get_pyodide commandssl-fixssl fix for MacOS
for 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:
$ viur tool 2to3 -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.
Development
If you want to hack viur-cli, clone this repository next to the folder of your ViUR project.
$ git clone git@github.com:viur-framework/viur-cli.git
$ ls -1
viur-cli
your-project
Then, add it to your project as an editable dependency using
$ cd your-project
$ pipenv install --dev --editable ../viur-cli
Dependencies
viur-cli depends on
License
Copyright © 2025 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file viur_cli-2.3.6.tar.gz.
File metadata
- Download URL: viur_cli-2.3.6.tar.gz
- Upload date:
- Size: 38.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61954f62ecbacd71873b488ef2609cbb127b8ea7d44e63d38e3ff62a3dd97d6c
|
|
| MD5 |
544c1925f552fb9e85ca7c0d70266a62
|
|
| BLAKE2b-256 |
91951eef20060379b01dc2d35be9371ae3a0bc5b7cbd30000d17d3acab242261
|
Provenance
The following attestation bundles were made for viur_cli-2.3.6.tar.gz:
Publisher:
publish.yaml on viur-framework/viur-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
viur_cli-2.3.6.tar.gz -
Subject digest:
61954f62ecbacd71873b488ef2609cbb127b8ea7d44e63d38e3ff62a3dd97d6c - Sigstore transparency entry: 1451050224
- Sigstore integration time:
-
Permalink:
viur-framework/viur-cli@a43d382b8e8e02f44b76cdd34c8416489518aec6 -
Branch / Tag:
refs/tags/v2.3.6 - Owner: https://github.com/viur-framework
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@a43d382b8e8e02f44b76cdd34c8416489518aec6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file viur_cli-2.3.6-py3-none-any.whl.
File metadata
- Download URL: viur_cli-2.3.6-py3-none-any.whl
- Upload date:
- Size: 40.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6890c1af6da0b476d85cc35dd45ee9cbe9763452ff7551f81816efc3e76fac6f
|
|
| MD5 |
a84b474b8dea4d243e4964d07784e624
|
|
| BLAKE2b-256 |
b2587d58c8bde19f1abdf405069c9c469cc1cf31b1c4cddccf40f8a7895c5afb
|
Provenance
The following attestation bundles were made for viur_cli-2.3.6-py3-none-any.whl:
Publisher:
publish.yaml on viur-framework/viur-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
viur_cli-2.3.6-py3-none-any.whl -
Subject digest:
6890c1af6da0b476d85cc35dd45ee9cbe9763452ff7551f81816efc3e76fac6f - Sigstore transparency entry: 1451050729
- Sigstore integration time:
-
Permalink:
viur-framework/viur-cli@a43d382b8e8e02f44b76cdd34c8416489518aec6 -
Branch / Tag:
refs/tags/v2.3.6 - Owner: https://github.com/viur-framework
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@a43d382b8e8e02f44b76cdd34c8416489518aec6 -
Trigger Event:
push
-
Statement type: