Your AI-Powered Pocket Development Environment
PocketCodex is a lightweight, web-based Integrated Development Environment (IDE) designed to run on your local machine and be accessed from anywhere—including your mobile device or tablet. It combines a powerful FastAPI backend with a responsive React frontend to give you full control over your terminal, files, and AI-assisted workflows on the go.
- Full Terminal Access: A fully functional, persistent terminal right in your browser (xterm.js).
- AI-Native Workflow: Built from the ground up to integrate seamlessly with Codex for intelligent code generation and assistance.
- Mobile-First Design: Optimized touch controls and layout for coding on tablets and phones.
- Secure Tunneling: compatible with Cloudflare Tunnel (or ngrok) for secure remote access.
- Workspace Management: Switch contexts and projects easily.
- Operating System: Currently, only Windows is supported.
- AI Integration: AI capabilities are currently powered exclusively by Codex.
- Backend: Python 3.10+, FastAPI, Uvicorn, Websockets.
- Frontend: React 18, Vite, TypeScript, TailwindCSS (styled components), xterm.js.
- Communication: WebSocket for real-time terminal streaming and state synchronization.
- Python: Version 3.10 or higher.
- Node.js: Version 18 or higher (using
npm). - Git: For version control.
-
Clone the repository
git clone https://github.com/mhamel/PocketCodex.git cd PocketCodex -
Backend Setup Navigate to the backend directory and set up the virtual environment:
cd backend python -m venv venv # Windows: .\venv\Scripts\activate # Linux/Mac: source venv/bin/activate pip install -r requirements.txt
-
Frontend Setup Open a new terminal, navigate to the frontend directory, and install dependencies:
cd frontend npm install
Authentication is managed via a simple JSON file located at:
backend/data/users.json
- The default credentials are placeholders.
- You MUST change the username and password in this file before deploying or exposing the application.
- Currently, credentials are stored in plain text (improvements planned).
You need to run both the backend and frontend servers.
1. Start the Backend API (Port 9999 by default)
From the backend directory:
python run.py
# Or directly with uvicorn:
uvicorn app.main:app --host 0.0.0.0 --port 9999 --reload2. Start the Frontend Dev Server
From the frontend directory:
npm run devAccess the application at http://localhost:5173.
To access PocketCodex from your mobile device, we recommend using a secure tunnel like Cloudflare Tunnel.
cloudflared tunnel --url http://localhost:9999Note: Ensure your frontend is configured to build/proxy correctly to the backend port if serving purely static files, or use the dev server's network exposure options.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.

