Mayo CLI Documentation

Mayo CLI is an autonomous AI companion for your terminal, designed to transform how you interact with data. Whether you're a data scientist, researcher, or developer, Mayo helps you query, analyze, and enrich your datasets using natural language — all while keeping your data private and secure.

New to Mayo? Run /wizard after installation for a guided setup that walks you through configuring your AI provider and connecting your first data source.

Installation

curl -fsSL https://mayo.teleskop.id/install.sh | bash

Termux (Android)

bash install_termux.sh

Prerequisites

You can install prerequisites automatically with: bash setup_prerequisites.sh

First Run

After installation, start Mayo and run the onboarding wizard:

mayo
> /wizard

The wizard guides you through:

  1. Selecting and configuring your AI Provider (API key, model).
  2. Connecting your first data source (database or file).
  3. Setting up privacy preferences (PII masking, interactive mode).

All Commands

Mayo operates in an interactive shell. Use slash commands (/command) for administrative tasks and natural language for data queries.

AI & Configuration

Manage AI behavior, privacy settings, and persistent context.

Command Alias Description
/mayo Displays version, license, and current system health status.
/setup /s Launch the interactive configuration wizard for AI Providers (Gemini, OpenAI, Groq, Anthropic) and preferences.
/model Change the active LLM model for the current session.
/profile ai, ds Switch between saved AI or Data Source profiles.
/context [text/file/clear] Set persistent business logic or domain knowledge.
/privacy Toggle PII Masking (ON/OFF). Masks emails, phones, credentials before cloud transit.
/debug Toggle Debug Mode — see raw AI prompts and metadata.
/analyst Toggle Analyst Insight — auto-analysis of query results.
/wizard Starts the guided onboarding process for new users.

Connectivity & Data Sources

Connect Mayo to your databases and files.

Command Alias Description
/connect /c Connect to a new data source (Postgres, MySQL, SQLite, File).
/sources List all active connections and detailed connection strings.
/disconnect [alias] Close a connection to a specific data source.
/scan Re-read schema and metadata from all connected sources.
/describe [alias] Generate a Pandas-style statistical summary of a table or dataframe.
/annotate [target] [desc] Add AI-readable descriptions (e.g., /annotate users.id "Internal UUID").
Example connection strings:
PostgreSQL: /connect postgres postgres://user:pass@localhost:5432/mydb
CSV File: /connect file data/customers.csv
Folder: /connect file ./data-folder/

Data Processing (Dataframes)

Mayo uses "Dataframe Mode" to stage results in memory for complex analysis.

Command Subcommand Description
/reconcile /compare AI-powered reconciliation between two data sources.
/df list List all saved dataframes.
/df load [name] Load a saved dataframe or knowledge doc into memory.
/df commit [name] Persist current result set into local SQLite storage.
/df status Check the current state of the working copy.
/df reset Clear memory and return to Pure Database Mode.
/df export [name] Export a result set (Markdown, CSV, JSON).
/plot [chart type] Generate ASCII charts or trend data descriptions.
/enhance start Launch the AI Data Enhancer for the active dataframe.

Knowledge Base (RAG)

Build a semantic memory from external documents.

Command Arguments Description
/knowledge [file] Index a PDF, Markdown, or Text file into the vector store.
/knowledge against [file] Compare a document against indexed knowledge (Gap analysis).

Sessions & Research

Organize your research threads with persistent sessions.

Command Subcommand Description
/sessions create Start a fresh research session.
/sessions list Switch between historical sessions.
/sessions rename Give a meaningful title to the current session.
/sessions delete Remove a session and its associated data/vault.
/export [file.md] Export session transcript to a file.
/share [file.md] Generate an AI-powered Executive Report.
/audit View last 100 lines of the prompt audit log.
/history [session_id] View full transcript of a session.
/changelog View feature updates and version history.

API & System

Command Subcommand Description
/serve spawn, stop, logs, status Manage Mayo's background API server.
/this "God Mode" status: IDs, directories, active structures.
/clear Clear the terminal screen.
/help [query] Open interactive manual or search commands.
/exit /q, /quit Terminate session and close connections.

Terminal Commands (External)

Commands run directly from your shell, not inside Mayo's interactive mode.

Command Usage Description
mayo serve mayo serve --port 8080 Start a foreground REST API server with multi-session support.
mayo release-notes mayo release-notes Generate an AI changelog from git commits.
mayo scraper mayo scraper spawn [q] Start a Teleskop.id data scraper in background.
mayo wizard mayo wizard Run the onboarding wizard.

Natural Language Queries

Mayo's core feature is the ability to ask questions about your data in plain English. Here's how it works:

  1. Connect — Link a database or file with /connect.
  2. Ask — Type your question naturally. Mayo generates SQL based on your schema metadata.
  3. Review — With Interactive Mode enabled, review the generated SQL before execution.
  4. Results — Data is fetched, displayed as a table, and optionally analyzed by the AI analyst.
mayo▸ What are the top 10 customers by total spend this quarter?

 Generating SQL...
SELECT customer_name, SUM(amount) as total_spend
FROM orders
WHERE order_date >= '2026-01-01'
GROUP BY customer_name
ORDER BY total_spend DESC
LIMIT 10;

✓ Run this query? [Y/n]: y
✓ 10 rows returned in 0.34s
Mayo only sends schema metadata (table/column names) to the AI. Your actual data rows never leave your machine.

Data Enrichment

The AI Data Enhancer processes your datasets row-by-row using an AI model. Common use cases:

/enhance start --prompt "Classify the sentiment of the 'feedback' column"

The enhancer runs incrementally and can be stopped and resumed. Progress is saved in your local SQLite database.

Data Reconciliation

The /reconcile command compares data across two connected sources, identifying discrepancies with AI assistance.

/reconcile
> Select source A: postgres (analytics_db)
> Select source B: file (bank_statement.csv)
> AI analyzing mapping patterns...

Mayo presents a summary of findings, then lets you choose between automatic reconciliation or manual row selection (git-commit style).

Knowledge Base (RAG)

Build a semantic memory from your documents for contextual queries.

/knowledge rfp_proposal.pdf
✓ Indexed 247 chunks from rfp_proposal.pdf

mayo▸ What are the compliance requirements mentioned in the RFP?

You can also cross-reference knowledge documents against each other for gap analysis:

/knowledge against compliance_checklist.md

API Server

Expose Mayo as a REST API for integration with other applications.

mayo serve --port 8080

Endpoints available:

Endpoint Method Description
/v1/:session_id/query POST Send a natural language query for a specific session.
/v1/status GET Health check and server status.
Authentication with Bearer token is required. CORS is enabled for cross-origin access.

Trust & Security

Mayo is designed with a "Security First, Privacy Always" philosophy. Here are the key security pillars:

PII Masking

Mayo's built-in PII Detection Engine (internal/privacy) automatically scans for sensitive information before any cloud communication:

Tokens are mapped back to original values only on your local machine. Toggle with /privacy.

Prompt Auditing

Use /audit to see the exact JSON payload sent to the AI at any time. Audit logs are stored at:

~/.mayo-cli/sessions/[session_id]/audit.log

Secure Credentials

API keys are stored in your OS Keychain (macOS Keychain / Windows Credential Manager) — never in plain text.

Network Verification

Mayo only communicates with your database and your chosen AI provider. Verify using network tools like Little Snitch or Wireshark.

Architecture

Changelog

View the latest feature updates directly in Mayo:

/changelog

Or generate AI-powered release notes from git commits:

mayo release-notes

© 2026 Teleskop.id. All rights reserved.