Deep-Learning-Playground icon indicating copy to clipboard operation
Deep-Learning-Playground copied to clipboard

[FEATURE]: Unified CLI between Frontend and Backend with Go + Cobra

Open dwu359 opened this issue 2 years ago • 5 comments

Feature Name

Unified CLI between Frontend and Backend with Go + Cobra

Your Name

Daniel Wu

Description

The project has grown large enough that there are several commands with yarn, python, aws, docker, sst, etc that are important to the project but may be difficult to remember at times. Instead, we can build our own CLI to call these commands for us. We currently use yarn scripts to do this, but then we are limited to bash and it is clunky to add parameter inputs. A popular way of building a CLI is with Go and Cobra, although if there are better ways, we can explore that too.

Some commands that we should include in the CLI: start backend (starts the backend in development mode, defaults to port 8000 but can add custom --port flag, can also add --prod to start the backend in production mode) start frontend (starts the frontend in development mode, defaults to port 3000 but can add --port and --prod as well) start serverless (starts SST in development mode) deploy backend, deploy frontend, deploy serverless get id-token {email} (gets a bearer token from firebase given an email) get uid {email} (gets a uid from firebase given a uid) doctor (similar to flutter's flutter doctor, helps new members setup their environment, detects if they have node, yarn, poetry, AWS CLI, pyenv, gitkraken, nvm, docker, postman installed, if they have their aws credentials set up, if they have their env files configured properly, etc)

dwu359 avatar Aug 21 '23 03:08 dwu359

Hello @dwu359! Thank you for submitting the Feature Request Form. We appreciate your contribution. :wave:

We will look into it and provide a response as soon as possible.

To work on this feature request, you can follow these branch setup instructions:

  1. Checkout the main branch:
```
 git checkout nextjs
```
  1. Pull the latest changes from the remote main branch:
```
 git pull origin nextjs
```
  1. Create a new branch specific to this feature request using the issue number:
```
 git checkout -b feature-919
```

Feel free to make the necessary changes in this branch and submit a pull request when you're ready.

Best regards, Deep Learning Playground (DLP) Team

github-actions[bot] avatar Aug 21 '23 03:08 github-actions[bot]

@dwu359 status?

karkir0003 avatar Aug 31 '23 01:08 karkir0003

All start, get, install, add, and remove cmds have been added. I'll probably look into implementing the doctor cmd next

dwu359 avatar Aug 31 '23 01:08 dwu359

@dwu359 is this issue something we can mark as done since we rolled out dlp-cli and we just have to add features/maintain it?

karkir0003 avatar Dec 03 '23 19:12 karkir0003

@dwu359 status update here?

karkir0003 avatar Dec 28 '23 22:12 karkir0003