Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Seeking input on the redesign of the command-line interface

See original GitHub issue

The current CLI just offers command-line parameters for the operation to be executed, for instance, -import, -export or -kmlExport. All further settings such as database connection details or export filters must be provided in an external config file.

We want to redesign the CLI. The main goal is to provide more command-line parameters to be able to trigger default operations without the need for an additional config file. This should help to simplify the use of the CLI. Another goal is to allow plugins to programmatically extend the CLI with new operations.

Some initial thoughts:

  • each operation is mapped to a separate command with its own parameters
  • some global parameters are available for all commands, such as database connection details or logging settings
  • a plugin can register its own additional command

For example, invoking a CityGML export using a bbox filter could look like this:

> impexp export --db-host=localhost --db-name=citydb --db-user=user --bbox=1,2,3,4 my_citygml_file.gml

Well, it’s obvious that we cannot map every option from the Importer/Exporter preferences to a command-line parameter. So, it must still be possible to provide a config file for these settings. But it should be optional and if omitted, default values should be chosen instead.

Which parameters would you like to see for the CLI? For example, is a --bbox parameter for a CityGML export like in the above example sufficient or do you also need more parameters to specify the bbox mode (overlap, inside), the CRS used for the bbox, or even a tiling based on the provided bbox?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:33 (33 by maintainers)

github_iconTop GitHub Comments

clausnagelcommented, Dec 10, 2020

Thanks and kudos to all involved in the discussion and development of the new command-line interface. It has been merged to master in the meantime (#147, #151) and will be available with the next release.

Son-HNguyencommented, Nov 16, 2020

Yes I thought the same, [altitude_options] and [balloon_options] are currently not as prioritized. Wanted to not include them in my post but for the sake of completeness, I just went ahead and post them. 😉

I agree with waiting for the review first. Hopefully I can the find the time in the next days to review it also.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A few suggestions for creating command line interfaces
A few suggestions for creating command line interfaces · 1. Keep the backward compatibility of CLI as much as possible · 2. Human-first:...
Read more >
Command Line Interface Guidelines
An open-source guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day.
Read more >
Ch 9 - The Command Line Interface Flashcards - Quizlet
a command line interface launched from within Windows or from a recovery environment -only accepts and creates text output/input. Tap the card to...
Read more >
Building the future of the command line - GitHub
One reason for the enduring popularity of the command line is that it's far easier to write a CLI application than a GUI...
Read more >
How To Create Interactive Command-line Prompts with ...
Learn how to add interactive command-line prompts to your Node.js scripts using the Inquirer.js npm package.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found