Skip to content

Usability of the NEAR CLI in scripting? #437

Open
@artob

Description

❓ What is the plan to make the CLI usable for scripting? Because as it stands currently, that seems rather difficult:

Invoking: near account view-account-summary near network-config testnet now

Image

Invoking: near account view-account-summary notfound network-config testnet now

Image

The specific difficulties encountered here are:

  1. The output structure (on stdout) is extremely verbose, clearly meant for humans only, and unstable over time
  2. There is spurious extra output being emitted (onto stderr), and there appear to be no CLI options to disable:
    • The "Here is your console command if you need to script it or re-run" tutorial output
    • The "Receiving an inquiry about your account" progress output
  3. There appears to be no CLI option (such as --quiet or --silent) for silencing all spurious output
  4. There appears to be no CLI option (such as --output json) for printing machine-readable output
  5. The error output (all on stderr) has intermixed into it progress output and tutorial output, and is also overly verbose
  6. The exit status in case of any error is an undifferentiated exit code 1, instead of something useful such as sysexits(3) exit codes

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status

    NEW❗

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions