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

[Proposal] Create a new IotDev CLI based on System.CommandLine #113

Closed
7 tasks
shaggygi opened this issue Dec 22, 2018 · 1 comment
Closed
7 tasks

[Proposal] Create a new IotDev CLI based on System.CommandLine #113

shaggygi opened this issue Dec 22, 2018 · 1 comment

Comments

@shaggygi
Copy link
Contributor

shaggygi commented Dec 22, 2018

Core Objective

If possible, I recommend we create a new console project called IotDev (short for IoT Device Development). The intention is to utilize the new System.CommandLine and deprecate DeviceApiTester at some point. IotDev can be stored at the same folder location and would enable to continue adding features to current DeviceApiTester while learning/adding to IotDev. This might be a good opportunity to "dog-food" and provide feedback to the System.CommandLine repo for bugs/features, as well.

Early notes about System.CommandLine

  • Wiki found here: https://github.com/dotnet/command-line-api/wiki
  • This, of course, is in the very early alpha stage. Seems to have potential, though.
  • I like the command > subcommand feature where you can have something like...
    iotdev i2c write [options]
    iotdev spi read -b 1 -c 4
    This appears to be much better how help info can be displayed while digging down to specific command level.
  • There is a nifty suggestions feature.
  • It also includes a [debug] directive for attaching.
  • There is a beginning app model codename DragonFruit to try out. Also noticed another called StarFruit (which might be similar to the current CLI package that uses attributes).

Random Thoughts

  • IMHO, IotDev seems like a better "branding" and flows better at the command line.
    DeviceApiTester script-run -f MyIotScript.csx
    versus...
    iotdev script run -f MyIotScript.csx

Future Work

There are a few things that will need to be completed. I'm sure there are other items I'm missing. Chime in.

  • Create and add an initial solution with bare projects as a starting point.

  • Determine the approach how each area should be tested. This would go in the IotDev.Tests project, of course. Also might be a good exercise to see how to mock interfaces.

  • Setup any CI/CD infrastructure components needed for repo. Not my expertise 😕

  • Setup a NuGet package.

    This will be helpful to support an IotDev Global Tool which makes it easy to install on development boards.

  • Determine structure of commands and best approach utilizing System.CommandLine.

  • Migrate commands already defined in DeviceApiTester

  • Create README with details on usage.

@shaggygi shaggygi changed the title Should DeviceApiTester be migrated to dotnet/command-line-api [Proposal] Create a new IotDev CLI based on System.CommandLine Dec 23, 2018
@shaggygi
Copy link
Contributor Author

shaggygi commented Jan 7, 2019

No plans do so for now. I will continue to review progress/features of System.CommandLine and add thoughts here for possible future use. Closing for now.

@shaggygi shaggygi closed this as completed Jan 7, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Oct 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant