{
  "slug": "filter-lines",
  "name": "gizza-ai/filter-lines",
  "version": "0.1.0",
  "title": "Filter Lines — keep or drop lines by substring/regex — gizza.ai",
  "description": "Keep or drop lines of text matching a substring or regular expression — a friendly grep in your browser. Nothing is uploaded.",
  "tags": [
    "filter lines",
    "grep",
    "keep lines",
    "drop lines",
    "regex filter",
    "search lines"
  ],
  "category": "text",
  "urls": {
    "page": "https://gizza.ai/tools/filter-lines/",
    "markdown": "https://gizza.ai/tools/filter-lines/index.md",
    "descriptor": "https://gizza.ai/tools/filter-lines/tool.json",
    "deep_link_example": "https://gizza.ai/tools/filter-lines/?text=Paste%20lines%20to%20filter%E2%80%A6&pattern=error&mode=keep&regex=true&ignore_case=true"
  },
  "cli": "gizza tool filter-lines \"Paste lines to filter…\" 'pattern=error'",
  "tool": {
    "description": "Filter text line by line, like grep. Keep (mode=keep, default) or drop (mode=drop) every line that matches a pattern. The pattern is a literal substring by default, or a regular expression when regex=true; set ignore_case=true to match case-insensitively. Returns the filtered text plus total/matched/kept line counts. Runs locally.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "ignore_case": {
          "default": false,
          "description": "Match case-insensitively.",
          "type": "boolean"
        },
        "mode": {
          "default": "keep",
          "description": "keep = output only matching lines; drop = output only non-matching lines.",
          "enum": [
            "keep",
            "drop"
          ],
          "type": "string"
        },
        "pattern": {
          "description": "The substring (or regular expression, if regex=true) to match against each line.",
          "type": "string"
        },
        "regex": {
          "default": false,
          "description": "Treat the pattern as a regular expression instead of a literal substring.",
          "type": "boolean"
        },
        "text": {
          "description": "The text whose lines should be filtered.",
          "type": "string"
        }
      },
      "required": [
        "text",
        "pattern"
      ],
      "type": "object"
    }
  }
}