astro icon indicating copy to clipboard operation
astro copied to clipboard

Feature/add cli

Open OmgImAlexis opened this issue 7 years ago • 2 comments

This will need to be rebased before I merge it.

  • [ ] All tests passed

Environment

  • OS:
  • Node version:

OmgImAlexis avatar Jun 07 '17 05:06 OmgImAlexis

@aidanharris can you give this a test please. To run use ./cli.js --help. I'm not 100% sure on doing it this way.

Edit: You'll likely need to run yarn build before the cli will work as I haven't pushed any of the build files yet.

OmgImAlexis avatar Jun 07 '17 05:06 OmgImAlexis

The cli seems to be working okay but it doesn't pipe the logs to bunyan and the webserver port option isn't obeyed (not sure if this is a bug or just something that needs to be implemented seperately).

Just a suggestion:

The options could get a bit cluttered over time so instead of listing them all, split the cli into different commands perhaps something like this?

Usage
    $ astro [input]

Commands
    background                  Background importing
    webserver                   Webserver and api

Background
    start                       Start background daemon
    stop                        Stop background daemon
    --only [provider]           Only import from [provider]
    --providers=[providers]     Only import from [providers]        
Webserver
    start                       Start background daemon
    stop                        Stop background daemon
    --port                      Port for webserver [Requires: --webserver]
    --api-port                  Changes API from /api to / with this port
Options
     --help                     Show this help text
     --log                      Choose logging output [Default: bunyan]

aidanharris avatar Jun 10 '17 18:06 aidanharris