Documentation / CLI

InfiniteScript CLI

The InfiniteScript CLI is the command-line interface for creating, checking, building and running InfiniteScript projects.

Current implementation

The commands marked as implemented correspond to the current InfiniteScript CLI. Other commands are part of the planned CLI architecture and will become available as their runtime features are implemented.

Overview

The CLI is accessed through Inf.exe.

Command
Inf.exe <command> [arguments]

inf help Implemented

Displays available CLI commands and usage information.

Windows Terminal
Inf.exe help

inf version Implemented

Displays the installed InfiniteScript version.

Windows Terminal
Inf.exe version

inf run Implemented

Runs an InfiniteScript source file.

Windows Terminal
Inf.exe run Examples\Hello.infs

If the program contains Infinite UI, the native UI runtime is started instead of a web renderer.

inf check Implemented

Checks an InfiniteScript file by lexing, parsing and analysing it without executing the program.

Windows Terminal
Inf.exe check Examples\Hello.infs

inf build Implemented

Builds and validates an InfiniteScript source file.

Windows Terminal
Inf.exe build Examples\Hello.infs

inf new Implemented

Creates a new InfiniteScript project.

Windows Terminal
Inf.exe new MyProject

inf init Implemented

Initialises an InfiniteScript project in the current directory.

Windows Terminal
Inf.exe init

inf clean Implemented

Cleans generated project files.

Windows Terminal
Inf.exe clean

Typical Workflow

Windows Terminal
# Create a project
Inf.exe new MyProject

# Check your code
Inf.exe check main.infs

# Build it
Inf.exe build main.infs

# Run it
Inf.exe run main.infs

Planned CLI Architecture

As InfiniteScript grows, the CLI will provide commands for packages, documentation, formatting, testing and project management.

package

Install, remove, update and inspect InfiniteScript packages.

test

Run project and language test suites.

format

Automatically format InfiniteScript source code.

docs

Generate documentation from an InfiniteScript project.

run --watch

Automatically restart a development program after changes.

build --release

Create an optimised release build.

inspect

Inspect tokens, AST structures and runtime information.

repl

Open an interactive InfiniteScript command environment.

Complete Command Reference

InfiniteScript CLI
Inf help
Inf version

Inf run <file>
Inf check <file>
Inf build <file>

Inf new <project>
Inf init
Inf clean

Inf test
Inf format
Inf repl
Inf debug <file>
Inf inspect <file>
Inf profile <file>
Inf docs

Inf package install <package>
Inf package remove <package>
Inf package update
Inf package list
Inf package search <query>
Inf package info <package>

Inf run <file> --watch
Inf build <file> --debug
Inf build <file> --release

CLI Errors

InfiniteScript reports structured errors using the INF error code system.

Example
Error [INF1001]
File: Examples\Hello.infs
Line: 3
"Sya" is not recognised.

Did you mean:
    Say

Error ranges are grouped by subsystem, making compiler and runtime problems easier to identify.

INF1000–1099

Syntax errors

INF1100–1199

Commands

INF1200–1299

Variables and types

INF1300–1399

Functions

INF1400–1499

Infinite UI

INF1500–1599

Backend

INF1600–1699

Files and storage

INF1700–1799

Events

INF1800–1899

Security

INF2000–2099

Runtime

INF9000–9099

Internal errors