Use on Mobile via GitHub Codespaces
In order to use Companion on your mobile device, you can use GitHub Codespaces as your server. For this, you'll need to have a GitHub account. It is also recommended to first install and launch Companion locally on your computer, to make sure all required services are configured correctly.
Setting up your GitHub Codespace
- Create a new Codespace
- Select
shakedzy/companion
as the repository - Select
main
as the branch - You can use the smallest machine (2 cores)
- Got to your Codespace, and wait for it to finish initialization
- In the terminal, run:
- When the script ends, open a new terminal (from the menu on the left) and run:
- Add your
OPENAI_API_KEY
as a secret. Remember to name itOPENAI_API_KEY
. This will restart your Codespace. - When your Codespace relaunches, run:
You can shut down your Codespace when you're done, and relaunch it when you want to use Companion again.
When you relaunch it, all you'll need to run is
python companion.py
.
Make Port 5000 Public
Connection to the service seems to work faster when port 5000 (the one used by this app)
is made public. You'll be given the option to do so as soon as the app launches on your Codespace,
or you can change the port visibility on the Ports tab.
Note this means that anyone with a link to your Codespace will be able to access you running app.
Using Companion From Your Mobile
- Once your Companion is running on your Codespace, got to the Ports tab. You should see port 5000 is open.
- Copy-paste its URL, and access it from your mobile browser.
Mobile UI