Non-REPL Libra CLI

From reading the docs on the CLI (https://developers.libra.org/docs/reference/libra-cli), it’s not clear to me if it’s possible to use the Libra CLI in a non-REPL mode.

I’m looking to be able to issue a command and get a return value on STDOUT in one invocation on the command line. Is that possible? If not, is it in the pipeline?

1 Like

You should be able to pipe a command string directly to the client, something like this:
echo “a c” | ./client <client_args>

Look at ./scripts/cli/start_cli_testnet.sh to see what the args look like.

You should be able to run this to get a client binary: cargo build -p client

Hope this helps, let me know if you have any other questions!

1 Like

Ok great thanks Brett, we’ll give it a go