DEV Community

Tony Pujals
Tony Pujals

Posted on • Edited on

Streamlining gcloud with a custom CLI for serverless JavaScript developers

Overview

In my previous article, I walked through using the Google Cloud CLI interactive shell for deploying serverless apps to Cloud Run.

As noted, gcloud provides comprehensive commands, but using it involves fairly detailed knowledge of a somewhat daunting number of steps that must be followed to set up project resources and deploy an app.

To simplify the experience for JavaScript developers, I created a lightweight CLI, called run, that streamlines those steps using a simple configuration file (run.yaml) to handle all the details. When you deploy, run will prompt for any missing configuration settings and save them for subsequent deployments.

Image description

In addition, the run CLI can also generate starter projects and examples to help you get up and running even faster.

To create and deploy an application, you run the following commands:



run login
run new
run deploy


Enter fullscreen mode Exit fullscreen mode

This what using run looks like:

Image description

I plan to add more templates, examples, and support for integrations with other Google Cloud services.

Keep in mind that run is not a replacement for everything that gcloud can do. It's primary goal is only to make it easier for JavaScript developers to get up and running on Cloud Run.

Install it from npm:



npm install -g @subfuzion/run

# or

npx @subfuzion/run


Enter fullscreen mode Exit fullscreen mode

See the repo for more details.

Give run a try and let me know what you think.

Top comments (0)