Mudis CLI
CLI utilities for Mudis development and runtime debugging. The CLI loads your application environment, attaches to the Mudis entry point, and provides a small set of commands for inspection and mutation.
Install
bundle add mudis-cli
Usage
Load a Rails app and list keys:
mudis -r ./config/environment.rb keys
Read a key:
mudis -r ./config/environment.rb get user:42
Write a key with TTL:
mudis -r ./config/environment.rb set --ttl 60 user:42 '{"name":"Ada"}' --json
Run a Mudis-QL expression:
mudis -r ./config/environment.rb ql "from('users').where(id: 42).first"
Start a REPL with helpers:
mudis -r ./config/environment.rb repl
Commands
keys [--namespace NS]get [--namespace NS] [--raw] KEYset [--namespace NS] [--ttl SECONDS] [--json] KEY VALUEdel [--namespace NS] KEYclear-namespace NAMESPACEmetricsresetreset-metricsleast-touchedql 'EXPR'repl
Global Options
-r, --require PATHRequire a file before running (repeatable).-e, --env NAMESetRACK_ENV/RAILS_ENVbefore requiring files.--const NAMEConstant name for Mudis entry point (default:Mudis).--format FORMATOutput format:textorjson.--[no-]colorEnable/disable colored output (default: auto). RespectsNO_COLOR.--verboseShow stacktraces on errors.
Notes
- The CLI defaults to the
Mudisconstant. Use--constif your app exposes a different entry point. qlandrepldepend onmudis-qland will fail if it is not installed.qlevaluates the expression withmudisandqlvariables in scope (qlpoints toMudisQL).
Development
bundle exec ruby -I lib bin/mudis --help