This Vanadium application makes it possible to pipe anything from any Unix-like console to the browser using the shell's regular pipe functionality. Data being piped to the browser then is displayed in a graphical and formatted way by a viewer. Viewers are pluggable pieces of code that know how to handle and display a stream of data.
echo "Hi!" | p2b email@example.com/chrome/p2b/jane/console
cat cat.jpg | p2b firstname.lastname@example.org/chrome/p2b/jane/image
where email@example.com/chrome/p2b/jane is the object name where p2b service is running in the browser. The suffix console or image specifies what viewer should be used to display the data.
P2B supports several built-in plugins such as console, image viewer, log viewer, git status viewer and dev/null. Users can create their own plugins and plug them remotely as well.
Users can also redirect pipes of data to other instances of P2B.
Use of the Vanadium Security Model ensures that all data between the console and browser is encrypted and authorized.
Please see the help page inside the P2B application for detailed tutorials.
# build everything and start a web server at 8000 make start
Navigate to http://localhost:8000 and publish under a name such as ‘foo’ then setup a shell (bash) running with your Vanadium credentials:
and then run
p2b cli client, for instance:
# run a sample p2b command echo "Hello World" | go/bin/p2b users/<<email-address>>/chrome/p2b/foo/console
To stop simply Ctrl-C the console that started it