Download RPI Imager
During the installation:
- Select your RPI hardware version
- Select your OS (Ubuntu-Server recommended)
- Setup your wifi credentials
- Setup User and Password information (suggestion: pick a very simple password)
Then, launch the image build and wait for it to finish.
In the meantime, open your phone and download from the store:
- Termux
- Tailscale
Once done, setup your Tailscale account.
Your image should be ready to go. Insert the micro SD card in the RPI and power it on. You should see a flashing green light. It should take a few minutes to install.
Once the green light stops flashing, try connecting to your RPI on same WiFi to verify setup, run:
ssh user-name@pi-name
If it does not work try:
ssh user-name@pi-name.localssh user-name@pi-name.lan
Then enter your password, you should be connected to your RPI.
Run this command:
curl -sSL https://raw.githubusercontent.com/vienneraphael/remote-ship/main/setup.sh | bash -s -- -n "Your Name" -e "github-email@example.com"
Then run: gh auth login
Select “Github.com” > “SSH” > Select your SSH key > name your key > Login with a web browser
This should fail: open the URL on your computer browser and paste the code.
For each of the repos you wish to work in, clone it at RPI root:
git clone git@github.com:<your-handle>/<your-repo.git>
For each repo you clone, you can add an init script at ~/worktree_init/repo-name.sh.
Example for a repo cloned as ~/my-app:
~/worktree_init/my-app.sh
When ship creates a new worktree for that repo, it will run the matching init script inside the new tmux session before launching Codex. If the init script exits non-zero, ship leaves the session open and does not launch Codex.
Go to ChatGPT on your browser In ChatGPT settings > “Security” > “Enable device code authorization for Codex”
Run this command:
codex login --device-auth
Copy code, connect in your browser and paste it
On your RPI, launch background tailscale:
sudo tailscale up
If it fails, try logging in first:
sudo tailscale login
Then re-run: sudo tailscale up
Then follow the url, connect to your tailscale account. Once redirected, note the IP address of your RPI in the tailnet
To verify Tailscale installation, try pinging the RPI from your phone app.
Open Termux on your phone. Create an alias in .bashrc like so:
alias connect="ssh user-name@tailscale-rpi-ip"
Then run: source .bashrc
The setup script also installs:
tmuxgh@openai/codex- the
shipandunshiphelpers in~/.bash_functions
- Activate Tailscale VPN on your phone
- Open a Termux session
- launch the
connectcommand - Enter RPI password
- launch a thread using
ship <thread-name> <project-path> <base-branch> - Ship from your phone within termux
- Once done, go back to Termux, terminate codex session with CTRL + C and run
unship, it will automatically cleanup the worktree and tmux session.
Notes:
ship <thread-name> <project-path>also works and defaults the base branch tomain.ship <thread-name>works too if you are already inside the repo.-pcan be the repo path or.if you are already inside the repo.- Flag form still works:
ship -n <thread-name> -p <project-path> -b <base-branch>. - Worktrees are created under
~/worktrees/<repo-name>/<thread-name>. - Branches are created as
fly/<thread-name>. - If the base repo contains a
.env,shipcopies it into the new worktree and overwrites any existing.envthere.
If you want to open a second thread while one processes:
- quit the tmux session using Ctrl + B + D
- re-run
ship <name> <project-path> <base-branch>, then ship from there
To cleanup a thread from root, use unship <name>
Flag form still works: unship -n <name>.