mql-cli
v1.1.9
Published
CLI tool for Metriqual PromptHub - manage prompts, proxy keys, and more
Maintainers
Readme
MQL CLI
Command-line interface for Metriqual PromptHub - manage prompts, proxy keys, and more from your terminal.
Installation
npm install -g mql-cliOr run directly with npx:
npx mql-cliQuick Start
# Authenticate with your API key
mql auth login
# List your prompts
mql prompts list
# Create a new prompt
mql prompts create -n "Code Review" -f prompt.txt
# Attach prompt to a proxy key
mql keys attach <keyId> <promptId>Commands
Authentication
# Login with API key
mql auth login
mql auth login -k <api-key>
# Check auth status
mql auth status
# Logout
mql auth logout
# Set custom API URL (for self-hosted)
mql auth set-url https://api.example.comPrompts Management
# List your prompts
mql prompts list
mql prompts ls --limit 50
mql prompts ls --search "code"
mql prompts ls --visibility public
# Get prompt details
mql prompts get <id>
mql prompts get <id> --content # Show only content
mql prompts get <id> --json
# Create a prompt
mql prompts create # Interactive mode
mql prompts create -n "My Prompt" -c "You are a helpful assistant"
mql prompts create -n "My Prompt" -f prompt.txt
mql prompts create -n "My Prompt" -f prompt.txt --category engineering --tags "code,review"
# Update a prompt
mql prompts update <id> -n "New Name"
mql prompts update <id> -f new-content.txt
mql prompts update <id> --priority 100
# Delete a prompt
mql prompts delete <id>
mql prompts rm <id> -y # Skip confirmation
# Publish to public hub
mql prompts publish <id> -s my-prompt-slug
mql prompts publish <id> -s my-prompt --category engineering --tags "code,ai"
# Unpublish
mql prompts unpublish <id>
# Generate share link
mql prompts share <id>
mql prompts share <id> --permission edit --expires 2024-12-31Proxy Keys
# List proxy keys
mql keys list
mql keys ls
# List prompts attached to a key
mql keys prompts <keyId>
# Attach a prompt to a key
mql keys attach <keyId> <promptId>
mql keys attach <keyId> <promptId> --params '{"name": "value"}'
# Detach a prompt
mql keys detach <keyId> <promptId>Discovery & Community
# Browse public prompts
mql discover
mql discover --search "code review"
mql discover --category engineering
mql discover --sort stars --limit 50
# Star a prompt
mql star <promptId>
# Remove star
mql unstar <promptId>
# Fork a prompt to your account
mql fork <promptId>Environment Variables
| Variable | Description |
|----------|-------------|
| MQL_API_KEY | API key (alternative to mql auth login) |
| MQL_API_URL | Custom API URL (default: https://api.metriqual.com) |
Output Formats
All list commands support --json flag for JSON output:
mql prompts list --json | jq '.[] | .name'Configuration
Config is stored at:
- macOS:
~/Library/Preferences/mql-cli-nodejs/config.json - Linux:
~/.config/mql-cli-nodejs/config.json - Windows:
%APPDATA%/mql-cli-nodejs/Config/config.json
Development
# Clone the repo
git clone https://github.com/metriqual/mql-cli
cd mql-cli
# Install dependencies
npm install
# Run in dev mode
npm run dev -- auth status
# Build
npm run build
# Link globally for testing
npm linkLicense
MIT
