I know that cleos is for communicating with nodeos which communicates with the EOS blockchain as a whole.
But what is keos in relation to those 2? Also is keos also packaged with nodeos and cleos?
keosd is the tool that manages the wallet: it stores and encrypts key pairs that
cleos uses to sign transactions before sending them to
The image below describes the workflow: user wants to make a transaction, they run a
cleos command to communicate what transaction they wish to perform;
cleos packs a properly formatted transaction according to the instructions; it fetches from
keosd the relevant keys that are required to sign the transaction (e.g. based on
-p flag); then it dispatches the signed transaction to
nodeos doesn't interact with
nodeos just expects properly signed transactions that it can verify with the public keys that are already stored in RAM for the relevant authorities.
Also is keos also packaged with nodeos and cleos?
Yes, but it is planned that in future versions those tools can be downloaded as independent binaries.