@bauwensbrent/moma
v1.0.4
Published
A maintenance & monitoring CLI tool for automating performance, security, visual testing, and dependency updates in modern web projects.
Readme
Moma – Command Line Interface
A maintenance & monitoring CLI tool for automating performance, security, visual testing, and dependency updates in modern web projects.
Requirements
- Node.js (with npm)
Installation
Install globally via npm
npm install -g @bauwensbrent/momaVerify it's working:
moma --versionLocal Installation (unix, mac os)
1. Clone this repository
git clone [email protected]:ikdoeict/brent.bauwens/2425bap-moma-cli.git2. Create an alias
Create an alias to the moma binary:
# moma alias
alias moma='/path/to/your/repository/moma/bin/moma.js'If you have zsh and want to automatically add this alias to the bottom of your .zshrc file,
run the following from the directory in which you ran the git clone command:
echo -e "\n# moma alias\nalias moma='$(pwd)/moma/bin/moma.js'" >> ~/.zshrcIf you want to immediately source the .zshrc file run:
source ~/.zshrc3. Install dependencies
Navigate into the repository directory
cd momaMake sure you use the correct version of Node:
nvm useInstall Node dependencies:
npm install4. Test your command
moma --versionLocal Installation (Windows & Powershell)
1. Clone the Repository
git clone [email protected]:leapforward/moma.git2. Create an Alias
Check if you have a PowerShell profile
Test-Path $PROFILEIf you don't have a profile, create one:
New-Item -ItemType File -Path $PROFILE -ForceOpen the profile in a text editor (e.g., Notepad)
notepad $PROFILEAdd the following line to your profile:
Function moma {
node "C:\path\to\repo\bin\moma.js" $args
}Refresh your PowerShell profile
. $PROFILE3. Install Dependencies
npm i4. Test Your Command
moma --helpGlobal Options
-V, --version
Output the CLI version-h, --help
Display help for a command
Commands
performance
Run a Lighthouse performance audit on a given URL.
Options:
--url <url>
The URL to test (default:http://localhost:3000)--threshold <score>
Minimum performance score (0–100). Exits with code1if score is below threshold.--emulated-form-factor <type>
Emulated form factor (mobile,desktop,none). Defaults tomobile.--categories <list>
Comma-separated list of Lighthouse categories (performance,accessibility,seo,best-practices). Default is all.--verbose
Show detailed logging.
Example:
moma performance --url http://localhost:5173 --threshold 85 --categories performance,seoupdate
Update outdated packages and optionally run Lighthouse and Percy tests before/after.
Options:
--url <url>
Run performance audits before and after updating (if provided)--dry-run
Simulate the update process without making changes--verbose
Show detailed logging--skip-percy
Skip Percy visual testing
Example:
moma update --url http://localhost:5173security
Run a Snyk security scan on the current project.
Options:
--fail-on <severity>
Fail if vulnerabilities are at or above this severity (low,moderate,high,critical)--verbose
Show detailed logging
Example:
moma security --fail-on highreport
Run both performance and security tests and generate a report.
Options:
--format <type>
Output format:json,html(default:json)--url <url>
The URL to analyze (default:http://localhost:3000)--output <path>
Path to save the report (default:./moma-report.<format>)--verbose
Show detailed logging
Example:
moma report --url http://localhost:5173 --format html --output ./output/report.htmluptime
Check uptime status of a specific URL using uptime.com.
Options:
--url <url>
The URL to check--verbose
Show detailed logging
Example:
moma uptime --url https://example.comuptime:token
Set or update the Uptime.com API token used for uptime checks.
Example:
moma uptime:tokenExample Workflow
- Check performance locally:
moma performance --url http://localhost:3000 --threshold 90- Automatically update packages and test again:
moma update --url http://localhost:3000- Run full report:
moma report --format pdfMade with ❤️ by Brent Bauwens
GitLab Repository
