phrase-cli icon indicating copy to clipboard operation
phrase-cli copied to clipboard

Inconsistencies in CLI Commands and Arguments

Open horstmannmat opened this issue 2 years ago • 1 comments

Description

There are several inconsistencies in the CLI commands and their corresponding arguments in the provided documentation. These inconsistencies have led me to confusion and errors when attempting to use the CLI tool.

This issue aims to address these inconsistencies and potentially others that might exist and to offer my assistance either by contributing to the documentation or by helping with the necessary code changes.

Affected Commands and Arguments

Command: gitlab_syncs (Documentation Link)

  • Incorrect Command: gitlab_syncs
  • Corrected Command: git_lab_sync
phrase gitlab_syncs show --id $GITLAB_SYNC_ID  --account_id $PHRASE_ACCOUNT_ID
Error: unknown command "gitlab_syncs" for "phrase"

Did you mean this?
        git_lab_sync

--account_id Argument

  • Inconsistency: In some commands, the account ID is specified as --account_id abcd1234, while in others, it's provided as --data '{"account_id":"abcd1234"}'.
  • Proposed Solution: Standardise the usage of the account ID argument by consistently using the format --account_id abcd1234.

Commands: import and history

  • Inconsistency: The argument for GitLabSync ID is specified as --gitlab_sync_id for the import and history commands, but in the show command, it is referenced as --id.
  • Proposed Solution: Use a uniform argument name for GitLabSync ID across all commands, such as --gitlab_sync_id.

horstmannmat avatar Aug 08 '23 15:08 horstmannmat

Hi @horstmannmat, thanks for raising this. These are really good points. We also have some plans to align these commands and make it more consistent and usable. As a first step I'll fix the documentation for the command

theSoenke avatar Nov 03 '23 12:11 theSoenke

Hi @horstmannmat, we've now released the new repo syncs endpoint to manage all Git Syncs: https://developers.phrase.com/api/#get-/accounts/-account_id-/repo_syncs For all those commands the params should be --account_id and --id

theSoenke avatar May 31 '24 15:05 theSoenke