Documentation
Toto is early. This describes how it works today. Where something is missing or unproven, it says so.
What you need
- A Raspberry Pi 4 or 5 with 4GB of memory or more, or another 64-bit machine running Debian. Toto has run on a Pi 4 and on an ordinary PC.
- An Android phone for the app, which is not in a store yet: each release has it as a file to install directly,
toto.apk. An iPhone build is in progress and less tested. - A Claude subscription, or an Anthropic API key.
Installing
On a Raspberry Pi, from the image
The image is the smallest official Raspberry Pi OS with Toto already on it. Download the latest image, flash it to a card with Raspberry Pi Imager (Choose OS, then Use custom), put the card in the Pi and plug it in. There is no login to set up: on first start it gives itself a name and a key and waits to be found by your phone.
On a machine you already have
On 64-bit Debian or Raspberry Pi OS:
git clone https://github.com/royletron/toto cd toto sudo ./install.sh
It installs Node, Claude Code and Toto, sets Toto up as a service, and prints the address and token to give the app. It is safe to run again to upgrade.
In Docker
The same server as an image, for any machine that runs Docker, on x86 or ARM. It is the server only: the relay is a separate thing, and Toto uses the public one unless you say otherwise. With no Bluetooth to hand it over, it shows you how to add it instead.
docker run -it --name toto --cap-add NET_ADMIN \ -v toto-data:/var/lib/toto -v toto-home:/home \ -e TOTO_ADDRESS=192.168.1.20:7860 -p 7860:7860 \ ghcr.io/royletron/toto
It prints the address, the token and a QR code. Point the phone's camera at the code and it opens the app and adds the Toto; or choose Enter an address and token and type them. To see it again later: docker exec -it toto toto login. It is shown only to a terminal (-it), because a log keeps what it is given; set TOTO_SHOW_LOGIN=1 if you want it in the log anyway.
- Two volumes.
/var/lib/totoholds its state, token and keys, and/homeholds your projects. Without them everything is lost when the container is. - Isolation. As on a Pi, each project is a Linux user of its own, and its agents are kept off your home network by a firewall inside the container. That needs
--cap-add NET_ADMIN. If you wall the network off some other way, such as a Docker network with no route to your LAN, setTOTO_NO_FIREWALL=1to say so. - Its address. From inside, the container cannot know the address your phone reaches it at. Tell it with
TOTO_ADDRESS=host:portso the code carries it. Leave it out and the phone reaches it through the relay only. - The relay. On by default.
-e TOTO_RELAY_URL=(empty) turns it off, and awss://address uses your own. - Name and keys.
TOTO_NAMEnames it.TOTO_TOKENbrings your own token, andANTHROPIC_API_KEYorCLAUDE_CODE_OAUTH_TOKENsigns it in to Claude, though you can do that from the app. - Updating. A container is updated by pulling a newer image and starting it again on the same volumes. The app says so in settings, and has no update button for it. Project users are made again from their files.
Setting up from your phone
Over Bluetooth
A Toto that has no owner announces itself over Bluetooth. In the app choose Find a new Toto nearby. The app connects, shows you the Wi‑Fi networks the Toto can see, and sends it the one you pick with its password. Then it collects the Toto's keys and adds it. You type nothing but the Wi‑Fi password.
Once a Toto has an owner it stops announcing itself. To add another phone, open settings on the phone that set it up and choose Share with another phone under Phones. It shows a code for the other phone's camera, and that phone gets a key of its own, which you can take away again from the same list. Under each phone you can also choose what it sees: every project, new ones included, or only the ones you tick, with any project added later hidden until you tick it. And you can pause it, so it can follow along but not send messages, answer agents, start anything or change anything. The Toto enforces both itself, whatever the other phone's app does. To move a Toto to a new network, open pairing mode at the device. A Toto that loses its network for a minute also starts announcing again, but then only a phone that already holds its key can talk to it.
By address and token
A machine with no Bluetooth is added by hand: its address, such as ws://192.168.1.20:7860, and the token the installer printed.
In a browser
Toto also runs in a browser, at toto.royletron.dev/app. The page shows a code. Point the camera of a phone that set a Toto up at it, confirm on the phone, and the browser is let in with a key of its own. It is listed with your other phones, and removed the same way.
A browser reaches a Toto through the relay only, never directly, because a secure page may not open a plain connection to a device on your network. Its key is kept in that browser's storage for the site, so use it on a computer you trust. Setting up a new Toto still needs the phone app.
More than one
The app keeps a list of your Totos and shows which are online. Each has a name, which lives on the device, so renaming it on one phone renames it on all of them.
Signing in to Claude
Until a Toto is signed in, the app says so above your projects. Tap it, then Sign in with Claude. Your browser opens a Claude page asking you to approve; it ends by showing a code. Copy it, come back, paste it. The sign-in lasts a year and uses your plan's allowance.
Under the bonnet the Toto is running Claude Code's own sign-in and the app is passing the link and the code between it and you. The token it produces stays on the Toto.
Or choose Use an API key instead and paste a key from the Anthropic console. It is tried before it is kept.
Projects and agents
A project is a git repository cloned onto the Toto. Each project gets its own Linux user, so agents in one cannot read another's files or credentials.
- Private repositories. Each Toto has an SSH key, shown under settings. Add it to your git host and use the repository's SSH address.
- Commit author. Set the name and email agents commit under, in settings.
- Own branch. By default each agent works in its own checkout on its own branch, so several can work in one project without colliding.
- Asks, or full auto. An agent that asks stops before anything risky and waits for you. One on full auto does not. You can switch at any point.
- Agents talking to each other. Agents are kept apart, so none can reach another until you connect them: open an agent and tap ⇄, then choose for each other agent whether they may ask each other questions, or questions and work. It is one connection between two agents, in either project or the same one. A connected agent can ask another a question, which is answered as a message in its own conversation, and, where you allowed work, ask it to implement something, which becomes a task on the other's list that you can see, and the asker is told when it is done. A message from another agent is marked with where it came from. It does not give an agent more power: an agent that asks before anything risky still asks you before doing what another agent requested. An agent on full auto does not, so the connections screen says so. Agents cannot connect themselves, and there are limits (no more than 20 requests an hour to one agent, 5 waiting on answers, and two agents never wait on each other) so they cannot run each other, or your usage, away. Needs Toto 0.12.0 and app 1.10.0.
- A browser. Chat agents can open pages, read them, click through them and take screenshots in a headless Chromium on the Toto, with nothing kept between sessions. It has the same reach as the project: the internet, and your home network only if you allow it.
- Pictures. A screenshot an agent takes, or an image file it reads, shows in the conversation; tap it to see it full size and save it. You can send pictures to an agent too, with the + beside the message box. They are shrunk before sending and kept on the Toto with the conversation.
- Files. An agent can send you a file from its project, up to 10 MB. It is fetched from the Toto only when you tap it, and goes straight to your phone's save and share sheet.
- Terminals. Shells in the project, a tab each, typed into from your phone. They keep running when you leave and are there on every phone. Use them for anything Toto has no chat for yet, such as other coding tools.
- Home network. Agents can reach the internet but not the other devices on your network, unless you allow it for that project.
Your phone is notified when an agent stops to ask and when one finishes. The notification says only that; nothing about the work is in it.
Memory and tasks
A Toto keeps notes for its agents, and a list of things to do across all your projects. Both live on the Toto, and you read and change them in the app.
- Memory, in three layers: one agent's own, a whole project's, and the whole Toto's. Agents write freely to their own layer and their project's. What they write for the whole Toto waits until you accept it.
- At the start of a conversation an agent is told the titles of what applies to it, and reads the ones it needs.
- Tasks belong to a project, can carry files and tags, and can be moved between projects and agents. Hand one to a chat agent and it starts on it. Agents can add and update the tasks of their own project.
Skills
A skill is know-how an agent picks up when a job fits it: a folder with a SKILL.md in it, a name and a description at the top and instructions after, and sometimes templates or scripts beside it. It is the same format Claude Code uses everywhere. Each Toto has one library of them, which every agent in every project can use.
- See them, under Skills: what each is for, where it came from, and how often agents have used it, most used first.
- Write and change them. Open one to read its
SKILL.mdand change it, or remove it. + write starts a new one. - Add them from GitHub. Give the address of a repository, or of a folder in one, and choose from the skills found there. Nobody at Toto has checked these: a skill is instructions every agent will follow, so read what you add. Those with scripts are marked.
- Install a bank, under Plugins: a set of skills someone has looked at, each fetched from its author at the exact version that was checked. The first is anthropic-skills, twelve of Anthropic's own: PDF, Word, Excel and PowerPoint files, design, testing web apps, building MCP servers and writing skills.
What you add becomes yours: change or remove any of it, from GitHub or a bank alike. Agents read the library but cannot change it, so nothing one project's agent does reaches another's through a skill. A change reaches an agent at its next turn.
Plugins
Plugins give agents more tools. Install them from settings, under Plugins. There are five so far:
- gh, GitHub's command line, for pull requests, issues and checks. Signing in shows a code to enter on GitHub's page.
- wrangler, Cloudflare's command line, for Workers, D1, R2 and KV. Signing in takes an API token you make on Cloudflare's dashboard and paste into the app.
- docker, containers for agents, with the
dockercommand,docker buildanddocker compose. It is Podman underneath, run without root as each project's own user, because the usual Docker would give every agent root on the Toto. Some less common Docker features are missing, and nothing restarts after a reboot. - spacevim, Neovim with SpaceVim, for when you work in a terminal tab yourself. It puts a copy in each project's home folder, about 150 MB each, the first time the plugin is installed or a project is made, and fetches its own plugins the first time you open
nvim. Needs Toto 0.9.0. - slurp, for Slurp, an event store you run in your own Cloudflare account. Signing in takes the address of your Worker and its admin token, once, and every project's agents can then set up events for their project (a project and a key for each place that sends them) and send events to it. The token reaches every project on that Worker, so use one you can revoke. Agents can also sync a project's events and report on them: it installs Slurp's command line and the DuckDB it reports with for each project, about 110 MB each, each checked against a checksum. Needs Toto 0.11.0 and app 1.9.0.
A plugin is signed in once per Toto, and every project's agents use that sign-in. The token stays on the Toto, in a private file.
Every plugin is signed, and a Toto checks it against a key of its own before installing anything. The site hosts them but is not believed: a plugin that was changed on the way fails the check and is dropped. Nothing in a plugin is run as root; it names packages for the Toto to install. A plugin can also name a script to run once for each project, but that runs as the project's own user, which can do no more than the project's agents can.
The browser, sending files, and memory and tasks come with Toto and need no installing.
On the device itself
Plug a display into a Toto made from the image and it shows a live screen instead of a login: its dog, its name, its network, whether it has an owner and what its agents are doing. Press l on it for the address and token, and a code the app's camera can scan. On a machine you installed Toto onto yourself the display keeps its login until you ask for the screen: sudo toto screen on, then restart the console (sudo systemctl restart getty@tty1) or reboot. From a keyboard, or over SSH, the same tool is toto:
sudo toto # the live screen sudo toto status # the same, once sudo toto login # address, token and a code to scan sudo toto pair # pairing mode for ten minutes sudo toto pair off sudo toto wifi # choose a network sudo toto name Workshop sudo toto screen on # the screen on this machine's display (or off) sudo toto repair # when Toto will not start (also f on the screen)
If the Toto lost power partway through writing something, a file it reads when it starts can be left half-written. It copes with the usual ones by itself, but if it still will not start, sudo toto repair stops it, mends or sets aside whatever it cannot read (nothing is deleted), and starts it again. If that does not work, it shows the last of what Toto said, to report.
Pairing mode makes the Toto announce itself over Bluetooth again and lets a new phone set it up. It ends when a phone does, or when the time runs out.
Disk space
A Raspberry Pi's card is small, and a Toto that fills it stops answering. It looks at the disk every minute. When less than about two gigabytes are left, or a tenth of a small card, the app puts a warning at the top of the projects list and your phone gets a notification, then once a day while it stays short. When almost nothing is left, it clears the caches that are only there to make things faster and starts nothing new (no agent turns, projects or plugin installs) until there is room.
Settings has a Disk section that shows what is using the space, project by project, and can clear the caches: each project's package caches, and the packages the system downloaded to install things. Nothing of yours is deleted by that; what is wanted again is downloaded again. What it cannot clear is your work. Each agent that works in its own copy of a project has its own copy of everything installed in it, which for a web project is hundreds of megabytes, so deleting agents you are done with frees the most. Projects are kept apart on purpose, so they do not share a package cache.
To give a Toto more room, move it to a bigger card: copy the old card onto the new one, put it in, and start it. A copy keeps the old size, so settings shows A bigger card with a button that grows the partition to the end of the card. It finishes when the Toto restarts, which settings can do too. The Toto cannot do this to a disk it is not running from.
Updating
A Toto looks for a new release once a day, and straight away when the relay tells it one has been published. When there is one, the app's settings show it under Software. Nothing is installed until you tap Update, and not while agents are working.
The Toto then downloads the release from GitHub, checks it, installs it and restarts. If the new version will not start, it puts the old one back.
What it checks
Every release is signed with a key that only the release process holds, and every Toto carries the public half. A Toto installs a release only if that signature is good and the release is newer than what it has. The relay's part is to say "look now"; it is not believed about what to install, and neither is the place the download comes from.
The relay
At home your phone talks to your Toto directly. Away from home it cannot, because your Toto sits behind your router. So the Toto keeps one outgoing connection open to a relay, your phone connects to the same place, and the relay passes messages between the two.
The app tries your home network first and falls back to the relay after a couple of seconds.
What it can and cannot see
| The relay sees | The relay does not see |
|---|---|
| That a Toto is online, by an id derived from its key | Your token, or anything it could be worked out from |
| When your phone connects to it | Your code, your prompts or what agents say |
| How much is sent, and when | Your Claude sign-in, your SSH key, your Wi‑Fi password |
The count on the home page comes from the first row: the relay knows how many Totos are connected, and nothing more about them.
Running your own
The relay is a small Cloudflare Worker, and the free plan is enough. From the relay folder:
npm install npx wrangler login npx wrangler deploy
Then put its address, with wss:// in front, in TOTO_RELAY_URL in /etc/toto.env on the Toto and in the relay field in the app's settings. An empty relay in the app means home network only.
How it is kept private
- Every connection is encrypted between your phone and your Toto, at home and through the relay alike. Each one starts with fresh random values from both ends, and messages that are forged, repeated or out of order are thrown away.
- Bluetooth setup has its own key exchange, so your Wi‑Fi password is not readable in the air. A Toto that has an owner mixes its key into that exchange, so a stranger nearby gets no answer.
- Projects are separated by the operating system. One Linux user each, a private home directory, and a firewall rule keeping it off your home network.
- The part of Toto that listens to the network is not root. It can ask a small helper for a short list of things as root: make or remove a project's user, open or close the home network to it, list or join Wi‑Fi and set its country, install or remove a plugin by name, read why the device's own display is blank, and start an update. The helper fetches and checks updates and plugins for itself.
- Secrets stay off command lines and out of logs. Credentials reach agents through a private file, and what you type into a terminal goes down a private pipe.
Known limits
- First setup trusts whoever is nearby. Until a Toto has an owner, any phone in Bluetooth range can claim it. A Pi has no screen to confirm on.
- Keys do not change. The phone that set a Toto up holds its token, and each phone it is shared with holds a key of its own, but none of them is replaced over time. Someone who recorded your traffic and later got one could read what was sent with it.
- One SSH key per Toto. Added to your git account, it reaches every repository that account can.
- One sign-in per plugin. Every project's agents can use it, so make it as narrow as the service allows.
- An agent can still reach services on the Toto's own loopback address.
- The relay has no usage limits yet.
- Only Claude Code has a chat. Other tools run in a project's terminal.