Skip to content
On this page

Interface

This page is the compact reference of the interactive interface of lip: its keys, its pages and the commands behind them, and the rules that hold on every page. To learn the interface step by step, start with A tour of the interface.

The normative definition is the lip-tui(1) page of the protocol.

Starting

shell
lip

lip without arguments opens the interface when its standard input and its standard output are both terminals; otherwise it writes its help (see Command line).

  • The interface works on one workspace at a time, the selected workspace: at first the folder that lip was started in.
  • The daemon of lip carries the interface out. Several interfaces can be open at once.
  • The terminal must have at least 60 columns and 16 rows. In a smaller one lip asks you to enlarge it, and the only key that works is Ctrl+C, which quits without asking.
  • In a terminal narrower than 80 columns, the sidebar shows one symbol for each page while a page has the focus.

Keys

The same keys do the same on every page. The bottom line of the screen lists the ones that work where the focus is.

KeyDoes
↑ ↓Moves in a list or a menu. In the sidebar, shows the page before or after.
← →Moves between the sidebar and the page, and between panes or buttons side by side; changes an option that has several values.
EnterOpens or carries out what is selected. On a row of a list, opens its actions.
SpaceChecks a row where several can be chosen; switches an option on or off.
Tab, Shift+TabGoes to the next or the previous area, round the sidebar and the areas of the page.
EscGoes back one level: from a dialog to the page, from an inner area of a page to the one before it, from the page to the sidebar. In the sidebar, asks whether to quit.
PgUp PgDn Home EndPages through a list or a text. In the sidebar, Home and End show the first and the last page.
Ctrl+COn the Server page while the server runs, stops the server. While a change is carried out, cancels it. Anywhere else, asks whether to quit.
Letters and digitsAre typed where a text field has the focus. They do nothing anywhere else: there are no letter shortcuts.

Pages

PageDoesCommands
HomeShows the state of the selected workspace and the next step to take.
ServerStarts and stops the server, shows what it writes, and sends it what you type.lip run --managed --detach, lip config set restart … --workspace
ModsLists the installed packages; installs, updates and uninstalls them.lip list, lip install, lip update, lip uninstall
Get modsSearches the mods of levimc.org, and installs a version of one.lip install
Game configEdits server.properties, allowlist.json and permissions.json.None
Mod configEdits the configuration files of the installed mods.None
WorkspacesLists the workspaces; selects, adds and removes them; sets up a new server; changes the game or the loader of one.lip setup
ToolsCreates a lip.toml, migrates a tooth.json, packs a ZIP, views a package.lip pkg init, lip pkg migrate, lip pkg pack, lip pkg view
SettingsLanguage, GitHub proxy, auto restart, cache, updates of lip, the daemon, the version.lip config, lip cache clean, lip self-update, lip daemon status, lip --version

A command that the interface carries out behaves as its own page defines, with the selected workspace as its working directory, and with these differences:

  • What it says is shown in the interface, in English.
  • What it asks, it asks in a dialog.
  • When it fails, the interface shows why and goes on.

Preview and Apply

Every change of the packages of a workspace goes the same way: installing, updating, uninstalling, and setting up the game or the loader.

StepWhat happens
1. Previewlip carries the command out as a dry run and shows what it would do. Nothing has changed.
2. Apply or CancelApply goes on. Cancel changes nothing. When the preview finds nothing to change, the only button is Close.
3. LicenseOnly when the change installs the game: lip shows the Minecraft EULA and the Microsoft Privacy Policy. Accept goes on; Decline changes nothing.
4. ProgressEsc or Ctrl+C cancels; what was done so far is undone, and a dialog titled Cancelled says so. It is not a failure.
5. ResultWhat the command said, and ✓ Done.
  • Applying does not start over: what the preview read and downloaded is used as it is.
  • When the preview of a setup names installed mods that have no version for the new game or loader, Apply uninstalls them.
  • A failure shows the cause, hints when lip has any, and the path of the failure report below .lip/logs of the workspace.

While the server runs

The server of a workspace runs while lip runs it, whoever started it: an interface, lip run --managed, or a plain lip run in a terminal. Meanwhile the interface does this for that workspace:

WhatWhile its server runs
Installing, updating and uninstalling packages (Mods, Get mods)Off.
Setting up a new server in its folder, changing its game or loader (Workspaces)Off.
server.properties, allowlist.json, permissions.json (Game config)Shown, not changed or saved. Unsaved changes are kept until the server has stopped.
The configuration files of the mods (Mod config)Changed and saved as usual. The page notes that a change may need a restart.
Everything else: browsing mods, switching workspaces, Tools, SettingsAs usual.

What is off stays on the screen, dimmed, with the reason Stop the server first.

This holds for the interface only. The commands lip install, lip update, lip uninstall and lip setup are not refused while the server runs; see Running a server from the commands.

Quitting the interface does not stop a server that the daemon runs. When lip carries out the interface itself, because it cannot use its daemon, quitting stops the servers that the interface started.

Configuration files

FileReadWritten
server.propertiesWhen the Game config page is shown.On Save: the values of the properties that changed, and no other character. Not created when it does not exist.
allowlist.json, permissions.jsonThe same. A file that does not exist is read as an empty list.On Save: the whole file, without comments. Created when it does not exist.
A .json file of a modWhen the file is selected on the Mod config page.On Save: the whole file, without comments, each name where it was. Not created when it no longer exists.
Any other file of a modThe same.Never.
  • A file that lip cannot read is shown, and never written.
  • A file that changed on disk since lip read it is overwritten only when you say so.
  • Leaving a page with unsaved changes asks whether to save them.
  • A saved change takes effect when the server is next started.

The files of a mod are those in mods/<mod>/config/; when there is none, the .json, .ini, .toml, .yml and .yaml files directly in mods/<mod>/ other than manifest.json, and mods/<mod>/data/config.json.

Languages

Value of languageInterface
enEnglish
zh-HansSimplified Chinese
zh-HantTraditional Chinese
not setThe language of the system: English, or Chinese as its locale says.

The language is chosen on the Settings page, or with lip config; see Configuration. It changes at once. What a command says is in English in every language.

GitHub check

When the interface starts and github_proxy is not set, lip checks in the background whether it reaches GitHub, once, waiting up to 10 seconds. When it does not, the interface asks how to reach it:

AnswerDoes
A proxyAsks for its URL, tests it, and sets github_proxy to it.
Connect directlySets github_proxy to an empty value: lip neither checks nor asks again.
LaterChanges nothing; lip checks again the next time the interface starts.

See Settings.

Exit status

lip exits with code 0 when you quit the interface, whatever the commands carried out in it did, and whatever code the servers exited with.

Files

FileThe interface
workspaces.json in the state directoryReads and writes the list of workspaces.
config.toml in the config directoryReads language and github_proxy; writes them from the Settings page and from the GitHub check.
.lip/config.toml in a workspaceReads and writes restart (Auto restart).
server.properties, allowlist.json, permissions.json in a workspaceReads them; writes them on Save.
The configuration files of the mods, below mods/Reads them; writes the .json ones on Save.
.lip/logs/ in a workspaceWrites a failure report when a command fails.
https://levimc.org/api/v4/mods/Reads the mod catalogue. Nothing of it is written to disk, and github_proxy is not used for it.

The commands that the interface carries out read and write what their own pages say. Files lists every file and directory of lip.

See also