remote-mole
remote-mole
is a CLI helper that sets up a bot that digs ngrok tunnels for you. The bots can be commanded via discord.
This way you can share a remote device with friends or colleagues, connecting to it via ssh
or hosting jupyter notebooks
there, and accessing them through an url in your browser.
How to install it (CLI-API)
Add a mole to your server!

Getting started
Installation
Install remote_mole
with:
pip install remote-mole
Setting up a mole
Well, for now, remote_mole
only supports Discord as the interface which you can command the bot. Therefore, before registering the mole you will need to create a Discord bot. Don’t worry! Is very easy following this documentation. From this you only will need the Discord bot token.
Just do:
remote_mole -register
And you will be prompted with questions about the type of mole that is going to live in your server. Most of them are super intuitive, but let’s get through them.

Discord bot token:
Here you need to write the token of the Discord bot. If you don’t have one yet, please read above!
To what keyword should the bot listen:
You will call your bot in discord by wring something like:
<your keyword> tunnel ssh
So basically, the prefix word of the commands, i use something like hey mole!
Do you want to set up a ngrok token (recommended)
Well, is recommended, so this docs also recommend you to press (Y). Beware, though it has nice benefits, you will need to accomplish an extra step.
ngrok token: This is the extra step, you will have to register to ngrok and search there for your authtoken.
ngrok region:
Just select the region closest to you and your server, for a better connection.
And it’s done! Your mole is registered. Feel free to start it with:
remote_mole -start
Add your bot to a Discord server
To add your bot to a server in Discord, visit this docs.
How to use ir (Discord API)
All the stuff a mole can do for you.
API
About tunnels
- tunnel(tunnel_type)
Digs a tunnel via ngrok, depending on tunnel_type
Usage:
tunnel tunnel_type
Creates a tunnel, and if such tunnel is already created just passes said open tunnel.
To know which tunnel types are supported use get_tunnel_types command.
- close_tunnel(tunnel_type)
Closes ngrok tunnel
Usage:
close_tunnel tunnel_type
Informational
- get_tunnel_types()
Gives info about tunnel types
- jupyter_advice()
Gives advice on sharing jupyter notebooks