How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (2024)

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (1)

Today we are going to have a look step-by-step at how to install, set up, and use Jarvis. If you don’t know what Jarvis is, then you should read my previous story about how Jarvis came to exist.

Let’s start by having a look at how to install Jarvis. This can be done in two ways. The first — and the way that I recommend — is by using NPM. If you don’t already have NPM installed, then you can do so by going to the NodeJS website.

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (2)

Installing Jarvis with NPM is as easy as:

npm install -g @willptswan/jarvis

You may get an error saying permission denied. If you see this, then try running the command with sudo in front of it.

The second way to install Jarvis is by cloning it from GitHub. First, you will need to navigate to your root directory using the command line. Then, clone the repo. After you have cloned the repo, move to the Jarvis directory and link it.

cd ~
git clone https://github.com/willptswan/jarvis.git
cd jarvis
npm link

Once you have installed Jarvis, run the following command to verify the install:

jarvis version

If this command displays the version, then you are ready to start setting up Jarvis.

To set up Jarvis so that you can use all of the features, there are three things you need to do: add a git config, add a Google Cloud Platform config, and add an S3 config.

Adding a git config

Let’s start by adding a git config. Currently, Jarvis only supports GitHub accounts, so that’s what we’ll use.

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (3)

The first thing you need to do is create a personal access token for your GitHub account. This will allow Jarvis to upload the public SSH key to your account. The only scope that Jarvis currently requires is admin:public_key. Make sure you make a note of this token because you won’t be able to view it again.

Once you have created the token, run the following command:

jarvis config-new git

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (4)

First, you will be asked to give the config and id. This can be anything that you want it to be. After Jarvis has made sure that the config id is unique, it will ask you for your GitHub username, your email, and the personal access token you’ve just created.

Once Jarvis has all the information it needs, it will create the SSH keys, update the SSH config, and upload the public SSH key to your GitHub account. Next, Jarvis will ask if you want to activate this config. For this tutorial, we will say no.

Adding a Google Cloud Platform config

To add a GCP config, you will need to have Google’s Cloud SDK installed. If you use Google Cloud Platform, then you probably already have it installed. If you don’t, you can get it on the Google Cloud website. Once you have installed the SDK and you are ready to add a config to Jarvis, run the following command:

jarvis config-new gcp

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (5)

Like with adding a new git config, first Jarvis will ask you for a config id. After that, it will ask you for your GCP email and the name of the GCP project that you would like to use. Once you have entered all the information, Google’s Cloud SDK will ask you to log in. It’s as simple as that.

Adding an S3 config

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (6)

To add an S3 account, you will need to create a new AWS IAM user. This user only needs programmatic access and requires the S3 Full Access policy. Make a note of the keys that AWS gives you because you will need these later.

Once you have created a new IAM user, run the following command:

jarvis config-new s3

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (7)

Like when you added the previous configs, you will first be asked for an identifier for the config. Next, Jarvis will ask for the region your S3 bucket is in, your access key, your secret access key, and the name of your S3 bucket. Once you have entered this information, Jarvis will create the config.

You now have Jarvis all set up, and you are ready to start using it to its full potential.

Let’s start by having a look at the React commands. First, we’ll see how we can create a complete boilerplate React project with one command.

React init

First, create an empty folder for the project and move to it in the command line. You will also need an empty GitHub repo for the project, so go ahead and create one. Once you have done that, run the following command, replacing projectName with the name of your project.

jarvis react-init projectName

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (8)

The first thing Jarvis will do is initialise a git directory. After it has done that, it will ask you which of your git configs you want to use and the name of the repo that you are working on. It will then activate the git config so that it’s ready to be used.

Next, Jarvis will create all of the files and folders for the project. Halfway through this process, it will ask if the project is going to be deployed to Google App Engine. For this tutorial, respond with yes. Once all the files and folders have been created, Jarvis will install all of the required NPM packages for the project. Next, it will ask if you want to run the tests, and then after that, it will ask if you want to build and run the project.

You now have a React project initialised and ready to start creating cool things.

React create

Next, let's have a look at creating a React component using Jarvis. This is as easy as running the following command. Be sure to replace ComponentName with the name you would like to give the component.

jarvis react-create ComponentName

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (9)

Creating a React component is as easy as that. All the files that Jarvis creates are filled with everything you need to get straight into building the component.

React deploy

The last of the React commands is react-deploy. With this command, you can deploy your project to Google App Engine, upload the CSS & JS bundle to S3, and push the changes to GitHub all in one command.

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (10)

The first thing you’ll need to do is make sure that your GCP project contains an App Engine application. If it doesn’t, then create one now in the GCP console.

If you have recently been using a different GCP config, then you may need to run gcloud auth login before you run the Jarvis react deploy command.

jarvis react-deploy 1.0.0

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (11)

First, tests and a production build are run. You will then be asked if the current active S3 config is correct. If it is, then the index.html file will be updated with production URLs. After index.html has been updated, you will be asked to confirm that the git config is correct. If it is correct, then all changes will be pushed to GitHub. Next, you will be asked if the GCP config is correct. If it is, then the project will be deployed to Google App Engine. Lastly, the production CSS & JS bundles will be uploaded to S3. Once this has all completed, your project will be live and ready to be seen and used by the world.

React build

If you want to run your project in the dev environment, all you have to do is run:

jarvis react-build

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (12)

You will be asked if the current active S3 config is correct. This is so that if a production version has been built, the index.html file will be updated to dev settings. A new terminal window will be opened, and the build will run. Your files will be watched, so you don’t have to rebuild every time you make a change.

Git pull

To pull changes from GitHub, just run:

jarvis git-pull

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (13)

Jarvis will ask if the current active git config is correct. If it is, then the changes will be pulled correctly.

Git clone

If you want to clone a repo, run the following command, replacing repoName with the name of the repo that you want to clone.

jarvis git-clone repoName

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (14)

Just like with git-pull, you will be asked if the current git config is correct. If it is, then the repo will be cloned.

Git push

If you want to push changes to GitHub, you have three options. Firstly, you can push all of the files by running:

jarvis git-push 1.0.0

Secondly, you can push a single file:

jarvis git-push 1.0.0 file.js

And lastly, you can push multiple files:

jarvis git-push 1.0.0 file1.js file2.js

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (15)

When pushing changes to GitHub, you will be asked if the current active git config is correct. If it is, then Jarvis will add the files, commit them with the version that you pass, and then push them.

Config switch

To switch between different configs, all you need to do is run the following command, replacing type with the type of config you want to switch.

jarvis config-switch type

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (16)

Jarvis will then ask you which config you would like to switch to, and it will switch to the config you choose.

Config update

Updating a config is simple. Just like with switching configs, run the following command, replacing type:

jarvis config-update type

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (17)

Jarvis will ask which config you want to update. Once you have chosen a config to update, it will then ask for new values for each property of the config. If you don’t want to update a specific property, then you can just hit enter, and the property will stay the same. Once you have entered all the new properties, Jarvis will ask if you want to make this config active.

Config delete

To delete a config, run the following command, replacing type:

jarvis config-delete type

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (18)

You will be asked which config you would like to delete. Jarvis will then check that you are sure you want to delete the config. If you are sure, then the config will be deleted, and Jarvis will ask you to activate a new config.

Site open and search

Jarvis has a convenient feature for opening websites. For this all you need to do is run:

jarvis site-open medium.com

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (19)

You can also use one of Jarvis’s shorthand sites:

jarvis site-open so (Stack Overflow)
jarvis site-open npm (NPM)
jarvis site-open cocoa (CocoaPods)
jarvis site-open g (Google)
jarvis site-open awe (Awesome)
jarvis site-open gh (GitHub)

If you want to search a website, you can’t just paste in any URL. You have to use one of Jarvis’s shorthands:

jarvis site-search so (Stack Overflow)
jarvis site-search npm (NPM)
jarvis site-search g (Google)
jarvis site-search gh (GitHub)

There we have it, you now know how to install, set up, and use Jarvis like a pro. Jarvis is still young, and a lot of features are currently in the pipeline to be released soon. As these features are released, I will write new tutorials on how to use them.

GitHub: https://github.com/willptswan/jarvis

NPM: https://www.npmjs.com/package/@willptswan/jarvis

How To Set Up & Use Jarvis — The CLI That Makes Your Life Easier (2024)

FAQs

How to use commands in Jarvis? ›

To give Jarvis a command, simply type it out, place your cursor at the end of the sentence, and hit Command + Enter (Control + Enter for those using Windows). Let's take a look at some commands you can try for different types of content.

How do I set up Jarvis? ›

Build JARVIS on Your PC | Personal Voice Assistant - Be the Next Iron Man

How install Jarvis Kali Linux? ›

  1. Install the pywm module from: https://pypi.python.org/pypi/pyowm/2.6.1#downloads.
  2. Download the file: pyowm-2.6.1.tar.gz.
  3. Unzip it and inside the folder that appears execute:}

How do I undo Jarvis in Illustrator? ›

How to use keyboard shortcuts in Jarvis - YouTube

What does Jarvis say to Iron Man? ›

"Tell you what, throw a little hot rod red in there." Sir, the more you struggle, the more this is going to hurt."

What is Bossmode? ›

Boss Mode is an upcoming DLC pack similar to Bitizenship. But, instead of giving access to various features as Bitizenship did, Boss Mode will only provide access to Job packs. These Job packs will include content that revolves around new jobs in BitLife.

How do I add J.A.R.V.I.S. to my phone? ›

Iron Man Jarvis for Android Phone & Tablet - YouTube

What is faze J.A.R.V.I.S. settings in fortnite? ›

Trying The AIMBOT Settings That Got FaZe Jarvis BANNED… - YouTube

Is there a J.A.R.V.I.S. app? ›

The JARVIS app is being hailed as the "first ever" voice-controlled Blu-ray app. You can access the list of voice commands by tapping on the information icon. You can also sync the app to your Blu-ray player to unlock hidden files and suits.

Is Jarvis a virtual assistant? ›

Jarvis virtual assistant is designed to work efficiently on desktop. Virtual assistant improves productivity of user by managing daily routine tasks of the user and provides general information from Internet\online sources to the user.

Does Linux have a virtual assistant? ›

If you're one of them, meet "Betty", a command-line virtual assistant for Linux. Betty is somewhat similar to Apple's Siri personal assistant or Google Voice Search feature. It is a friendly English-like interface for your command line that translates English-like phrases into Linux commands.

Is there any voice assistant for Ubuntu? ›

Dragonfire. Dragonfire is an open-source voice assistant for Ubuntu-based Linux systems. It uses Mozilla's Deepspeech to understand the voice commands and Festival speech synthesis system to handle text to speech tasks.

How do I set up a virtual assistant? ›

How to make a virtual assistant? There are three ways: Integrate existing voice technologies like Siri, Google, Cortana into your app using specific APIs and other dev tools. Build a smart assistant using open-source services and APIs like Wit.ai or Jasper.

How do I install J.A.R.V.I.S. on my laptop? ›

How to install Jarvis Voice assistant on Windows pc - YouTube

How do I create an AI assistant? ›

Create your own AI Assistant | Python | 2022 - YouTube

Top Articles
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated:

Views: 6572

Rating: 4.7 / 5 (77 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.