Repository navigation
Web Mode
rafageist edited this page Dec 4, 2026
·
2 revisions
divide can also run in a web browser on your own computer. It is the same divide, with the same menus, keys and windows: the browser shows a terminal, and each tab runs its own divide.

divide --web PROJECT # 127.0.0.1:8000, the screen follows the browser window
divide --web 127.0.0.1:9090 --res 120x40 PROJECTdivide prints an address with a secret token in it:
Serving divide at http://127.0.0.1:9090/?token=...
The address opens once, within 10 minutes; then that browser stays in for 12 hours. Restarting the server gives a new address and shuts every browser out.
Terminal size: 120x40. Press Ctrl+C to stop.
Open that address in your browser. The token leaves the address bar at once, and a cookie keeps you in.
-
--webtakesHOST:PORT,HOSTor:PORT. Only this computer's own addresses are served (127.0.0.1,localhost,::1). -
--res 120x40keeps the screen at 120 columns and 40 rows whatever the window's size; the page changes the font size to fit.--res auto(the default) makes the screen follow the window. -
--mcpdoes not go with--web.

- Each tab is a separate divide, up to 4 at a time. A second tab of the same browser opens with the address without its token.
- Alt+X ends the divide of that tab, after asking about unsaved changes, as always. The page then says the session ended.
- Closing or reloading a tab ends its divide; the browser asks first.
-
Ctrl+C where you started
divide --webends every tab's divide, then the server. Programs a tab started (a PHP script, the debugger, a language server) end with it.

- The F-keys, Alt+letters, Ctrl+P and the mouse work as in a terminal. F5 zooms the window: the browser does not reload the page.
- The browser keeps some keys for itself. In divide, use instead:
- Alt+F3 (or Window > Close) for Ctrl+W, close the window;
- Run > Data tree for Ctrl+T;
- Ctrl+Space for Ctrl+N, completion.
- Copy (Ctrl+C in the editor) reaches your computer's clipboard. Paste with the browser's own paste: the text arrives as typed.
- The address opens once, within 10 minutes. Until you open it, treat it like a password.
- The cookie lets that browser in, new tabs included, for 12 hours. After that, new tabs are refused, but a tab already open keeps running until you close it or stop the server.
- Restarting the server makes a new address and shuts every browser out.
- To use divide from another computer, forward the port over SSH (
ssh -N -L 9090:127.0.0.1:9090 user@server) and open the address there, with the same port.
divide --web works from the divide command that pip installs (divide.exe on Windows) and from the standalone program of a release: each tab starts that same program again.
divide · part of Divengine · report an issue
Manual
- The Desktop
- Editing Templates
- Editing PHP
- Outline
- Finding Files and Commands
- Language Servers
- Completion
- Checking Templates
- Rendering
- Render Trace
- Running PHP
- Running Flows
- Flow Structure
- Flow Designer
- Flow Functions
- Flow Simulation
- Function Mock Simulation
- Debugging PHP
- Web Server
- Data Files
- Other Files
- Project Window
- Div Setup
- Dialector
- Translating Templates
- Composer
- Git
Reference
Links