Working with AI agents
Two separate things live here. One lets an agent on this machine share files. The other lets you hand a file and a prompt to an agent session on a different machine.
Let an agent share files
Section titled “Let an agent share files”s2u install-agent-toolsThat registers Share2Us with Codex, Claude Code and Gemini CLI, so the agent can
create a share without you pasting commands. Pick one with
--agent codex, --agent claude-code or --agent gemini-cli.
Underneath it is a tool server:
s2u mcp serve # run as a tool providers2u mcp token # a scoped token, for a remote agentThe local secret scan still runs. An agent that tries to share a file containing credentials gets the same refusal you would.
Hand work to an agent on another machine
Section titled “Hand work to an agent on another machine”Take a screenshot on one machine and give it, with a prompt, to a Claude Code, Codex or Gemini session running somewhere else. The agent acts on it there.
On the machine with the agent sessions:
s2u daemon run --agent-bridgeFrom anywhere:
s2u agent lists2u agent send --device <id> --session <id> --file shot.png \ --prompt "what is wrong here?"The prompt and the file are encrypted to the target device. The server relays something it cannot read.
Nothing is trusted by default
Section titled “Nothing is trusted by default”A device you have not sent to before does not get through. The first request waits on the target machine:
s2u agent pendings2u agent approve <id> # this one requests2u agent allow <device> # standing access, until revokeds2u agent revoke <device>What an injected run may do
Section titled “What an injected run may do”Guardrails apply with no setup. Pushing, deleting and outbound network are blocked, and a remote prompt cannot edit the rules that constrain it. That last part is the one that matters: a prompt that could rewrite its own limits is not a limit.
Add your own in a plain-text .s2u.rules:
s2u setup # start a .s2u.rules for this projects2u agent rules # what is hard-enforced and what is advisory, per tool