history

The up-arrow command list and the terminal transcript are not the same. history asks the browser to show its recent entered commands. history -c forgets that browser list; neither action rewrites files on the hosting account.

SystemVersion 1.2.5Stable
lil-terminal

Overview

Need the previous command’s textual output again? history -o retrieves the last redirectable result kept for the current PHP session. You can then save that text with history -o > history.log, or use -r to replace the destination rather than append. This is different from saving an entire running transcript.

Three kinds of remembered state

A transcript may reveal paths, file contents and other private data. Recording is disabled by default, skips known secret-bearing commands and password prompts, and retains up to 400 entries / 1 MiB in .lil.log.php. These filters do not guarantee that every possible secret is excluded.

Syntax

lil-terminal
history [-c|-o|-l [on|off|clear]]

Reference

history

show numbered browser command history

history -c

clear browser command history

history -o

show the last terminal result stored in the current PHP session

history -l

show the persistent terminal transcript

history -l on

enable persistent command and output recording

history -l off

disable persistent recording without deleting the transcript

history -l clear

delete the persistent transcript

Persistence

Persistent recording is disabled by default. Its enabled state is stored in the history namespace of .lil.key. The transcript is stored separately in .lil.log.php as bounded newline-delimited JSON. The file starts with an executable PHP 404 guard, is limited to 400 entries and 1 MiB, rejects symbolic links and is written atomically with restrictive permissions.

Web terminal

When persistent history is enabled, a web-enabled core restores the latest transcript when its floating terminal window is opened on another page. The red window control clears the persistent transcript and destroys the current browser view; the yellow control hides the same iframe and therefore preserves its live DOM state.

Privacy

Terminal output can contain paths, database rows, environment values or other project data. Enable persistent history only when server-side storage of that output is appropriate. Password and hidden secret prompt values are never passed to this recorder.

Last result

history -o reads the most recent textual result retained by the current lil core in the PHP session. It does not require persistent transcript recording. Combine it with the core output operator to save the last result, for example history -o > history.log to append or history -o > history.log -r to replace the file. The terminal shortcuts use the automatic form @history -o so a missing Base History module can be installed silently.

Persistent recording does not save commands that may contain credentials (database/mail/PHP commands, authorization headers, cookies, secrets).

Practical guidance

Need the previous command’s textual output again? history -o retrieves the last redirectable result kept for the current PHP session. You can then save that text with history -o > history.log, or use -r to replace the destination rather than append. This is different from saving an entire running transcript.

Run history -l on only when you deliberately want cross-page transcript storage. history -l reads it, history -l off stops new recording without deleting the file, and history -l clear removes the file but does not disable recording. Invalid actions such as history -l status are not supported.

A transcript may reveal paths, file contents and other private data. Recording is disabled by default, skips known secret-bearing commands and password prompts, and retains up to 400 entries / 1 MiB in .lil.log.php. These filters do not guarantee that every possible secret is excluded.

In Minimum, history and history -o work; -c and every -l action require Base.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Show numbered browser command history

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install history
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install history -m
Exact public version

Install exactly this published version.

install history -v 1.2.5
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade history
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install history -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Show numbered browser command history
history
Preview only — the visitor’s terminal is not changed.
The browser displays its recent commands:
001  pwd
002  dir
003  history
Show the last terminal result stored in the current PHP session
history -o
Preview only — the visitor’s terminal is not changed.
Previously calculated: 12
Clear browser command history
history -c
Preview only — the visitor’s terminal is not changed.
Browser command history cleared.
Show the persistent terminal transcript
history -l
Preview only — the visitor’s terminal is not changed.
001  pwd
/sandbox

002  dir
index.php
Enable persistent command and output recording
history -l on
Preview only — the visitor’s terminal is not changed.
Persistent history: on
Disable persistent recording without deleting the transcript
history -l off
Preview only — the visitor’s terminal is not changed.
Persistent history: off
Delete the persistent transcript
history -l clear
Preview only — the visitor’s terminal is not changed.
Persistent history cleared
Enable persistent command and output recording
history -l on | history -l
Preview only — the visitor’s terminal is not changed.
001  pwd
/sandbox

002  dir
index.php
Disable persistent recording without deleting the transcript
history -l off | history -l
Preview only — the visitor’s terminal is not changed.
001  pwd
/sandbox

002  dir
index.php
Delete the persistent transcript
history -l clear | history -l
Preview only — the visitor’s terminal is not changed.
(empty)
Show the persistent terminal transcript
history -l maybe
Preview only — the visitor’s terminal is not changed.
?
Show the persistent terminal transcript
history -l status
Preview only — the visitor’s terminal is not changed.
?
Show the last terminal result stored in the current PHP session
history -o extra
Preview only — the visitor’s terminal is not changed.
?
Clear browser command history
history -c extra
Preview only — the visitor’s terminal is not changed.
?
History · invalid
history --unknown
Preview only — the visitor’s terminal is not changed.
?
Enable persistent command and output recording
history -l ON
Preview only — the visitor’s terminal is not changed.
Persistent history: on
Delete the persistent transcript
history -l clear later
Preview only — the visitor’s terminal is not changed.
?
Show the last terminal result stored in the current PHP session
pwd | history -o
Preview only — the visitor’s terminal is not changed.
Previously calculated: 12
Show the last terminal result stored in the current PHP session
history -o > sandbox/tmp/last-output.txt
Preview only — the visitor’s terminal is not changed.
Text saved using the core output operator: sandbox/tmp/last-output.txt
No files are modified by the Play example.

Related documentation

Current public release

v1.2.52026-11-01

Production refinement

Current stable release of history. The up-arrow command list and the terminal transcript are not the same.