Skip to content

A unix based cli to simplify and streamline the creation and development process for CAVE apps

License

Notifications You must be signed in to change notification settings

MIT-CAVE/cave_cli

Repository files navigation

CAVE CLI

A unix based Command Line Interface (CLI) to streamline the creation and development process for cave_apps

Prerequisits for the CLI installation

Click your OS below for instructions on how to install the prerequisits for the CLI installation.

Ubuntu
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh
# Add the current user to the docker group
dockerd-rootless-setuptool.sh install
# Make sure it works outside of sudo
docker run hello-world
MacOs
  • Install Command Line Tools
    • Install XCode from the App Store
    • Once XCode is installed, install the XCode Command Line Tools
      • menu -> preferences -> downloads -> command line tools
  • Install Docker
Windows
  • Install docker desktop for wsl
  • Install wsl2 with ubuntu 22.04
  • Open your wsl ubuntu terminal and in that terminal:
    • Check docker:
      • docker run hello-world
      • docker --version
    • Install the cave cli:
      • bash -c "$(curl https://raw.githubusercontent.com/MIT-CAVE/cave_cli/main/install.sh)"
    • Optional: Configure git and ssh for wsl2 (since this is different from windows git)
      • Configure ssh credentials:
        • ssh-keygen -f ~/.ssh/id_rsa -t rsa -b 4096 -C [[email protected]](mailto:[email protected])
        • echo '# Add Git Profile' >> ~/.bashrc
        • echo 'eval $(ssh-agent -s) &>/dev/null' >> ~/.bashrc
        • echo 'ssh-add ~/.ssh/id_rsa &>/dev/null' >> ~/.bashrc
        • source ~/.bashrc
      • Show your credentials:
        • cat ~/.ssh/id_rsa.pub
      • Copy your credential up to github in your profile under ssh keys
    • Notes
      • You should be using Ubuntu 22.04
      • If you are using VS Code, you can easily open WSL based folders with the code command. For example, while in your project directory: code .

CLI Installation

# Install the CLI
bash -c "$(curl https://raw.githubusercontent.com/MIT-CAVE/cave_cli/main/install.sh)"
# Validate the installation succeeded
cave --version

CLI Functions

  • All current CLI functions can be listed with:

    cave --help
    
  • To create and run a new app:

    1. cave create my_app
    2. cd my_app
    3. cave run
    4. Open a browser to http://localhost:8000/

License Notice

Copyright 2023 Massachusetts Institute of Technology (MIT), Center for Transportation & Logistics (CTL)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

A unix based cli to simplify and streamline the creation and development process for CAVE apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages