@willptswan/jarvis v2.0.1

Jarvis CLI
Jarvis is a continually growing cross-platform CLI that helps with routine tasks and speeds up a few things.
Currently, Jarvis can:
- Manage git configs
- Manage GCP configs
- Manage S3 access configs
- Initialise react projects
- Create react components
- Deploy react projects to Google App Engine
- Push changes to GitHub
- Pull changes from GitHub
- Clone repos from GitHub
- Initialise git directories
- Open websites
- Search websites
- Upload files and folders to S3
- Display cheat sheets
- Open documentation for languages, frameworks, and platforms in your browser
- Count the lines of code in a project
- Get stats on a project including line and file counts
Install Jarvis
You can install Jarvis by cloning it from GitHub or installing from NPM.
git clone https://github.com/willptswan/jarvis.git
cd jarvis
npm linknpm install -g @willptswan/jarvisJarvis requires the following CLI's to be installed:
- Cloud SDK - Install
Using Jarvis
Below is a list of all of the commands that Jarvis can do, if you want to know more about how each command works, then please read my Medium Story.
Version
Display the current version of Jarvis.
jarvis versionHelp
List all of the commands that Jarvis is capable of running.
jarvis helpReset
Reset Jarvis, this deletes all stored configs and resets all settings.
jarvis resetConfig New
Create and store a new config. Valid arguments are git, gcp, and s3.
jarvis config-new git
jarvis config-new gcp
jarvis config-new s3Config Delete
Delete a stored config. Valid arguments are git, gcp, and s3.
jarvis config-delete git
jarvis config-delete gcp
jarvis config-delete s3Config Update
Update a stored config. Valid arguments are git, gcp, and s3.
jarvis config-update git
jarvis config-update gcp
jarvis config-update s3Config Switch
Switch between stored configs. Valid arguments are git, gcp, and s3.
jarvis config-switch git
jarvis config-switch gcp
jarvis config-switch s3Config View
View all stored configs. Valid arguments are git, gcp, s3, and all.
jarvis config-view git
jarvis config-view gcp
jarvis config-view s3
jarvis config-view allReact Init
Initialise a complete boilerplate React project.
jarvis react-init <projectName>
e.g.
jarvis react-init my-project
jarvis react-init MyProject
jarvis react-init myProjectBy default, Jarvis will use LESS for all styles. If you would like to use SCSS then update the useSCSS setting.
React Create
Create a new boilerplate React component.
jarvis react-create <ComponentName>
e.g.
jarvis react-create MyComponentBy default, Jarvis will use LESS for all styles. If you would like to use SCSS then update the useSCSS setting.
React Deploy
Deploy a react project to Google App Engine.
jarvis react-deploy <platform> <version>
e.g.
jarvis react-deploy gae 1.0.0React Build
Build and run a project in the dev environment.
jarvis react-buildGit Push
Add, commit, and push changes to GitHub.
jarvis git-push <version> [files]
e.g.
jarvis git-push 1.0.0 // Push all changes
jarvis git-push 1.0.0 file.js // Only push changes to file.js
jarvis git-push 1.0.0 file1.js file2.js // Push changes for all passed filesGit Pull
Pull changes from a GitHub repo.
jarvis git-pullGit Clone
Clone a repo from GitHub.
jarvis git-clone <repoName>
e.g.
jarvis git-clone my-repoGit Init
Initialise a git directory.
jarvis git-initGoogle App Engine Deploy
Deploy a new version of a project to Google App Engine.
jarvis gae-deploy <version>
e.g.
jarvis gae-deploy 1.0.0S3 Upload
Upload files and folders to AWS S3.
jarvis s3-upload <filePath> -pSingle file upload:
jarvis s3-upload file.jsMulti file upload:
jarvis s3-upload FolderWithMultipleFiles -pFolder upload:
jarvis s3-upload FolderSite Open
Open a website in a new browser tab.
jarvis site-open <site>
e.g.
jarvis site-open https://github.com // Opens GitHub
jarvis site-open github.com // Opens GitHub
jarvis site-open so // Opens Stack Overflow
jarvis site-open npm // Opens NPM
jarvis site-open cocoa // Opens CocoaPods
jarvis site-open g // Opens Google
jarvis site-open awe // Opens Awesome
jarvis site-open gh // Opens GitHub
jarvis site-open css // Opens CSS TricksSite Search
Open and search a website in a new browser tab.
jarvis site-search <site>
e.g.
jarvis site-search so // Searches Stack Overflow
jarvis site-search npm // Searches NPM
jarvis site-search g // Searches Google
jarvis site-search gh // Searches GitHub
jarvis site-search css // Searches CSS TricksSettings Update
Update the settings.
jarvis settings-updateSettings Reset
Reset all settings to default values.
settings-resetSettings View
View all of your current settings.
settings-ViewCheat Sheet
Display the cheat sheet for a language or framework, the section is optional.
cs <type> [section]
e.g.
jarvis cs javascript
jarvis cs javascript basic-objectAvailable Cheat Sheets: ActionScript, Characters, CMake, CSS, Docker, Drush, ExpressJS, Git, HTML, HTMLDOM, HTTPStatus, Javascript, jQuery, Linux, mod_rewrite, MongoShell, MySQL, NodeJS, PHP, Python, Regex, Ruby, SVN, UnderscoreJS.
Cheat Sheet Types
Display the available cheat sheets
cs-typesCheat Sheet Type Sections
Display the available sections for a cheat sheet
cs-sections <type>
e.g.
jarvis cs-sections javascriptDocumentation
Open documentation for a language, framework, or platform in your browser.
documentation <type>
e.g.
jarvis documentation javascriptAvailable Documentation:
Languages: ABAP, ActionScript, Ada, APL, ASP.NET, C, C++, C#, CSS, SCSS, LESS, Erland, Elixir, F#, Go, Haskell, HTML, Java, JavaScript, NodeJS, List, ObjectiveC, OCaml, Perl, PHP, Python, R, RubyOnRails, Scala, Swift, VisualBasic, XML, Rust, Kotlin, Ruby, TypeScript.
Frameworks: Boostrap, jQuery, lodash, request, chalk, react, express, commander, moment, debug, prop-types, react-dom, async, bluebird, fs-extra, tslib, axios, underscore, uuid, mkdirp, classnames, vue, body-parser, yargs, webpack, glob, rxjs, colors, inquirer, minimist, babel-core, core-js, aws-sdk, dotenv, yeoman-generator, redux, tensorflow, Kibana.
Platforms: Apache, Nginx, Kubernetes, Docker, Git, Heroku, Azure, GoogleCloud, AWS, MySQL, PostgreSQL, MongoDB, Redis, ApacheSpark, ElasticSearch, CockroachDB, Joomla.
Documentation List
Display a list of all available documentation types.
documentation-listProject Lines
Count the amount of lines of code in a project including a detailed breakdown of lines per file.
project-lines [ignoreFiles]By default project-lines ignores:
README.md
LICENSE
CHANGELOG.md
package.json
package-lock.json
.sass-lint.yml
.gitignore
.gcloudignore
.eslintrc
node_modules/
.git/
*.com
*.class
*.dll
*.exe
*.o
*.so
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.log
*.sql
*.sqlite
.DS_Store
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.dbTo ignore specific files or folders, add them to the command. For example:
project-lines file1.js folder1/To ignore every file with a particular extension use the following syntax: (This excludes every json file)
project-lines ext.jsonIf there is a .gitignore file in the same directory that you run the command then that will also be used to calculate what files to ignore.
Project Stats
Display stats for a project.
project-stats [ignoreFiles]The stats the are produced include:
- Total line count
- Average line count
- Max line count including the file
- Min line count including the file
- Total files
- Total quantity of files by extension
- Percentage of project by file extension
By default project-stats ignores:
README.md
LICENSE
CHANGELOG.md
package.json
package-lock.json
.sass-lint.yml
.gitignore
.gcloudignore
.eslintrc
node_modules/
.git/
*.com
*.class
*.dll
*.exe
*.o
*.so
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.log
*.sql
*.sqlite
.DS_Store
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.dbTo ignore specific files or folders, add them to the command. For example:
project-lines file1.js folder1/To ignore every file with a particular extension use the following syntax: (This excludes every json file)
project-lines ext.jsonIf there is a .gitignore file in the same directory that you run the command then that will also be used to calculate what files to ignore.
License
See LICENSE file.