DEV Community

Tony Pujals
Tony Pujals

Posted on • Edited on

1

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.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more