near/near-cli-rs

Option to run non-interactive cli

elliotBraem opened this issue · 2 comments

One of the best things about this tool is it's interactivity -- however, without the option to disable it, this interactivity can cause issue in non-interactive containers.

For example, attempting to use near config add-connection --network-name mainnet --connection-name mainnet --rpc-url https://rpc.mainnet.near.org/ --wallet-url https://app.mynearwallet.com/ --explorer-transaction-url https://nearblocks.io/txns/ (which holds all of the information I want to provide) asks me several questions that cause The input device is not a TTY errors in my container (git workflow).

If you see the screenshot below, I don't think any of these questions needed my explicit answers and could have been assumed/ignored.

Screenshot 2024-02-21 at 12 15 51 PM

I think this could be solved with a --non-interactive flag

Yeah, config subcommand needs some love. Just to mention a workaround here, you can just write the config file directly to the config.toml file under the config directory

@elliotBraem By the way, archival-rpc nodes are back to normal operation.