Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an Ottoman CLI #702

Open
ejscribner opened this issue Jan 13, 2023 · 1 comment
Open

Create an Ottoman CLI #702

ejscribner opened this issue Jan 13, 2023 · 1 comment
Labels
enhancement Investigation Determine next steps P2 Important to Have
Projects

Comments

@ejscribner
Copy link
Collaborator

A CLI for Ottoman.js to improve developer experience. The CLI could handle:

  • project scaffolding using ottoman using some templates for languages like js and ts also for frameworks like express, nest, feather, fastify, ...
  • handle migrations and/or database structure update (this point is very important because we can get rip of the start function and avoid executing it every time the ottoman app start)
  • create files like models and/or schema. (ottoman-cli create user -> generate userSchema and userModels classes files with minimal setup)

...many other features can be added to the CLI as well.

@ejscribner ejscribner created this issue from a note in Ottoman (To do) Jan 13, 2023
@ejscribner ejscribner added enhancement P2 Important to Have backlog Untriaged Backlog Investigation Determine next steps and removed backlog Untriaged Backlog labels Jan 13, 2023
@ejscribner ejscribner moved this from To do to In progress in Ottoman Feb 7, 2023
@gsi-alejandro
Copy link
Collaborator

gsi-alejandro commented Feb 14, 2023

Requirements:

  • Git repository

Result:

  • A CLI application deployed on NPM (Node Package Manager Repository)
  • A git repository with source code
  • A readme file with instruction to install and usage.

Syntax:

  • ottoman-cli init
  • ottoman-cli init --output=ottoman

Commands:

  • init: Initialize a new project using ottoman. The init command will use many templates for popular node solutions
    Templates: express, nestjs, typescript, only javascript, ...
  • migrate: Similar to the logic of the ottoman.start method, the migrate command will attempt to create scopes, collections, and indices defined in the models and schemas. (This approach to managing the creation of scopes, collections and indexes is better and should be the way to go, I suggest removing the start method in the future in favor of the CLI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Investigation Determine next steps P2 Important to Have
Projects
No open projects
Ottoman
  
In progress
Development

No branches or pull requests

2 participants