lil-terminal in the browser and inside your website
Use lil-terminal as a normal browser page, or embed the same terminal in your own site when you want it available beside the page you are working on. Integration changes how the terminal opens; it does not change its commands or permissions.
Open it as a normal browser terminal
The simplest setup needs no integration. Upload the generated lil.php, open its URL in a browser and work there directly. If a separate terminal page is enough, nothing else needs to be connected.
https://example.com/lil.phpEmbedding does not add privileges
Standalone mode, JavaScript integration and protected PHP integration all run the same lil-terminal under the same PHP account. Filesystem and database access still depend on hosting permissions, HTTPS and terminal authorization.
A terminal above your website
In embedded mode lil-terminal opens in a floating window above the page. Its normal geometry, minimized side and expanded width are remembered for this installation.
- Red closes the terminal. Open it again with Ctrl/Command+Shift+L.
- Yellow minimizes the terminal to a compact strip at the bottom. The strip survives navigation and reloads and snaps to the left or right edge when dragged.
- Green expands the terminal to full height on the left half of the viewport. Resize it horizontally when needed; press green again to return to the standard window.
CtrlCommand+Shift+L Ctrl+Shift+L on Windows/Linux or Command+Shift+L on macOS opens a closed terminal or restores a minimized one.
JavaScript integration
Choose JavaScript integration on the Download page. After the one-file installer expands, lil.js appears beside lil.php. Include that script once in the shared site layout and it opens the sibling terminal in a same-origin floating frame.
<script src="/lil.js" defer></script>Protected PHP integration
Use this mode when the terminal is embedded in a site that visitors can reach. The installer moves the real terminal into a unique protected directory, so the original public installation URL can no longer open it directly.
After installation, the setup page shows the exact PHP include for the generated protected directory. Add that line to the shared layout before page output. There is no universal include path because every protected build receives its own directory.
The same setup page shows a unique activation URL. Open it once in your browser: the loader becomes available for the current session and the token is removed from the visible address.
https://example.com/?lil=<generated-token>The activation token is not the terminal password. It makes the protected loader harder to discover; command execution is still protected by normal lil-terminal authorization.
Persistent history is optional
Hiding the floating window keeps its current live state. If you also want commands and safe textual output to survive navigation, reloads or a newly opened terminal window, install
install history
history -l onPersistent recording is off by default. The transcript is stored in .lil.log.php and can contain project paths, database rows or other output, so enable it only when server-side retention is appropriate.
Content Security Policy (CSP)
The embedded terminal works from the same origin as the site. If you use CSP, allow the local script and same-origin frame required by the selected integration mode. Protected integration does not load third-party JavaScript.