Ditch the Laptop: A Full Dev Station from Your Phone with DeX, Codespaces, and Claude Code
What if your entire development environment fit in your pocket? Not a stripped-down editor or a glorified notepad — a real setup where you can SSH into cloud machines, run builds, push code, and manage production servers.
This isn't a thought experiment. Here's the setup I've been running, and how each piece fits together.
The Hardware
The whole rig is three things:
- Samsung Galaxy phone running DeX mode — your computer
- Xreal AR glasses — your big screen
- Foldable Bluetooth keyboard — for when thumb typing isn't cutting it
That's it. No laptop, no tablet, no dock. DeX gives you a desktop interface with windowed apps, a taskbar, and proper multitasking. The Xreal glasses project what feels like a large monitor in front of you. And the phone itself doubles as a touchpad.
flowchart LR
subgraph Pocket["What's in Your Pocket"]
A[Samsung Phone]
B[Foldable Keyboard]
C[Xreal Glasses]
end
subgraph Desktop["What You Get"]
D[Full Desktop UI]
E[Big Screen Display]
F[Terminal + Browser]
end
A -->|DeX Mode| D
C -->|USB-C| E
B -->|Bluetooth| A
A -->|Touchpad| D
style Pocket fill:#e3f2fd
style Desktop fill:#e8f5e9
The beauty of this setup is modularity. Need to do something quick? Just thumb type on the phone. Need to write real code? Pop open the foldable keyboard. Need a big screen? Put on the glasses. Each piece is optional.
The Software Stack
The real magic happens in Termux — a terminal emulator that gives you a full Linux environment on Android. No root required. From there, you install:
- Claude Code — AI coding assistant that runs in your terminal
- GitHub CLI (
gh) — manage repos, codespaces, PRs from the command line - Fish shell — a friendly shell with better defaults than bash
- proot — fixes Android's
/tmppermission restrictions
The /tmp Fix
One gotcha: Android locks down /tmp, and Claude Code hardcodes that path internally. The fix is proot, which remaps directories:
# In ~/.config/fish/config.fish
if status is-interactive
alias claude="proot -b $PREFIX/tmp:/tmp claude"
end
Now claude just works. No patching files, survives updates.
GitHub Codespaces: Your Cloud Machine
Your phone isn't going to compile TypeScript or run a dev server. It doesn't need to. That's what GitHub Codespaces is for — a full cloud development environment tied to your repo.
The setup:
- Install the GitHub CLI:
pkg install gh - Authenticate:
gh auth login - Add the codespace scope:
gh auth refresh -h github.com -s codespace
Then you're one command away from a cloud machine:
gh cs ssh
That's it. No SSH keys to configure, no port forwarding to set up. The GitHub CLI handles the tunnel through their infrastructure.
sequenceDiagram
participant Phone as Phone (Termux)
participant GH as GitHub API
participant CS as Codespace
Phone->>GH: gh cs ssh
GH->>CS: Start SSH server
GH-->>Phone: Tunnel established
Phone->>CS: Run commands, edit files, build
CS-->>Phone: Output streamed back
Enabling SSH in Your Codespace
If you're using a custom Dockerfile (not the default dev container image), you need to add the SSH server feature to your .devcontainer/devcontainer.json:
{
"features": {
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
}
}
}
One important note: if you add this to an existing codespace, a rebuild might not pick it up. Delete and recreate the codespace to be safe.
Cost
GitHub Free gives you 120 core-hours and 15 GB storage per month. When you're not working:
| State | Compute Cost | Storage Cost |
|---|---|---|
| Running | Yes | Yes |
| Stopped | No | Yes |
| Deleted | No | No |
Stop your codespaces when you're done. Don't just close the browser. And note that GitHub auto-deletes inactive codespaces after 30 days.
The AI-Powered Workflow
Here's where it gets interesting. With Claude Code running locally on your phone, you have an AI agent that can:
- SSH into your codespace and run any command
- Edit files directly on the remote machine
- Run builds and tests with full output
- Commit and push changes
- Manage multiple servers — codespace, VPS, local files
flowchart TD
A[You describe what you want] --> B[Claude Code on Phone]
B --> C{Where to execute?}
C -->|Cloud dev| D[GitHub Codespace]
C -->|Production| E[VPS Server]
C -->|Local| F[Phone/Termux]
D --> G[Edit, Build, Test, Push]
E --> H[Deploy, Monitor, Debug]
F --> I[Git, Config, Scripts]
style A fill:#e3f2fd
style B fill:#fff3e0
style D fill:#e8f5e9
style E fill:#fce4ec
style F fill:#f3e5f5
The phone becomes a control center, not the workstation itself. You're orchestrating cloud machines with natural language.
A typical flow looks like:
- "Fix the bug where the search returns empty results"
- Claude reads the codebase (local clone for context)
- SSHs into the codespace to make the fix
- Runs the build to verify
- You test in the browser
- "Looks good, push it"
You barely touch the keyboard.
Voice-Driven Development
This is the underrated part. Android has excellent speech-to-text built into Gboard. Combined with Claude Code, you get a voice-driven development workflow:
- Hold the mic button on Gboard
- Describe what you want: "Add a new API endpoint that returns user stats grouped by month"
- Claude Code does the rest
No keyboard needed. You could be walking, on a train, or sitting in a park. The AI handles the translation from intent to code.
What This Setup Can't Do
Let's be honest about the limitations:
- Heavy local IDE features — No VS Code extensions, no debugger UI, no visual diff tools
- Large file operations — Reading huge files over SSH is slow
- Long typing sessions — The foldable keyboard helps, but it's not a ThinkPad
- Offline work — Everything depends on internet connectivity
This isn't a laptop replacement for a full day of heads-down coding. It's for:
- Quick fixes on the go
- Code reviews and PR management
- Deployments and server maintenance
- Prototyping and experimentation
- The times when you don't want to carry a laptop but still want to be productive
The Setup Checklist
Here's everything you need to replicate this:
| Component | Purpose |
|---|---|
| Samsung phone with DeX | Desktop interface |
| Xreal AR glasses (optional) | Big screen anywhere |
| Foldable Bluetooth keyboard (optional) | Physical typing |
| Termux | Linux terminal on Android |
| proot | Fix /tmp permissions |
| Fish shell | Better terminal experience |
| GitHub CLI | Codespace management |
| Claude Code | AI-powered development |
| GitHub Codespaces | Cloud dev environment |
| devcontainer.json with sshd feature | Enable SSH access |
Final Thoughts
The laptop isn't going away. But the assumption that you need one to do real development work is increasingly wrong. A phone with the right software stack and a cloud backend gives you a surprisingly capable setup.
The key insight: your phone doesn't need to be powerful enough to run your dev environment. It just needs to be powerful enough to control one.
With AI in the loop, even the input problem — typing on a phone — becomes manageable. You describe intent, the AI writes code. The phone is just the interface.
Try it. You might stop reaching for your laptop.
Written entirely from a Samsung phone in DeX mode, using Xreal AR glasses and Claude Code. No laptops were involved in the making of this article.