atsign-foundation / at_c

Experimental cross-platform C implementation of the atSDK for SOC & embedded devices
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

Example ideas: atcat & attee #222

Open XavierChanth opened 4 weeks ago

XavierChanth commented 4 weeks ago

Let's not just build examples, let's use this time to build cool and practical tools which not only demonstrate the feature we want to show, but also how to use the feature in a useful setting.

atcat would be similar to cat, but instead of taking a file name, it would take a <key>@<atsign> string. The key would become a selfkey, where the namespace is automatically added: e.g. <key>.cli_files@<atsign> and then it would get that key and spit the contents out to stdout.

attee would be similar to tee, but instead of taking a file name, it would take a <key>@<atsign> string. The key would become a selfkey, where the namespace is automatically added: e.g. <key>.cli_files@<atsign> and then it would take the contents from the inbound pipe, wait for the pipe to close (I guess, what else can you do to avoid writing multiple keys), write the contents to the atkey & back to stdout.

I would find myself using these alot, and they are better / cooler examples than just put/get. (Open to namespace suggestions, I was thinking either: atfiles, atcoreutils, cli_files, or something else)

Addon features: attee could also take a -r <atsign list> which could be additional receivers. atcat could also take a -s <atsign> to specify the sender to use, or a --ls to list senders.

XavierChanth commented 4 weeks ago

@cconstab what do you think? This might actually be a good way to transfer ssh keys and similar things to noports devices for sysadmins

cconstab commented 4 weeks ago

We need to go through every Unix tool and 'at' them..

attalk was the modeled on talk

cconstab commented 4 weeks ago

BTW you can pipe into atTalk so half of this idea is done already😁

JeremyTubongbanua commented 2 weeks ago

And atscp