question-mark
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.

Document CLI design guidelines

See original GitHub issue

Similar to https://docs.meltano.com/contribute/api#api-v2-design-guidelines we should have clearly defined guidelines for creating/updating the meltano cli. How to structure, organize, and even name new CLI additions is a frequent source of contention and a stumbling block during iterations and builds.

I think it’s worth calling out that it’s OK that our CLI’s inconsistent right now, and not all meltano commands will follow this style guide immediately. However, I think we need a guide in place (even if it’s an aspirational one) moving forward so that we can start aiming for a consistent CLI experience for users, and to have a consistent UX style guide in place during feature planning.

This doc should cover:

  • Desired verb/command linkage and structure
  • Expected common sub-command’s and options
  • Expected common output formats
  • Use of short and long flags
  • Abbreviations
  • Global vs argument level flags
  • Reusing short flags
  • Flag aliases
  • Consistent definition of Groups, Commands, Sub-commands, Arguments, and Options
  • Expected help and usage
  • Doc style guidelines for how to style examples and usage of:
    • Optional arguments/options/flags
    • Required items
    • Mutually exclusive args
    • Arguments that can repeat
  • What belongs the cli module (i.e.meltano/cli/the_command.py) and what belongs in meltano.core.
  • Phrasing guidelines for command Deprecation and Preview/Beta commands.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
pandemicsyncommented, Jul 18, 2022

@tayloramurphy I was thinking sending along a PR and then letting y’all edit/bikeshed it during the review might be easiest. Since it would let folks thread on the actual things in question.

Quick edit to follow up on that, i’d probably use schedule and jobs since I’d hope those additions (and refactor in the case of schedule) would be good jump of points , at least for the general structure/layout - since we did those relatively recently.

2reactions
pandemicsyncommented, Jul 18, 2022

Do you have a preference on discussing the spec here or in a specific PR? Similar to what you did for the API discussion I think coming out with a strong proposal will get us 90% of the way there and we can bikeshed over a few points.

@tayloramurphy I was thinking sending along a PR and then letting y’all edit/bikeshed it during the review might be easiest. Since it would let folks thread on the actual things in question.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command Line Interface Guidelines
An open-source guide to help you write better command-line programs, ... This document covers both high-level design philosophy, and concrete guidelines.
Read more >
10 design principles for delightful CLIs - Atlassian Developer ...
10 design principles for delightful CLIs · 1. Align with established conventions · 2. Build --help into the CLI · 3. Show progress...
Read more >
Command Line Interface Guidelines - GitHub
A guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day.
Read more >
CLI Guidelines – A guide to help you write better command ...
On this search I found a superb blog post by Carl about CLI naming [1]. He must be the only person in the...
Read more >
Guidelines for creating your own CLI tool - Medium
Guidelines for creating your own CLI tool · Example of Git's CLI · Distribute the tool as a single file with no dependencies...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found