Skip to content
Build with Mammoth › CLI reference: open the docs menu

mammoth ai

Generated from mammoth-cli 2.4.2, released 2026-11-02: mammoth schema list, mammoth capability list and the CLI's own --help. Do not edit by hand; run npm run docs:capabilities.

Generate AI-assisted expressions and conditions. 5 commands.

Every command also takes the global flags (--output, --yes, --confirm, --dry-run, --input, --profile, ...), which are not repeated below. --input takes a JSON or YAML document of the input fields; mammoth schema get COMMAND_ID prints a command's full input schema.

Confirmation. Commands marked --yes --confirm TARGET or --yes always need those flags, even at a terminal: they never prompt. Commands marked "--yes or prompt" ask at an interactive terminal (table output, no --no-input) and otherwise need --yes. --dry-run skips confirmation and sends nothing.

Summary

CommandWhat it doesEffectConfirmation
ai condition generateGenerate a filter condition from a natural language intent.Read—
ai expression generateGenerate a math/metric expression from a natural language intent.Read—
ai retention conditionGenerate or test a retention-policy WHERE clause for a dataset.Benign mutation—
ai sql generateGenerate SQL from a natural language intent.Read—
ai suggestion listList AI-powered suggestions for the active project.Read—

ai condition

mammoth ai condition generate

Generate a filter condition from a natural language intent.

mammoth ai condition generate 123 --input '{"intent": "Summarize revenue by region"}'
NamePassed asRequiredDefaultTypeNotes
DATASET_IDpositionalyes—intID of the dataset to generate a condition for.
intent--input fieldyes—str
dataview_id--input fieldno—int
sequence_number--input fieldno—int
  • Effect: Read, scope profile · Confirmation: none
  • Preconditions: Required inputs: DATASET_ID.
  • Id: ai.condition.generate · Result: AiConditionGenerateResult · Backed by: SDK mammoth.api.ai.AIAPI.condition_generate, API POST /workspaces/{workspace_id}/projects/{project_id}/sql_generation/condition (GenerateCondition)

ai expression

mammoth ai expression generate

Generate a math/metric expression from a natural language intent.

mammoth ai expression generate 123 --input '{"intent": "Summarize revenue by region", "mode": "math"}'
NamePassed asRequiredDefaultTypeNotes
DATASET_IDpositionalyes—intID of the dataset to generate an expression for.
intent--input fieldyes—str
mode--input fieldyes—str
dataview_id--input fieldno—int
sequence_number--input fieldno—int
  • Effect: Read, scope profile · Confirmation: none
  • Preconditions: Required inputs: DATASET_ID.
  • Id: ai.expression.generate · Result: AiExpressionGenerateResult · Backed by: SDK mammoth.api.ai.AIAPI.expression_generate, API POST /workspaces/{workspace_id}/projects/{project_id}/sql_generation/expression (GenerateExpression)

ai retention

mammoth ai retention condition

Generate or test a retention-policy WHERE clause for a dataset.

mammoth ai retention condition 123 --input '{"mode": "generate", "intent": "completed payments older than 90 days"}' --project 456
NamePassed asRequiredDefaultTypeNotes
DATASET_IDpositionalyes—intID of the dataset.
mode--input fieldyes—str
intent--input fieldno—str
condition_sql--input fieldno—str
  • Effect: Benign mutation, scope project · Confirmation: none · Waits: starts a job; waits or returns it depending on input
  • Preconditions: Requires explicit project context. Mode generate may return a job-backed result; mode test follows the release response union and must not be assumed to synchronously return row counts.
  • Id: ai.retention.condition · Result: AiRetentionConditionResult · Backed by: SDK mammoth.api.ai.AIAPI.retention_condition, API POST /workspaces/{workspace_id}/projects/{project_id}/sql_generation/retention_policy (RetentionCondition)

ai sql

mammoth ai sql generate

Generate SQL from a natural language intent.

mammoth ai sql generate 'Summarize revenue by region' --input '{"dataset_id": 456, "dataview_id": 123}'
NamePassed asRequiredDefaultTypeNotes
INTENTpositionalno—strGeneration intent for the SQL query; or pass it via the 'intent' input field. Or the intent input field.
intent--input fieldno—str
sequence_number--input fieldno0int
dataset_id--input fieldyes—int
dataview_id--input fieldyes—int
current_query--input fieldno—str
  • Effect: Read, scope profile · Confirmation: none · Waits: waits for the job to finish (--job-timeout, --return-running)
  • Preconditions: Returns a query and metadata; differs from view transform generate-sql, which adds and executes a pipeline task. Do not infer addon availability from an authorization error.
  • Id: ai.sql.generate · Result: AiSqlGenerateResult · Backed by: SDK mammoth.api.ai.AIAPI.generate_sql, API POST /workspaces/{workspace_id}/projects/{project_id}/sql_generation (GenerateSql)

ai suggestion

mammoth ai suggestion list

List AI-powered suggestions for the active project.

mammoth ai suggestion list --input '{"suggestion_type": "generate_task", "params": {"prompt": "Filter rows where Price > 100"}, "dataset_id": 456, "dataview_id": 123}'
NamePassed asRequiredDefaultTypeNotes
suggestion_type--input fieldno—str
params--input fieldno—dict[str, any]
dataset_id--input fieldno—int
dataview_id--input fieldno—int
  • Effect: Read, scope profile · Confirmation: none · Waits: waits for the job to finish (--job-timeout, --return-running)
  • Preconditions: Body is the release UnifiedPromptSpec. suggestion_type is one of extract_text, add_condition, generate_task, apply_ai_template, dashboards, derivative_fuzzy_bucket and params follows that type (generate_task {prompt}; add_condition {prompt, sequence_number}; extract_text {column_name, sequence_number, prompt}). dataset_id/dataview_id scope the request.
  • Id: ai.suggestion.list · Result: AiSuggestionListResult · Backed by: SDK mammoth.api.ai.AIAPI.get_suggestions, API POST /workspaces/{workspace_id}/projects/{project_id}/suggestions (AiSuggestions)

Report an issue · support@mammoth.io