properties

properties reads Java-style .properties files as keys and values, understands continued lines, and exposes dotted names as convenient paths for search and focused edits.

DataVersion 1.1.6Stable
lil-terminal

Overview

properties works directly with Java-style properties files: inspect dotted keys, search keys or values, update one setting atomically, validate the file, and dump normalized source when you need the whole document.

A dotted path still belongs to a flat file

database.host is convenient to address as a path, but the file on disk remains a flat properties file. Structural writes normalize it back to key=value lines, so use a text editor when comments or exact layout must be preserved.

Syntax

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

Reference

properties <file>

show properties data

properties <file> <key>

show one exact dotted path

properties dump <file>

show normalized properties source text

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

find matching keys or values; * and ? enable a mask

-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 by dotted path

-c

validate the properties file

Read, find and change a setting

Start with properties config/app.properties to see the current settings; add database.host to read one value. -f searches paths and values, while -k searches only key paths and -v only values. Ordinary text matches without case sensitivity; * and ? make a whole-field mask. Check syntax with -c and view the reconstructed file with dump.

Use -w <key> : <value> to change one value immediately, or -w <key> < <file> to read it from another file. -d <key> deletes a path. An unquoted true, false or number may be interpreted as a typed value; use care with strings that look like numbers. Make a copy before writing. $ refers to the most recently opened file in Core; a filename alone may invoke its registered handler.

Limits and safe editing

The reader handles simple properties, = or : separators, comments beginning with # or !, and continuations; dotted names become paths. Values are read as text, not as booleans or numbers. Escapes, Unicode conventions and layout are not preserved like a complete Java Properties implementation. Editing rewrites the file, removing comments. Minimum can only display the whole file.

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

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

install properties -m
Exact public version

Install exactly this published version.

install properties -v 1.1.6
Check or update

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

upgrade properties
Remove module

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

install properties -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 | properties app.properties
application.name   lil-shop
application.debug  true
database.host      localhost
database.port      3306
Show properties data
properties config/app.properties
application.name   lil-shop
application.debug  true
database.host      localhost
database.port      3306
Show one exact dotted path
properties config/app.properties database.host
localhost
Show one exact dotted path
properties config/app.properties application.debug
true
Find matching keys or values; * and ? enable a mask
properties config/app.properties -f "database.*" -k
database.host  localhost
database.port  3306
Find matching keys or values; * and ? enable a mask
properties config/app.properties -f "localhost" -v
database.host  localhost
Find matching keys or values; * and ? enable a mask
properties config/app.properties -f "debug"
application.debug  true
Write a value directly to the file
properties config/app.properties -w database.port : 3307
database.port  3307
Write a value read from another file
properties config/app.properties -w application.name < config/plain-value.txt
application.name  demo-site
Handle a missing file
properties config/app.properties -d application.debug
application.name  lil-shop
database.host     localhost
database.port     3306
Validate the properties file
properties config/app.properties -c
Valid properties
Show normalized properties source text
properties dump config/app.properties
application.name=lil-shop
application.debug=true
database.host=localhost
database.port=3306
Show one exact dotted path
properties config/app.properties unknown.key
Path not found
Validate the properties file
properties config/duplicate.properties -c
Duplicate properties key
Show properties data
properties config/missing.properties
File not found
Write a value directly to the file
properties config/app.properties -w database.port
Value required after : or 

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

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

application.name=lil-shop
application.debug=true
database.host=localhost
database.port=3306

Related documentation

Current public release

v1.1.62026-11-01

Production refinement

Current stable release of properties. properties reads Java-style `.