A unix based Command Line Interface (CLI) to streamline the creation and development process for cave_apps
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-worldMacOs
- Install
Command Line Tools- Install
XCodefrom theApp Store - Once
XCodeis installed, install the XCodeCommand Line Toolsmenu->preferences->downloads->command line tools
- Install
- 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-worlddocker --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 [youremail@gmail.com](mailto:youremail@gmail.com)echo '# Add Git Profile' >> ~/.bashrcecho 'eval $(ssh-agent -s) &>/dev/null' >> ~/.bashrcecho 'ssh-add ~/.ssh/id_rsa &>/dev/null' >> ~/.bashrcsource ~/.bashrc
- Show your credentials:
cat ~/.ssh/id_rsa.pub
- Copy your credential up to github in your profile under ssh keys
- Configure ssh credentials:
- Notes
- You should be using Ubuntu 22.04
- If you are using VS Code, you can easily open WSL based folders with the
codecommand. For example, while in your project directory:code .
- Check docker:
# Install the CLI
bash -c "$(curl https://raw.githubusercontent.com/MIT-CAVE/cave_cli/main/install.sh)"# Validate the installation succeeded
cave --version-
All current CLI functions can be listed with:
cave --help -
To create and run a new app:
cave create my_appcd my_appcave run- Open a browser to
http://localhost:8000/
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.