ini

ini works with native INI files: read sections and typed values, search settings, validate syntax or atomically change one key. A path is either key or section.key.

DataVersion 1.3.6Stable
lil-terminal

Overview

ini works directly with INI files: read dotted keys, search keys or values, change one setting atomically, validate the result, or inspect the normalized source without a session buffer.

A section and a key make two levels

application.name selects name inside [application]. A deeper path such as a.b.c is rejected deliberately; JSON, TOML or YAML is a better fit when the configuration needs more nesting.

Syntax

lil-terminal
ini <file> [key|options] · ini dump <file>

Reference

ini <file>

show INI data

ini <file> <key>

show one exact path or value

ini dump <file>

show normalized source text

-f <text|mask> [-k|-v]

find matching keys, paths or values

-w <key> : <value>

write a value directly to the file

-w <key> < <file>

write a value read from another file

-d <key>

delete a value or path

-c

validate the file

Active file

With the current core, a successfully opened file is immediately available as $. If this module is the highest-priority installed handler for the file extension, typing the filename by itself opens it through this command. These are core conveniences; ini <file> remains the explicit form.

Search

-f searches paths and values. Add -k for keys only or -v for values only. Queries containing * or ? are treated as masks.

Direct editing

-w writes immediately to the file. Use : for an inline value or < <file> to read a value from another file. -d deletes one dotted path.

-w immediately saves a value, using : for inline input or < to read another file; -d deletes a key or section. Writes support key or section.key, not a.b.c. Rewriting can discard comments and spacing; repeated keys follow PHP INI parsing. Use edit or code for exact source edits. Minimum reads whole files; advanced operations 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.

Open the file and reuse it with $

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 ini
Minimum package

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

install ini -m
Exact public version

Install exactly this published version.

install ini -v 1.3.6
Check or update

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

upgrade ini
Remove module

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

install ini -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.

Open the file and reuse it with $
cd \sandbox\config | ini app.ini
application.name   lil-sandbox
application.debug  true
paths.source       ../src
paths.public       ../public
Show INI data
cd \sandbox\config | app.ini
application.name   lil-sandbox
application.debug  true
paths.source       ../src
paths.public       ../public
Show one exact path or value
ini config/app.ini application.name
lil-sandbox
Find matching keys, paths or values
ini config/app.ini -f "paths.*" -k
paths.source  ../src
paths.public  ../public
Find matching keys, paths or values
ini config/app.ini -f "../public" -v
paths.public  ../public
Find matching keys, paths or values
ini config/app.ini -f "debug"
application.debug  true
Write a value directly to the file
ini config/app.ini -w application.debug : false
application.debug  false
Write a value read from another file
ini config/app.ini -w application.name < config/plain-value.txt
application.name  demo-site
Delete a value or path
ini config/app.ini -d paths.public
application.name   lil-sandbox
application.debug  true
paths.source       ../src
Handle a missing file
ini config/app.ini -c
Valid INI
Show normalized source text
ini dump config/app.ini
[application]
name = "lil-sandbox"
debug = true

[paths]
source = "../src"
public = "../public"
Show one exact path or value
ini config/app.ini missing.key
Path not found
Write a value directly to the file
ini config/app.ini -w a.b.c : 1
INI paths support section.key only
Validate the file
ini config/invalid.ini -c
Invalid INI
Show INI data
ini config/missing.ini
File not found
Write a value directly to the file
ini config/app.ini -w application.name
Value required after : or 

File used in this example: sandbox/config/app.ini

The example uses a file or directory from the protected /sandbox/ documentation workspace.

[application]
name = "lil-sandbox"
debug = true

[paths]
source = "../src"
public = "../public"

Related documentation

Current public release

v1.3.62026-11-01

Production refinement

Current stable release of ini. ini works with native INI files: read sections and typed values, search settings, validate syntax or atomically change one key.