tree: 963e4556a354cf16bdec0f5962f4c6a5c73eb93a [path history] [tgz]
  1. browser/
  2. go/
  3. .gitignore
  4. AUTHORS
  5. CONTRIBUTORS
  6. LICENSE
  7. Makefile
  8. package.json
  9. PATENTS
  10. README.md
  11. shell.sh
  12. VERSION
README.md

Pipe2Browser

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.

For example:

echo "Hi!" | p2b users/jane@google.com/chrome/p2b/jane/console

or

cat cat.jpg | p2b users/jane@google.com/chrome/p2b/jane/image

where users/jane@google.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.

Building and Running

# 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:

make shell

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

To clean make clean