Open
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](https://private-user-images.githubusercontent.com/4963/404571957-74fe9b77-f13a-4b1b-85fd-ac59626e60c0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MjQxODMsIm5iZiI6MTczOTYyMzg4MywicGF0aCI6Ii80OTYzLzQwNDU3MTk1Ny03NGZlOWI3Ny1mMTNhLTRiMWItODVmZC1hYzU5NjI2ZTYwYzAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTVUMTI1MTIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Mzc0ZmI2NmRkY2ZlMTUxYjFkMzQ0NGExOGQ2ODI1OGIzMzc5Yjc4YzJhODIxOTNmOTcxYzYzOTViOGQwZDA1MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.MMQtd-VC26xeOuNdsx-yZCvayGZEe77KVPj5_o8us3Q)
Invoking: near account view-account-summary notfound network-config testnet now
![Image](https://private-user-images.githubusercontent.com/4963/404571967-77412885-e591-4a8e-948e-8233b543be91.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MjQxODMsIm5iZiI6MTczOTYyMzg4MywicGF0aCI6Ii80OTYzLzQwNDU3MTk2Ny03NzQxMjg4NS1lNTkxLTRhOGUtOTQ4ZS04MjMzYjU0M2JlOTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTVUMTI1MTIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzE0Y2YxNGU2ODEyYjc3Yzg4MDU5NjExYmNmODllZjdhY2VkMzlmMDEwZWU5NTcxMDQ4Y2UyMmNiYzEwZjVjZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.kaoNC2CwuP9T3xUQfZXTeVJYyx1TnGqy_PrdEmYlq6M)
The specific difficulties encountered here are:
- The output structure (on stdout) is extremely verbose, clearly meant for humans only, and unstable over time
- 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
- There appears to be no CLI option (such as
--quiet
or--silent
) for silencing all spurious output - There appears to be no CLI option (such as
--output json
) for printing machine-readable output - The error output (all on stderr) has intermixed into it progress output and tutorial output, and is also overly verbose
- The exit status in case of any error is an undifferentiated exit code 1, instead of something useful such as sysexits(3) exit codes