Is it possible to install a PWA from the command line?

%3CLINGO-SUB%20id%3D%22lingo-sub-2740596%22%20slang%3D%22en-US%22%3EIs%20it%20possible%20to%20install%20a%20PWA%20from%20the%20command%20line%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2740596%22%20slang%3D%22en-US%22%3E%3CP%3EFrom%20the%20comment%20in%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fchromium%2Fchromium%2Fblob%2Fmaster%2Fchrome%2Fcommon%2Fchrome_switches.cc%23L322-L324%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EChromium's%20source%20code%3C%2FA%3E%20about%20%22--force-app-mode%22%20I%20was%20under%20the%20impression%20that%20it%20could%20be%20used%20to%20install%20a%20PWA%20from%20the%20command%20line%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-cpp%22%3E%3CCODE%3E%2F%2F%20Forces%20application%20mode.%20This%20hides%20certain%20system%20UI%20elements%20and%20forces%0A%2F%2F%20the%20app%20to%20be%20installed%20if%20it%20hasn't%20been%20already.%0Aconst%20char%20kForceAppMode%5B%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%22force-app-mode%22%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E...%20but%20after%20trying%20a%20few%20different%20combinations%20of%20switches%20(such%20as%20app%2C%20app-id%2C%20app-url%2C%20profile-directory%2C%20etc)%20I%20wasn't%20able%20to%20do%20so%20-%20at%20least%20not%20with%20an%20URL%20referring%20to%20%3CA%20href%3D%22https%3A%2F%2Flocalhost%3A5001%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Flocalhost%3A5001%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20it%20possible%20to%20install%20a%20PWA%20from%20the%20command%20line%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

From the comment in Chromium's source code about "--force-app-mode" I was under the impression that it could be used to install a PWA from the command line:

// Forces application mode. This hides certain system UI elements and forces
// the app to be installed if it hasn't been already.
const char kForceAppMode[]                  = "force-app-mode";

... but after trying a few different combinations of switches (such as app, app-id, app-url, profile-directory, etc) I wasn't able to do so - at least not with an URL referring to https://localhost:5001.

 

Is it possible to install a PWA from the command line?

0 Replies