This document provides a comprehensive reference for all commands available in the MayR Labs CLI.
- General Commands
- System Commands
- Encoding/Decoding Commands
- Git Commands
- Environment Commands
- Changelog Commands
- Flutter Commands
- PHP Commands
- JavaScript Commands
- AI Commands
- Session Management
- Alias Management
Generate a UUID v4 (Universally Unique Identifier).
Usage:
mayrlabs uuid [--copy]Flags:
--copy- Copy the generated UUID to clipboard
Examples:
# Generate a UUID
mayrlabs uuid
# Output: 550e8400-e29b-41d4-a716-446655440000
# Generate and copy to clipboard
mayrlabs uuid --copyGenerate a ULID (Universally Unique Lexicographically Sortable Identifier).
Usage:
mayrlabs ulid [--copy]Flags:
--copy- Copy the generated ULID to clipboard
Examples:
# Generate a ULID
mayrlabs ulid
# Output: 01ARZ3NDEKTSV4RRFFQ69G5FAV
# Generate and copy to clipboard
mayrlabs ulid --copyGenerate a cryptographically secure random password.
Usage:
mayrlabs password [length]Arguments:
length- Password length (default: 16, interactive if omitted)
Examples:
# Generate 16-character password
mayrlabs password
# Generate 32-character password
mayrlabs password 32
# Interactive mode
mayrlabs password
# Will prompt for lengthGenerate a random integer within a specified range.
Usage:
mayrlabs random-intInteractive Mode:
- Prompts for minimum value
- Prompts for maximum value
Examples:
mayrlabs random-int
# Enter min value: 1
# Enter max value: 100
# Output: 42Generate a hash of a string using various algorithms.
Usage:
mayrlabs hash [string] [--algorithm ALGORITHM]Arguments:
string- String to hash (interactive if omitted)
Flags:
--algorithm- Hash algorithm:md5,sha1,sha256(default: sha256)
Examples:
# Generate SHA256 hash
mayrlabs hash "my-secret"
# Generate MD5 hash
mayrlabs hash "my-secret" --algorithm md5
# Generate SHA1 hash
mayrlabs hash "password123" --algorithm sha1Generate a hash of a file's contents.
Usage:
mayrlabs hash-file [file] [--algorithm ALGORITHM]Arguments:
file- Path to file (interactive if omitted)
Flags:
--algorithm- Hash algorithm:md5,sha1,sha256(default: sha256)
Examples:
# Hash a file with SHA256
mayrlabs hash-file document.txt
# Hash with MD5
mayrlabs hash-file image.jpg --algorithm md5Create a new Android keystore in PKCS12 format.
Usage:
mayrlabs create-keystoreInteractive Prompts:
- Key alias
- Keystore filename
- Validity period (days)
- Key password
- Distinguished name details (name, organization, city, state, country)
Examples:
mayrlabs create-keystore
# Prompts for all required information
# Creates: myapp.keystoreClear the DNS cache on your system.
Usage:
mayrlabs dns-clearSupported Platforms:
- macOS: Runs
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder - Linux: Runs
sudo systemd-resolve --flush-caches - Windows: Runs
ipconfig /flushdns
Examples:
mayrlabs dns-clear
# Select your OS
# Runs the appropriate commandGenerate CI/CD workflow configuration files.
Usage:
mayrlabs ci [--lang LANGUAGE] [--vcs VCS]Flags:
--lang- Programming language:go,javascript,python,php,flutter,dart--vcs- Version control system:github,gitlab,circleci
Examples:
# Generate GitHub Actions for Go
mayrlabs ci --lang go --vcs github
# Generate GitLab CI for Python
mayrlabs ci --lang python --vcs gitlab
# Interactive mode
mayrlabs ciOutput Files:
- GitHub:
.github/workflows/ci.yml - GitLab:
.gitlab-ci.yml - CircleCI:
.circleci/config.yml
Format code for various programming languages.
Usage:
mayrlabs format [language]Supported Languages:
go- Runsgofmtandgo fmtjavascript- Runs Prettierpython- Runs Black and autopep8php- Runs PHP-CS-Fixerdart- Runsdart format
Examples:
# Format Go code
mayrlabs format go
# Format JavaScript
mayrlabs format javascript
# Interactive mode
mayrlabs formatCreate a LICENSE file for your project.
Usage:
mayrlabs add-license [--type TYPE] [--author AUTHOR] [--year YEAR] [--author-url URL] [--force]Flags:
--type- License type:mit,apache2,gpl3,bsd3--author- Copyright holder name--year- Copyright year (default: current year)--author-url- Optional URL for the author--force- Overwrite existing LICENSE file
Examples:
# Create MIT license
mayrlabs add-license --type mit --author "John Doe" --year 2025
# With author URL
mayrlabs add-license --type mit --author "ACME Corp" --author-url "https://acme.com"
# Interactive mode
mayrlabs add-licenseGenerate an .editorconfig file for consistent code formatting.
Usage:
mayrlabs editor-config [language]Supported Languages:
gojavascriptpythonphpdartgeneral
Examples:
# Generate for Go project
mayrlabs editor-config go
# Generate for JavaScript project
mayrlabs editor-config javascript
# Interactive mode
mayrlabs editor-configRoll virtual dice and get results.
Usage:
mayrlabs roll-dice [n]Arguments:
n- Number of dice to roll (1-100)
Examples:
# Roll 3 dice
mayrlabs roll-dice 3
# Output: Results: [4 1 3], Total: 8, Average: 2.67
# Interactive mode
mayrlabs roll-diceDisplay a random motivational quote for developers.
Usage:
mayrlabs quoteExamples:
mayrlabs quote
# Output: "First, solve the problem. Then, write the code." - John JohnsonDisplay the current version of MayR Labs CLI.
Usage:
mayrlabs versionExamples:
mayrlabs version
# Output: mayrlabs version 1.0.0Open the MayR Labs website in your default browser.
Usage:
mayrlabs visitURL: https://mayrlabs.com
Open the mayrlabs-go GitHub repository in your default browser.
Usage:
mayrlabs githubURL: https://github.com/MayR-Labs/mayrlabs-go
Upgrade MayR Labs CLI to the latest version.
Usage:
mayrlabs upgradeBehavior:
- Downloads the latest release from GitHub
- Detects your OS and architecture automatically
- Replaces the current binary
- Requires appropriate permissions
Examples:
mayrlabs upgradeEncode or decode strings using Base64.
Usage:
mayrlabs base64 <encode|decode> [string] [--copy]Arguments:
encode|decode- Operation to performstring- String to encode/decode
Flags:
--copy- Copy result to clipboard
Examples:
# Encode a string
mayrlabs base64 encode "Hello World"
# Output: SGVsbG8gV29ybGQ=
# Decode a string
mayrlabs base64 decode "SGVsbG8gV29ybGQ="
# Output: Hello World
# Encode and copy
mayrlabs base64 encode "secret" --copyEncode a file to Base64.
Usage:
mayrlabs base64-file [path] [--copy]Arguments:
path- Path to file
Flags:
--copy- Copy result to clipboard
Examples:
# Encode a file
mayrlabs base64-file document.txt
# Encode and copy
mayrlabs base64-file image.png --copyDecode a Base64 string and write to a file.
Usage:
mayrlabs base64-decode-to-file [string] [output-file]Arguments:
string- Base64 encoded stringoutput-file- Path where decoded content should be written
Examples:
mayrlabs base64-decode-to-file "SGVsbG8gV29ybGQ=" output.txtShow available Git-related commands.
Usage:
mayrlabs gitDelete all local branches that no longer exist on the remote.
Usage:
mayrlabs git prune-staleBehavior:
- Fetches latest remote information
- Identifies branches deleted on remote
- Prompts for confirmation
- Deletes local copies of removed branches
Examples:
mayrlabs git prune-staleList available environment file management commands.
Usage:
mayrlabs envSynchronize .env.example with .env or another source file.
Usage:
mayrlabs env update-example [source]Arguments:
source- Source file (default:.env)
Behavior:
- Reads all keys from source file
- Writes keys with empty values to
.env.example - Preserves formatting and comments
- Creates
.env.exampleif it doesn't exist
Examples:
# Update from .env
mayrlabs env update-example
# Update from .env.staging
mayrlabs env update-example .env.stagingValidate environment files for errors and inconsistencies.
Usage:
mayrlabs env validateChecks:
- Missing values
- Duplicate keys
- Invalid syntax
- Keys in
.env.examplebut missing in.env - Keys in
.envbut missing in.env.example
Examples:
mayrlabs env validateOrganize environment variables by prefix.
Usage:
mayrlabs env arrange [file]Arguments:
file- Environment file to arrange (default:.env)
Behavior:
- Groups variables by prefix (e.g.,
APP_*,DB_*,AWS_*) - Sorts keys alphabetically within groups
- Preserves comments
- Creates backup of original file
Examples:
# Arrange .env
mayrlabs env arrange
# Arrange .env.staging
mayrlabs env arrange .env.stagingDisplay all changelog management commands.
Usage:
mayrlabs changelogCreate a new CHANGELOG.md file.
Usage:
mayrlabs changelog create [--force]Flags:
--force- Overwrite existing CHANGELOG.md
Examples:
# Create new changelog
mayrlabs changelog create
# Force overwrite
mayrlabs changelog create --forceAdd a new version entry to the changelog.
Usage:
mayrlabs changelog record [version] [summary] [--wip]Arguments:
version- Version number (e.g.,v1.2.0)summary- Brief description of changes
Flags:
--wip- Mark as Work In Progress
Examples:
# Add a release entry
mayrlabs changelog record v1.2.0 "Added user authentication"
# Add a WIP entry
mayrlabs changelog record v1.3.0 "Working on API improvements" --wipList Flutter-related commands.
Usage:
mayrlabs flutterGenerate build scripts for Flutter projects.
Usage:
mayrlabs flutter create-scriptsGenerated Scripts:
scripts/build-apk.sh- Build debug APKscripts/build-apk-release.sh- Build release APKscripts/build-appbundle.sh- Build App Bundlescripts/build-ios.sh- Build iOS appscripts/build-ipa.sh- Build IPAscripts/clean.sh- Clean build artifactsscripts/run-tests.sh- Run Flutter tests
Examples:
mayrlabs flutter create-scripts
# Then use:
./scripts/build-apk-release.shList PHP-related commands.
Usage:
mayrlabs phpRun PHP CodeSniffer or PHP-CS-Fixer to fix code style issues.
Usage:
mayrlabs php cs-fixExamples:
mayrlabs php cs-fixLint PHP files for syntax errors.
Usage:
mayrlabs php lintExamples:
mayrlabs php lintList JavaScript-related commands.
Usage:
mayrlabs jsInstall and configure Prettier for JavaScript/TypeScript projects.
Usage:
mayrlabs js setup-prettierActions:
- Installs Prettier via npm
- Creates
.prettierrc.yamlconfiguration - Creates
.prettierignorefile
Examples:
mayrlabs js setup-prettierFormat JavaScript/TypeScript code with Prettier.
Usage:
mayrlabs js prettyExamples:
mayrlabs js prettyConfigure Gemini API key for AI features.
Usage:
mayrlabs ai-setupBehavior:
- Prompts for Gemini API key (get from https://aistudio.google.com/app/apikey)
- Validates the key by making a test request
- Stores the key securely in
~/.mayrlabs/gemini-api-key
Examples:
mayrlabs ai-setup
# Enter your Gemini API key: [paste key]
# ✅ API key validated and stored successfullyQuery the AI using Google's Gemini model.
Usage:
mayrlabs ai [query...]Arguments:
query- Question or prompt (supports multi-word queries)
Behavior:
- If query provided: Sends to AI immediately
- If no query: Opens multiline input form
- Uses
gemini-2.0-flash-expmodel - Maintains conversation context within session
Examples:
# Single query
mayrlabs ai "How do I implement a binary search tree in Go?"
# Multi-line input
mayrlabs ai
# Opens interactive prompt for longer queriesSend a file's content to the AI for analysis or review.
Usage:
mayrlabs ai-file [path]Arguments:
path- Path to text-based file
Behavior:
- Reads file content
- Sends to AI with context
- Returns AI analysis/suggestions
Examples:
# Review a source file
mayrlabs ai-file src/main.go
# Analyze a configuration file
mayrlabs ai-file nginx.confCreate a permanent shell alias for the mayrlabs ai command.
Usage:
mayrlabs ai-alias [name]Arguments:
name- Alias name
Examples:
# Create an 'ask' alias
mayrlabs ai-alias ask
# Now use:
ask "What is dependency injection?"Remove the stored Gemini API key.
Usage:
mayrlabs ai-clearExamples:
mayrlabs ai-clear
# API key cleared successfullyStart an interactive development session.
Usage:
mayrlabs session-start [summary]Arguments:
summary- Brief description of session (interactive if omitted)
Features:
- Records all AI interactions
- Saves notes and commands
- Tracks session duration
- Stores in
~/.mayrlabs/sessions/
Examples:
# Start with summary
mayrlabs session-start "Implementing user authentication"
# Interactive mode
mayrlabs session-startList and manage all sessions.
Usage:
mayrlabs sessionsBehavior:
- Lists all session files
- Shows summary and timestamp
- Allows opening/viewing sessions
Examples:
mayrlabs sessionsClear all sessions with PIN confirmation.
Usage:
mayrlabs session-clearBehavior:
- Requires PIN confirmation
- Deletes all session files
- Cannot be undone
Examples:
mayrlabs session-clear
# Enter PIN to confirm: [enter PIN]Delete sessions older than specified days.
Usage:
mayrlabs session-prune [days]Arguments:
days- Age threshold in days
Examples:
# Delete sessions older than 30 days
mayrlabs session-prune 30
# Delete sessions older than 7 days
mayrlabs session-prune 7Start an encrypted interactive development session.
Usage:
mayrlabs secure-session-start [summary]Arguments:
summary- Brief description of session
Features:
- End-to-end encryption
- Password-protected
- Secure storage
- Same features as regular sessions
Examples:
# Start encrypted session
mayrlabs secure-session-start "Security vulnerability fix"
# Enter encryption password: [password]List and manage encrypted secure sessions.
Usage:
mayrlabs secure-sessionsBehavior:
- Lists all encrypted sessions
- Requires password to open
- Shows summary and timestamp
Examples:
mayrlabs secure-sessionsCreate a permanent shell alias for the mayrlabs command.
Usage:
mayrlabs alias [name]Arguments:
name- Alias name
Behavior:
- Creates alias in shell configuration file
- Supports bash, zsh, fish
- Updates current session
- Persists across restarts
Examples:
# Create 'ml' alias
mayrlabs alias ml
# Now use:
ml version
ml uuidList all mayrlabs aliases.
Usage:
mayrlabs alias-listExamples:
mayrlabs alias-list
# Output:
# ml -> mayrlabs
# ask -> mayrlabs aiClear all mayrlabs aliases with confirmation.
Usage:
mayrlabs alias-clearBehavior:
- Prompts for confirmation
- Removes all aliases from shell configuration
- Reloads shell configuration
Examples:
mayrlabs alias-clear
# Are you sure? [y/N]: y
# All aliases clearedThe CLI uses standard exit codes:
0- Success1- General error2- Misuse of shell command (invalid arguments)
Override the default configuration directory (default: ~/.mayrlabs).
export MAYRLABS_HOME=/custom/pathAll configuration files are stored in ~/.mayrlabs/ (or $MAYRLABS_HOME).
gemini-api-key- Stored Gemini API key (plain text)sessions/- Regular session files (Markdown format)secure-sessions/- Encrypted session filesaliases.conf- Shell alias configurations
- Use
--copyflags when you need to paste output elsewhere - Interactive mode is great for commands with many options
- Create aliases for frequently used commands
- Use sessions to track complex development work
- Secure sessions for sensitive or confidential work
- Regular pruning keeps your session storage clean
- AI features work best with clear, specific questions
For any command, use the --help flag:
mayrlabs --help
mayrlabs [command] --helpReport Issues: https://github.com/MayR-Labs/mayrlabs-go/issues
Documentation: https://github.com/MayR-Labs/mayrlabs-go
Last Updated: 2025-10-27 (v1.0.0)