Loom73 Shuttle¶
Shuttle is the Loom73 command-line tool.
It installs, inspects and maintains a Loom73 instance through small, explicit commands.
Running Shuttle¶
Run commands from the application root:
On a deployed instance, use the deployment user. Avoid using root or the web-server user for ordinary administration.
Shuttle loads:
before resolving the requested command.
Available commands¶
The current command set is:
loom73.info¶
Inspect the current instance:
The command reports:
Loom73 version
SYSTEM_STATUS environment
PHP version
environment-file health
module configuration
database connection
storage directory availability and permissions
required PHP extensions
installed runtime dependency versions
Ledger configuration
Gauge configuration
The database check uses:
which prepares and executes:
The final status is one of:
An unhealthy result exits with status code 1. A healthy result, including one with warnings, exits with status code 0.
Warnings include incomplete environment values. Errors include a missing .env, failed database connection, missing or unwritable runtime directories, missing required extensions, or missing runtime packages.
Gauge is reported as not configured until the planned component and its configuration are added.
loom73.install¶
Install the database structure and runtime directories:
This is a destructive clean-install command. It asks for confirmation and may drop and recreate Loom73 tables.
It currently initializes:
authentication tables
roles and seed data
asset types
assets
Ledger events
storage/
storage/uploads/
storage/logs/
storage/cache/
Use it for a new instance or a deliberately disposable development database.
Do not use it as an update mechanism for an existing production database.
The future release path will distinguish:
After installation, run:
user.admin¶
Create an administrator interactively:
Shuttle asks for:
It creates the user with the administrator role and initializes a session record.
The command requires a working database and should normally be run after loom73.install.
asset_type.new¶
Create a Yarn asset type:
Shuttle asks for:
Asset types provide semantic classifications such as:
They are distinct from owner slots. An owner slot describes where an asset belongs; an asset type describes what the file represents.
ledger.cleanup¶
Apply the configured Ledger retention policy:
The retention period is read from:
Interactive execution displays the configured period and asks for confirmation.
For scheduled or otherwise non-interactive execution, pass:
To request permanent removal of all Ledger records:
For non-interactive purging:
A retention value of 0 means that automatic retention cleanup is disabled.
The application administrator must configure any cron schedule separately. Shuttle does not install cron entries.
session.cleaner¶
Run the current PHP-session diagnostic cleaner:
The current command opens the CLI session, invokes PHP session garbage collection, destroys that session and prints diagnostic session data.
It does not purge Loom73 authentication-session rows from the database and should not be documented or scheduled as a complete application-session cleanup mechanism.
Treat it as a development or diagnostic command until a production session-cleanup contract is defined.
Command resolution¶
Command files live in:
The filename is the command name:
Dots separate words when Shuttle resolves the class:
The file must contain the resolved class:
<?php
namespace Loom73\Shuttle;
class DatabaseUpdate
{
public function __construct(?array $args = null)
{
$this->run($args ?? []);
}
private function run(array $args): void
{
// Command logic.
}
}
Shuttle passes command-line arguments after the command name as an array to the constructor.
Existing commands that do not need arguments may ignore it.
A command does not need to extend a common base class.
CLI helper¶
The reusable helper is:
It currently provides:
Colored output¶
Supported named colors include:
red
green
yellow
blue
magenta
cyan
light grey
dark grey
light red
light green
light yellow
light blue
light magenta
light cyan
Questions¶
Read a free-form answer:
Request confirmation:
confirm() accepts y, yes, n and no, repeating the question for any other input.
Command design¶
A Shuttle command should:
perform one recognizable operation
make destructive behavior explicit
confirm destructive interactive operations
require explicit flags for destructive automation
return a non-zero exit code on failure
avoid browser or web-session assumptions
avoid exposing passwords and secrets
Small commands may keep their flow in the constructor. Larger commands should delegate to private methods.
Shuttle is intentionally small. Shared abstractions should be introduced only after more than one real command needs them.
Deployment relationship¶
Deployment and installation are separate operations:
GitHub Actions
builds and sends application code
Shuttle
initializes or maintains runtime state
VPS
owns configuration, database data, uploads and logs
The core rule is: