ai newsDo., 5. Nov.
EilmeldungOpenAI’s Patch the Planet Brings AI-Assisted Patching to Open Source Security

Developing a Web App with Claude from an iPad (3): Switching from Local to Remote

The loop stays the same when the work moves to an iPad. Anything left only on the Mac is out of reach. The switch to remote development changes where Claude Code runs and where its records are kept. This article covers the one-time setup, the checks before leaving the Mac, and the loop as it runs f

dev.toDonnerstag 03:00 · 05.11.5 Min. Lesezeit
Bild: dev.to

The loop stays the same when the work moves to an iPad. Anything left only on the Mac is out of reach. The switch to remote development changes where Claude Code runs and where its records are kept. This article covers the one-time setup, the checks before leaving the Mac, and the loop as it runs from the iPad.

In local development, Claude Code runs in a terminal on the Mac, in a folder that holds the repository. Its reports are saved in a folder on the Mac.

In remote development, Claude Code runs on the web, in the cloud. It works on a copy of the repository taken from GitHub. Everything it produces goes back to GitHub: branches, pull requests and reports.

Remote work therefore rests on one rule: GitHub is the single source of truth. Anything that exists only on the Mac is invisible to a remote session.

The Mac can be shut down at a convenient time or left running. What matters is that nothing is changed in its local copy of the repository while the work is remote. That copy falls behind GitHub. A later article will describe the switch back to local development, which brings it in step again.

This setup is done once, while the Mac is still the working machine.

Create the reports repository. It holds the reports that Claude Code writes, in a folder named reports. In local development, the reports folder on the Mac plays this part.

Connect Claude to the repositories. The Claude GitHub App is installed on the code repository and on the reports repository.

Create the cloud environment. In Claude Code on the web, an environment is created and given a name. Every remote session starts in it.

Write the working rules for cloud sessions into the repository. They live in the file CLAUDE.md, which Claude Code reads at the start of every session. The rules used here are:

Every cloud task says whether a report is expected.

Packages are installed with npm ci, never with npm install, and package-lock.json is never changed.

Claude Code never holds the database service key, and never touches the Production database.

Passwords and keys are never typed into the chat or into a prompt. They live in the password manager and in the app's own key settings.

The last part of the setup is the harmless test, described below. It is run before the first real task.

Claude Code has nothing running, and every report has been read.

Unfinished local work is saved on GitHub, for example as a branch, so that it also exists away from the Mac.

The sign-in check from the second article passes on the iPad, and the password manager unlocks.

In Claude Code on the web, a new session shows the cloud environment with a check mark, and the repository box lists both repositories, each with a check mark.

The words "going remote" are sent in the chat. Claude checks the points above. When it answers, "remote" is sent to confirm the switch. From then on the work is remote, and the local copy on the Mac is left alone.

While the work is remote, the developer reads the result of each task on GitHub: the pull request page with its checks and preview, and the report when one is expected. The line pasted from Claude Code tells Claude that the task is finished.

Each remote task also follows the rules in CLAUDE.md: it names the branch and says whether a report is expected. The prompt is one paragraph, as the second article described.

A message for Claude Code is copied from the chat with its copy icon.

In Claude Code on the web, a New session is started in the cloud environment, with both repositories selected. The message is pasted and sent.

Claude Code builds on its branch, opens a pull request and waits. It does not merge.

GitHub runs its checks and Vercel builds the preview. The developer reads both on the pull request page.

The developer copies the last line that Claude Code wrote and pastes it into the chat. Claude takes it as the signal that the task is finished, and asks whether the merge is ordered. If it is, Claude gives the developer a second, short message that tells Claude Code to merge. The developer pastes it into Claude Code.

The merge deploys Production automatically. Claude Code reports the commit and the deployment result.

When a report is expected, it appears in the reports repository.

At the end of the day, the developer deletes the finished branches on GitHub.

The second article described the page in tab 4: the summary of the suggested steps. Claude creates it on request, for example: "Keep one page called Summary of the suggested steps, with only what I must do now, and update the same page each time."

Claude updates that page in place. The developer opens it in its own Chrome tab and no longer scrolls the chat.

Before the first real task, a short sequence confirms that every link in the chain works. The test uses a small text change on a page, so that nothing that matters is at risk:

A one-line message to Claude Code on the web, to confirm the connection.

A browser test inside the cloud session, to confirm that the cloud environment can run one.

Pushing a harmless branch, to confirm that the cloud session can write to the repository.

A pull request with its checks and preview.

Merging it, and watching Production deploy.

If all five pass, the setup is ready for real work.

Remote work can begin when all of these are true:

The GitHub App is installed on both repositories

The cloud environment exists and shows a check mark in a new session

The working rules for cloud sessions are in CLAUDE.md on the main branch

The harmless test passed, all five parts

Unfinished local work is saved on GitHub

"going remote" and "remote" were exchanged in the chat

Quelle: dev.to (dev.to). Original öffnen