Clive Updates - execute Clive commands via an external bash shell script

Authored by @itsola

We have completed three topics for this release. The first feature - important for some of you - is the ability to execute Clive commands as a bash shell script. The remaining topics are continuations of previous work - we added validations for exchanges (in the CLI and when loading transactions from a file) and updated several views to improve their appearance and consistency: loading from a file (key or transaction), saving transaction to a file, adding or editing aliases.

Clive commands as a bash script

You can run your script containing Clive commands using the --exec option. If your script includes logic that requires a password, for example to unlock or create a profile, you can provide it via a pipe passed to start_clive_cli.sh.
The script that launches Clive prepares the environment, but if you want to execute commands in unlocked mode, you still need to unlock a profile by placing a clive unlock --profile <name> command in your script.

Example of the script

I prepared the script my_script.sh. The script unlocks the profile alice and broadcasts the transfer to guest4test8 signing with alice_key.

#!/bin/bash

echo "Unlocking wallet for profile 'alice'..."
clive unlock --profile-name=alice 

echo "Transfer to guest4test8..."
clive process transfer --to guest4test8 --amount "0.001 hive" --sign alice_key

How to run a script

You can run your script using the following syntax:

echo alicealice | ./start_clive_cli.sh --exec ./my_script.sh

Of course you can provide a password in a safer and more convenient way, using a file or a bash environment variable.

If you want to use an environment variable:

export PASS=alicealice
echo  "${PASS}" | ./start_clive_cli.sh --exec ./my_script.sh`

If you want to use a file to provide a password:

echo alicealice > pass.txt
cat pass.txt | ./start_clive_cli.sh --exec ./my_script.sh`

After executing the above command, the transfer is broadcast.
image1.png

Validation related to exchanges

This is the final part of the changes related to checking operation receivers. We have already implemented the known account feature and validation against the bad accounts, both available in the CLI and the TUI. In this release we have added the remaining validations related to exchanges.
The validation checks whether the receiver account is an account belonging to one of the five most popular exchanges. The following accounts are checked:

Account nameEntity
bdhivesteemBinance
deepcrypto8Binance
huobi-proHTX
user.dunamuUpbit
mxchivemexc

There are different validations for transfers and for other financial operations.

Validations for transfer

The transfer to an exchange should be in Hive and must include a memo. These conditions are checked in both the CLI and in the TUI.

Example: Transfer in the CLI
It is not possible to send transfers to exchanges without a memo or in HBD.

image2.png

Example: Transfer in the TUI
Here is an example of how it looks in the TUI. If the user enters an exchange as the receiver, it is not possible to switch currency and a memo is required. There is also a placeholder indicating that the user should check what should be entered in the memo.

image9.png

Validations for other financial operations

If one of the exchange accounts is set as the receiver of any financial operation other than transfer (transfer to savings, transfer from savings, recurrent transfer, power up, set delegations and set withdrawal routes), an error message appears. The validation may be bypassed by using the --force flag in the CLI or by confirming the dialog in the TUI.

Example:
Trying to send savings to an exchange account in the CLI.

image8.png

Example:
In the TUI, if the user wants to send savings to an exchange account, additional confirmation is required.

image7.png

Validations during loading the transaction from a file

The same validations as described above are executed during saving a transaction to a file or during loading the transaction from a file.

Example:
Validation triggered when loading a transaction that contains a transfer to an exchange without a memo.

CLI:

image5.png

TUI:

image3.png

Example:
Validation triggered when loading a transaction that contains an example of financial operation (transfer from savings) to an exchange without a memo.

CLI:
image4.png

TUI:
image6.png

New dialogs

To make Clive look more consistent, we have updated several views:

  • Add a new alias
  • Edit alias
  • Load transaction from a file
  • Load key from a file
  • Save transaction to a file
  • These views are displayed as dialog windows with buttons.

Below is an example of the new dialog window for adding a new alias.

image10.png

Complete list of corrected issues

The scripts that allow you to run Clive are here:
https://gtg.openhive.network/get/clive/

TL;DR

docker run -ti hiveio/clive:v1.27.11.3

Your feedback is invaluable and always welcome.



0
0
0.000

6 comments

Bash script execution! 🔥 Automating Clive commands just got a whole lot easier. Nice work on the file loading updates too! 🐎

0
0
0.000

Wow, love this post It’s been handpicked and curated by the awesome Bilpcoin team—we’re so happy to support amazing content like this! If you’d like to join us in spreading the positivity, feel free to delegate some Hive Power to this account. Every bit helps us curate and uplift even more creators in the community By adding #bilpcoin or #bpc to original posts, you can earn BPC tokens
https://hive.blog/hive-167922/@bpcvoter2/calling-all-music-artists-on-hive-elevate-your-sound-with-ai-infused-beats

By adding #bilpcoin or #bpc to original posts, you can earn BPC tokens

https://peakd.com/hive-140084/@bpcvoter1/my-way-keni-bpc-ai-music

https://peakd.com/hive-126152/@bpcvoter2/dear-themarkymark-buildawhale-gogreenbuddy-usainvote-ipromote-and-whoever-else-is-involved-in-this-scheme-you-call-us-nutty-as

https://peakd.com/hive-167922/@bilpcoinbpc/exploring-the-possibilities-of-ai-art-with-bilpcoin-nfts-episode-102-buildawhale-scam-farm-on-hive-and-dear-steevc

https://peakd.com/hive-133987/@bilpcoinbpc/comprehensive-analysis-of-punkteam-s-wallet-transactions

https://hive.blog/hive-163521/@bpcvoter1/deep-dive-into-meritocracy-s-activity-history-and-blockchain-audit

https://www.publish0x.com/the-dark-side-of-hive/to-downvoters-scammers-and-farmers-on-hive-the-time-to-chang-xmjzrmp

https://peakd.com/hive-163521/@bpcvoter3/themarkymark-we-ve-exposed-your-actions-repeatedly-how-you-and-your-army-of-bots-manipulate-rewards-to-benefit-yourselves-it-s

https://peakd.com/hive-168088/@bpcvoter3/the-shadow-matrix-a-tale-of-deceit-and-reckoning

Our move?
🔹 Unite voices: Use #bilpcoin or #bpc to highlight censorship & demand accountability.
🔹 Document abuse: Share evidence of unfair downvotes, self-voting scams, and double standards.
🔹 Push for reform: Advocate for transparent governance, vote caps, and community-driven rules.

Decentralization isn’t just a feature—it’s a fight. Let’s model fairness, rally allies, and pressure Hive to live up to its ideals.
https://peakd.com/hive-167922/@bpcvoter3/5m1kft-themarkymark-you-can-keep-pretending-to-be-oblivious-but-the-truth-is-out-you-ve-been-exposed-it-s-time-to-own-up-to-your

#StandForDecentralization #HiveTransparency

0
0
0.000

Hello thebeedevs!

It's nice to let you know that your article won 🥇 place.
Your post is among the best articles voted 7 days ago by the @hive-lu | King Lucoin Curator by keithtaylor

You and your curator receive 0.0004 Lu (Lucoin) investment token and a 20.66% share of the reward from Daily Report 693. Additionally, you can also receive a unique LUGOLD token for taking 1st place. All you need to do is reblog this report of the day with your winnings.

2.png


Invest in the Lu token (Lucoin) and get paid. With 50 Lu in your wallet, you also become the curator of the @hive-lu which follows your upvote.
Buy Lu on the Hive-Engine exchange | World of Lu created by @szejq

If you no longer want to receive notifications, reply to this comment with the word STOP or to resume write a word START

0
0
0.000

Congratulations @thebeedevs! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You received more than 5000 HP as payout for your posts, comments and curation.
Your next payout target is 6000 HP.
The unit is Hive Power equivalent because post and comment rewards can be split into HP and HBD

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

0
0
0.000

Congratulations @thebeedevs! Your post has been a top performer on the Hive blockchain and you have been rewarded with this rare badge

Post with the highest payout of the day.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

0
0
0.000

Why would a normal user need these Clive commands?

0
0
0.000