How do I install the Inform CLI?

I want to write games in VSCode. I’m running Ubuntu 24.04.03 I have installed Inform via Flatpak and also the Inform 7, Inform 6 and IF player extensions.

I created a game in the Inform 7 IDE before opening the folder in VS Code. But when I click the play icon to build it in VS Code, the progress bar just sits and waits – nothing happens.

Reading the extension documentation, I see “On Linux, it uses the installation of the command line interface, not the IDE.” I assume that’s where the problem lies. How do I check whether or not Inform 7 CLI is installed? If it isn’t, how do I install it?

Hi!

I’m the maintainer of the VS Code extensions (well, maintained them when I had the time).

The thing is, the VS Code extension hasn’t been updated for Inform 10. Back in the time before Inform 10, there was an option to download the CLI (the compilers wrapped in a Perl script if I recall correctly), but that doesn’t exist anymore as far as I know…

I did work on an update of the extension to use the compilers from the Flatpak IDE (since that’s the recommended way to install Inform), but never finished and released it.

In the meantime, you can go in the settings and set the paths of the compilers to the ones included in the Flatpak install. (You may want to do that in the project settings and not the global one).

(You can get the location of the Flatpak install with flatpak info --show-location com.inform7.IDE.)


There’s been more and more reports of people having trouble because the extension is outdated. I should really try and find some time to update it…

2 Likes

Thanks. Should I just use the location of flatpak info --show-location com.inform7.IDE as the path or do I need to point VSCode to each compiler specifically? Should I set all the compiler paths (Inform6, Cblorb, Inform6, Ni) to the same value?

You have to look for the path of each compilers in the folder shown by the flatpak command (so a different path for each binary).

At least, if I trust this post (it’s for Windows, but the rest shoud apply; I never used the extension with Inform 10):

Your issues seem to be more about using the VSCode plugin than installing the CLI per se, but since I have this out-take lying around the I7 Docs and Resources post’s cutting-room floor anyway…

Installation

Official build instructions. Clang is recommended over GCC.

inweb, intest, and inform must go in the same directory, e.g., i7:

mkdir i7 && cd i7
git clone --branch r7.2 --depth 1 https://github.com/ganelson/inweb.git

Optional (for the make alias use -j[N] where N = the number of threads your CPU offers):

alias make="make -j8"
export CFLAGS=-O2

Specify one of macos, macos32, macosarm, macosuniv, linux, windows, or unix:

bash inweb/scripts/first.sh linux
git clone --branch r2.1 --depth 1 https://github.com/ganelson/intest.git

(intest’s first.sh doesn’t get a parameter.)

bash intest/scripts/first.sh
git clone --branch r10.1 --depth 1 https://github.com/ganelson/inform.git

We cd inform before running its scripts/first.sh

cd inform
bash scripts/first.sh

Omit --branch rX.X from the git clone commands for the bleeding-edge development version, if you wish (it is not guaranteed to be stable).

CLI Usage

10.1 allows stand-alone story files. The following compiles story.i7 into story.i6. For Z-Code, add --format=Inform6/16; for a release version, add --release.

inform7/Tangled/inform7 --no-progress proj.i7

This compiles the I6 into story.ulx. For story.z8, use -v8 instead of -G. For a release version, replace -SD with -~S.

inform6/Tangled/inform6 -wE2 -SD -G proj.i6

With a project, you need at bare minimum a .inform project directory with uuid.txt and Source/story.ni. (The inform7 compiler will create a .materials directory upon its first compilation if there isn’t already one.)

mkdir -p dir.inform/Source
uuidgen > dir.inform/uuid.txt
echo "Lab is room" > dir.inform/Source/story.ni
inform7/Tangled/inform7 -no-index -no-progress -project dir

The results would be in dir.inform/Build:

  • output.ulx
  • auto.inf (the I7 compiler’s I6 output)

(If it doesn’t already exist, dir.materials is created alongside dir.inform upon first compilation.)

If you used release along with [a website, interpreter, etc.] (or otherwise want a blorb) you’ll additionally want to run:

inblorb/Tangled/inblorb dir/dir.inform/Release.blurb dir/dir.materials/Release/dir.gblorb

(For Z-code, replace .gblorb with .zblorb.) Results will be under dir/dir.materials/Release.

What the IDEs do (and the example you’ll see in the inblorb documentation) is:

inblorb/Tangled/inblorb dir/dir.inform/Release.blurb dir/dir.inform/Build/output.gblorb

If you do that, you’ll see the output:

Copy blorb to: [[dir/dir.materials/Release/dir.gblorb]]
! Completed: wrote blorb file with 3 picture(s), 0 sound(s), 0 data file(s)

but it doesn’t actually copy the file: that’s meant as an instruction to the IDE regarding what it should do. That’s why my inblorb above specifies dir/dir.materials/Release/dir.gblorb.

Note that release along with [...] does nothing if you’re working with a stand-alone story file; you must use a .inform project directory for this case.

See my old Command-line Inform 7: how to use ni, inform6, and cBlorb by CLI for 9.3/6M62 for more details about projects’ directory structures.

1 Like

It’s just that the VS Code extension has commands to compile source files, but it assumes a default location for the compilers. On Linux, it uses the CLI Perl wrapper that don’t exist anymore so I have to change that to the Flatpak (which is the recommended way to install Inform as far as I know).

You never have to interact with the compilers directly otherwise. (But maybe some command line options have changed since, and if so it won’t work. I’ll have to check.)

1 Like