Docs

A first install, step by step: from an empty server to your first agent followed from your iPhone.

⤓ Install manual (PDF, Portuguese)

How Pier works

Your agents (Claude Code, Codex) keep running on your own development machine, which Pier calls a box: a Linux server or your Mac. It runs pierd, a small open-source server, and the Pier app on your iPhone, iPad and Mac talks to it directly. There is no cloud and no Pier account: the app pairs with each box once (a QR code or a pier:// link), then uses mutual TLS with pinned keys. Away from the box's network, the app goes through the Pier tunnel, which only carries the end-to-end encryption.

What you need

BoxA Linux server (Ubuntu 20.04+ or Debian 10+, x86-64 or arm64, with systemd) or a Mac (macOS 13+), 4 GB of RAM or more.
On the boxgit, tmux, curl. pierd installs Claude Code, Codex and the GitHub CLI (gh) in ~/.local/bin when they are missing, with no sudo. Optional: Docker (isolated environments).
AgentsClaude Code with a Pro, Max, Team or Enterprise plan, and/or Codex with a ChatGPT account or an API key.
DevicesAn iPhone or iPad on iOS 17 or later, and/or a Mac.

No box yet? Open the app and tap Explore with sample data.

1. Prepare the server

Skip this on a Mac. On a fresh Ubuntu or Debian server, over SSH, as the user your agents will run as (not root):

sudo apt update && sudo apt install -y git tmux curl
git config --global user.name  "Your Name"
git config --global user.email "you@example.com"

No sudo for your user? Ask whoever runs the server for these three; everything else installs in your own folder.

For isolated environments, install Docker from docs.docker.com/engine/install, then sudo usermod -aG docker $USER and log in again. A server with a public address needs no VPN (pierd only answers paired devices; open port 7444 if a firewall is on). A server at home or behind NAT needs nothing either: the app reaches it through the tunnel.

2. The agents and the GitHub CLI

Nothing to do: pierd setup (next step) installs Claude Code, Codex and the GitHub CLI in ~/.local/bin when they are missing (--no-tools, or PIERD_NO_TOOLS=1 for the install command, leaves them alone), and the app installs any of them later with a tap. To install them yourself instead:

curl -fsSL https://claude.ai/install.sh | bash     # Claude Code
curl -fsSL https://chatgpt.com/codex/install.sh | sh  # Codex
pierd tools install gh                              # the GitHub CLI, once pierd is there

Signing in happens in the app, through the browser (step 6).

3. Install pierd

curl -fsSL https://docktopier.com/install.sh | sh
# or: npm install -g pierd && pierd setup
# or: brew install wagnerfnds/tap/pierd && pierd setup

pierd setup installs the missing tools (step 2), runs pierd as a user service on port 7444, installs the agents' hooks, adds the git repositories it finds (~/code, ~/Projects, …), connects the box to the tunnel and prints a QR code and a pier:// link (single use, 10 minutes). On Linux it also turns on lingering (loginctl enable-linger, no sudo) so pierd keeps running after you log out; where the system does not let your user do that, it says so, and whoever runs the server runs sudo loginctl enable-linger $USER once. Then pierd doctor should say “All good.”, and pierd pair makes a new link any time.

4. Connect the iPhone and iPad

  1. Install Pier from the App Store.
  2. Tap Scan QR code and point it at the code in the terminal (after the first box: Settings › Add box). Or open the pier:// link on the device.
  3. The box shows up with its projects and sessions; the app switches between the direct connection and the tunnel by itself.

5. Connect the Mac

6. Claude and Codex accounts

Several subscriptions on one box (personal and work, two Max plans…): each account is a folder of the agent's own (CLAUDE_CONFIG_DIR, CODEX_HOME), with its own login, settings and history, as Claude Code's documentation recommends for several accounts.

  1. Settings › Projects › Claude and Codex accounts: the agents' own accounts are listed already.
  2. Sign in, or Add account and name it: the app opens the agent's sign-in page in your browser (Codex and GitHub show a code to type there; Claude's page shows one to paste back in the app). The first pairing offers the same for Claude Code, Codex and GitHub right away (Accounts).
  3. Each project picks its account (the project's screen, Agents' account, or a worktree's Details); Make default sets it for everything else.
  4. The Home's Usage limits card shows each account's 5-hour and weekly use; tap Turn on reading the limits once for Claude. A tap on an account makes it the default.

7. Projects folder and spaces

Settings › Projects › Projects folder and spaces: every project lives under the folder you pick (such as ~/code): clones go there, nothing outside it is added or deleted. Spaces are folders in it that keep groups of projects apart (one per client, say); deleting a space deletes its projects with it, after the same checks as removing one, and never moves them out.

8. The box's variables and skills

Settings › Projects › Variables and skills: variables every project gets (agents, terminals, services), each with a note on what it is for. Secret-looking values are hidden until revealed; a project's own env wins. Turn on the Pier box skill (the variables by name and note, never values; the worktree's ports; the project's environment) and Pier preview (run the dev server on the worktree's port) so Claude Code and Codex know them. Pier prove has the agents show their work: a page's screenshot before and after a change, at a desktop's width and a phone's (pierd capture page, in a headless Chromium on the box: npx -y playwright install chromium once), which the app shows under the agent's reply.

9. Bring in projects

10. Isolated environments

A project's Environment picks its language version (PHP, Node.js, Python, Ruby, Go, an image, or its own Dockerfile) and its databases (MySQL, MariaDB, PostgreSQL, Redis, MongoDB), all in Docker on the box and none of it in the project. After Apply, php, composer, node… run in the container for everything in the project, agents included, and the worktrees get DB_HOST, DB_PORT, DATABASE_URL, REDIS_URL (user root, password pier, database app).

11. Notifications

Nothing to set up: Pier on the Mac tells your iPhone and iPad what needs you through your own iCloud while it is open (Settings › Open Pier when the Mac starts). Buttons in the notification answer the agent directly.

Day to day

Start a task+ on the Home: pick the project and the agent, type or dictate; it gets a worktree of its own.
What needs meInbox: permissions and questions, answered with a tap.
Everything at onceBoard: working, needs you, done.
ReviewA session's Review: each file's diff, commit, push, pull request.
Terminal beside the chatOn iPad and Mac, Side by Side in a session's tab strip (⌥⌘T): the conversation on the left, its terminals or the browser on the right.
See it runningA worktree's Details: the preview's public link and test login, dev servers with their links (Open in Pier opens them in the app's browser), services, ports.
Clean upCleanup (Projects › ✦): unused worktrees, services, every project's main.

A worktree's Details › Create public link puts its dev server at https://p-<name>.docktopier.com for 24 hours (7 days at most), for anyone with the link. It goes when it expires, when you take it down, or with its worktree. A preview a setup agent records gets one by itself, a day at a time while its worktree exists (Settings › Projects › Automatic public link).

Never publish a server with a debug console on (Rails' web-console, Django's debug toolbar): anyone with the link reaches it.

MCP servers

Settings › MCP servers: a name, the server's URL and its token. pierd writes it into every Claude Code and Codex account on the box with their own CLIs (changing only the entries it made), gives Codex the token through a session variable, and shows whether each agent connects.

Useful commands

pierd doctorWhat works and how to fix the rest.
pierd pairA new pairing link and QR code.
pierd clients / pierd revoke NAMEPaired devices / remove one.
pierd relayThe tunnel's state; off / default.
pierd location add NAME DIRA repository setup did not find.
pierd toolsWhere Claude Code, Codex and the GitHub CLI are; pierd tools install installs the missing ones.
UpdateRun the install command again (or npm install -g pierd@latest, brew upgrade pierd); running agents keep running.

Common problems

The app can't reach the box

pierd doctor; on the same network the device must reach the link's address (pierd setup --address HOST); away from it, pierd relay should say connected. On a Mac with the firewall on, allow incoming connections for pierd.

An agent stops at its login

That project's account is signed out: Settings › Projects › Accounts › Sign in.

No limits on the Home

Turn on reading the limits for Claude and wait for an agent's next reply. Limits exist for claude.ai plans only, not API keys.

An isolated environment does not apply

Check docker version on the box and that your user is in the docker group; the Environment screen shows the error and the log's end.

More on the support page.

Documentação

A primeira instalação, passo a passo: do servidor vazio ao primeiro agente acompanhado pelo iPhone.

⤓ Manual de instalação (PDF)

Como o Pier funciona

Os seus agentes (Claude Code, Codex) continuam rodando na sua máquina de desenvolvimento, que o Pier chama de box: um servidor Linux ou o seu Mac. Nela roda o pierd, um servidor pequeno e de código aberto, e o app no iPhone, no iPad e no Mac conversa direto com ele. Não existe nuvem nem conta do Pier: o app pareia com cada box uma vez (um QR code ou um link pier://) e daí usa TLS mútuo com chaves fixadas. Fora da rede da box, o app passa pelo túnel do Pier, que só carrega a criptografia de ponta a ponta.

O que você precisa

BoxUm servidor Linux (Ubuntu 20.04+ ou Debian 10+, x86-64 ou arm64, com systemd) ou um Mac (macOS 13+), com 4 GB de RAM ou mais.
Na boxgit, tmux, curl. O pierd instala o Claude Code, o Codex e o GitHub CLI (gh) em ~/.local/bin quando faltam, sem sudo. Opcional: Docker (ambientes isolados).
AgentesClaude Code com plano Pro, Max, Team ou Enterprise, e/ou Codex com conta ChatGPT ou chave de API.
AparelhosiPhone ou iPad com iOS 17 ou mais novo, e/ou um Mac.

Ainda sem box? Abra o app e toque em Explorar com dados de exemplo.

1. Preparar o servidor

Pule no Mac. Num servidor Ubuntu ou Debian novo, por SSH, com o usuário que vai rodar os agentes (não use root):

sudo apt update && sudo apt install -y git tmux curl
git config --global user.name  "Seu Nome"
git config --global user.email "voce@exemplo.com"

Seu usuário não tem sudo? Peça só esses três a quem administra o servidor; o resto se instala na sua própria pasta.

Para ambientes isolados, instale o Docker pelo guia oficial (docs.docker.com/engine/install) e depois sudo usermod -aG docker $USER, entrando de novo na sessão. Um servidor com IP público não precisa de VPN (o pierd só atende aparelhos pareados; libere a porta 7444 se houver firewall). Um servidor em casa ou atrás de NAT também não precisa de nada: o app chega pelo túnel.

2. Os agentes e o GitHub CLI

Nada a fazer: o pierd setup (próximo passo) instala o Claude Code, o Codex e o GitHub CLI em ~/.local/bin quando faltam (--no-tools, ou PIERD_NO_TOOLS=1 no comando de instalação, deixa como está), e o app instala qualquer um deles depois com um toque. Para instalar você mesmo:

curl -fsSL https://claude.ai/install.sh | bash     # Claude Code
curl -fsSL https://chatgpt.com/codex/install.sh | sh  # Codex
pierd tools install gh                              # o GitHub CLI, com o pierd já instalado

O login é no app, pelo navegador (passo 6).

3. Instalar o pierd

curl -fsSL https://docktopier.com/install.sh | sh
# ou: npm install -g pierd && pierd setup
# ou: brew install wagnerfnds/tap/pierd && pierd setup

O pierd setup instala as ferramentas que faltam (passo 2), roda o pierd como serviço do usuário na porta 7444, instala os hooks dos agentes, adiciona os repositórios git que encontrar (~/code, ~/Projects, …), conecta a box ao túnel e mostra um QR code e um link pier:// (uso único, 10 minutos). No Linux ele também liga o lingering (loginctl enable-linger, sem sudo) para o pierd continuar rodando depois do logout; onde o sistema não deixa o seu usuário fazer isso, ele avisa, e quem administra o servidor roda uma vez sudo loginctl enable-linger $USER. Depois, pierd doctor deve dizer “All good.”, e pierd pair gera um link novo quando precisar.

4. Conectar o iPhone e o iPad

  1. Instale o Pier pela App Store.
  2. Toque em Escanear QR code e aponte para o código do terminal (depois da primeira box: Ajustes › Adicionar box). Ou abra o link pier:// no aparelho.
  3. A box aparece com os projetos e as sessões; o app alterna sozinho entre a conexão direta e o túnel.

5. Conectar o Mac

6. Contas do Claude e do Codex

Várias assinaturas na mesma box (pessoal e trabalho, dois planos Max…): cada conta é uma pasta própria do agente (CLAUDE_CONFIG_DIR, CODEX_HOME), com login, configurações e histórico separados, como a documentação do Claude Code recomenda para várias contas.

  1. Ajustes › Projetos › Contas do Claude e do Codex: as contas próprias dos agentes já aparecem.
  2. Entrar, ou Adicionar conta e dê um nome: o app abre a página de login do agente no seu navegador (o Codex e o GitHub mostram um código para digitar lá; a página do Claude mostra um para colar de volta no app). O primeiro pareamento já oferece o mesmo para o Claude Code, o Codex e o GitHub (Contas).
  3. Cada projeto escolhe a sua conta (tela do projeto, Conta dos agentes, ou Detalhes de uma worktree); Tornar padrão vale para o resto.
  4. O card Limites de uso no Início mostra o uso de 5 horas e semanal de cada conta; toque uma vez em Ativar a leitura dos limites para o Claude. Um toque numa conta a torna a padrão.

7. Pasta dos projetos e espaços

Ajustes › Projetos › Pasta dos projetos e espaços: todos os projetos ficam na pasta que você escolher (por exemplo ~/code): os clones vão para lá, e nada fora dela é adicionado ou apagado. Espaços são pastas dentro dela que separam grupos de projetos (um por cliente, por exemplo); apagar um espaço apaga os projetos dele junto, com as mesmas checagens de remover um projeto, e nunca os move para fora.

8. Variáveis da box e skills

Ajustes › Projetos › Variáveis e skills: variáveis que todo projeto recebe (agentes, terminais, serviços), cada uma com uma nota do que é. Valores com cara de segredo ficam escondidos até você revelar, e o env do projeto tem prioridade. Ligue a skill Pier box (as variáveis por nome e nota, nunca o valor; as portas da worktree; o ambiente do projeto) e a Pier preview (subir o servidor de desenvolvimento na porta da worktree) para o Claude Code e o Codex saberem disso. A Pier prove faz os agentes mostrarem o trabalho: a captura de uma página antes e depois de uma mudança, na largura do computador e do celular (pierd capture page, num Chromium headless na box: npx -y playwright install chromium uma vez), que o app mostra abaixo da resposta do agente.

9. Trazer os projetos

10. Ambiente isolado

O Ambiente de um projeto escolhe a versão da linguagem (PHP, Node.js, Python, Ruby, Go, uma imagem ou o Dockerfile do projeto) e os bancos (MySQL, MariaDB, PostgreSQL, Redis, MongoDB), tudo em Docker na box e nada dentro do projeto. Depois de Aplicar, php, composer, node… rodam no container para tudo do projeto, inclusive os agentes, e as worktrees recebem DB_HOST, DB_PORT, DATABASE_URL, REDIS_URL (usuário root, senha pier, banco app).

11. Notificações

Nada para configurar: o Pier no Mac avisa o iPhone e o iPad pelo seu iCloud, enquanto está aberto (Ajustes › Abrir o Pier quando o Mac ligar). Os botões da notificação respondem direto ao agente.

O dia a dia

Começar uma tarefa+ no Início: projeto, agente, e o pedido digitado ou ditado; ganha uma worktree própria.
O que precisa de mimInbox: permissões e perguntas, respondidas com um toque.
Tudo de uma vezQuadro: trabalhando, precisa de você, terminou.
RevisarRevisar numa sessão: o diff de cada arquivo, commit, push, pull request.
Terminal ao lado da conversaNo iPad e no Mac, Lado a lado na faixa de abas da sessão (⌥⌘T): a conversa à esquerda, os terminais ou o navegador à direita.
Ver rodandoDetalhes da worktree: o link público e o login de teste da visualização, os servidores com os links (Abrir no Pier abre no navegador do app), serviços, portas.
LimparFaxina (Projetos › ✦): worktrees sem uso, serviços, a main de cada projeto.

Links públicos

Em Detalhes da worktree › Criar link público, o servidor de desenvolvimento fica em https://p-<nome>.docktopier.com por 24 horas (no máximo 7 dias), para qualquer pessoa com o link. Ele sai do ar quando expira, quando você o remove, ou com a worktree. A visualização que um agente de preparação registra ganha um sozinho, um dia por vez enquanto a worktree existir (Ajustes › Projetos › Link público automático).

Nunca publique um servidor com console de depuração ligado (web-console do Rails, debug toolbar do Django): quem tem o link chega a ele.

Servidores MCP

Ajustes › Servidores MCP: nome, URL do servidor e token. O pierd grava o servidor em todas as contas do Claude Code e do Codex da box pelos próprios CLIs (mexendo só nas entradas que ele criou), passa o token ao Codex por uma variável da sessão e mostra se cada agente conecta.

Comandos úteis

pierd doctorO que funciona e como corrigir o resto.
pierd pairUm novo link de pareamento com QR code.
pierd clients / pierd revoke NOMEAparelhos pareados / tirar um.
pierd relayO estado do túnel; off / default.
pierd location add NOME PASTAUm repositório que o setup não achou.
pierd toolsOnde estão o Claude Code, o Codex e o GitHub CLI; pierd tools install instala os que faltam.
AtualizarRode o comando de instalação de novo (ou npm install -g pierd@latest, brew upgrade pierd); os agentes continuam rodando.

Problemas comuns

O app não alcança a box

pierd doctor; na mesma rede, o aparelho precisa alcançar o endereço do link (pierd setup --address HOST); fora dela, pierd relay deve dizer connected. No Mac com firewall, permita conexões de entrada para o pierd.

Um agente para pedindo login

A conta daquele projeto está sem login: Ajustes › Projetos › Contas › Entrar.

Sem limites no Início

Ative a leitura dos limites para o Claude e espere a próxima resposta de um agente. Os limites existem só nos planos claude.ai, não com chave de API.

O ambiente isolado não aplica

Confira docker version na box e se o seu usuário está no grupo docker; a tela do Ambiente mostra o erro e o fim do log.

Mais na página de suporte.