{"id":51449835,"url":"https://github.com/iintothewind/ips_cli","last_synced_at":"2026-07-05T19:30:33.585Z","repository":{"id":349891394,"uuid":"1204303258","full_name":"iintothewind/ips_cli","owner":"iintothewind","description":"ips_cli — Image Prompt Search, A fast CLI tool to search AI-generated image prompts embedded in local image metadata. Supports PNG, JPEG, and WebP files from Stable Diffusion (A1111/Forge), ComfyUI, NovelAI, and InvokeAI.","archived":false,"fork":false,"pushed_at":"2026-04-08T01:45:13.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-25T23:19:03.566Z","etag":null,"topics":["a1111","comfyui","forge","image-prompt","pormpt"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iintothewind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-07T22:13:24.000Z","updated_at":"2026-04-23T18:43:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/iintothewind/ips_cli","commit_stats":null,"previous_names":["iintothewind/image_prompt_search","iintothewind/ips_cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/iintothewind/ips_cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iintothewind%2Fips_cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iintothewind%2Fips_cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iintothewind%2Fips_cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iintothewind%2Fips_cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iintothewind","download_url":"https://codeload.github.com/iintothewind/ips_cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iintothewind%2Fips_cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35167259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a1111","comfyui","forge","image-prompt","pormpt"],"created_at":"2026-07-05T19:30:28.425Z","updated_at":"2026-07-05T19:30:33.553Z","avatar_url":"https://github.com/iintothewind.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ips — Image Prompt Search\n\nA fast CLI tool to search AI-generated image prompts embedded in local image metadata. Supports PNG, JPEG, and WebP files from Stable Diffusion (A1111/Forge), ComfyUI, NovelAI, and InvokeAI.\n\nExtracts searchable prompt text plus structured fields (model, LoRAs, positive/negative prompts) when available.\n\n## Installation\n\n```bash\ncargo install --path .\n```\n\nOr build a release binary:\n\n```bash\ncargo build --release\n# binary at: target/release/ips\n```\n\n## Usage\n\n```\nips [OPTIONS] --query \u003cQUERY\u003e [PATH]\n```\n\n`PATH` defaults to the current directory.\n\n### Options\n\n| Flag | Description |\n|---|---|\n| `-q, --query \u003cQUERY\u003e` | Search query (required) |\n| `-f, --format \u003cFORMAT\u003e` | Output format: `console`, `json`, `csv` (default: `console`) |\n| `--fuzzy` | Fuzzy matching instead of exact substring |\n| `--regex` | Regex matching |\n| `--min-score \u003cN\u003e` | Minimum fuzzy match score (default: `50`) |\n| `--full` | Show full prompt text (no truncation) with structured fields (model, LoRAs, prompts) |\n| `-p, --path-only` | Print only matching file paths (no prompt text) |\n| `--depth \u003cN\u003e` | Max directory recursion depth |\n| `--no-recursive` | Only search the top-level directory |\n| `-j, --threads \u003cN\u003e` | Number of worker threads |\n| `-v, --verbose` | Log skipped/corrupt files to stderr |\n| `--no-color` | Disable ANSI color (also respects `NO_COLOR` env var) |\n\n### Examples\n\n```bash\n# Search current directory\nips -q \"cyberpunk\"\n\n# Fuzzy search in a specific directory\nips -q \"sunset landscape\" --fuzzy ./ai_art\n\n# Structured console output (model, loras, prompts)\nips -q \"masterpiece\" --full ./images\n\n# List matching files only\nips -q \"1girl\" -p ./outputs\n\n# Export matches to JSON (includes structured fields when present)\nips -q \"masterpiece\" -f json ./images \u003e results.json\n\n# Export to CSV with full prompts\nips -q \"1girl\" -f csv --full /volumes/ai_art \u003e results.csv\n\n# Regex search\nips -q \"negative_prompt:.*blur\" --regex ./outputs\n\n# Top-level only, verbose\nips -q \"portrait\" --no-recursive -v ./downloads\n```\n\n## Supported Generators\n\n| Generator | Format | How prompts are stored |\n|---|---|---|\n| Stable Diffusion A1111 / Forge | PNG | `tEXt`/`iTXt` chunk, keyword `parameters` |\n| ComfyUI | PNG | `tEXt`/`iTXt` chunk, keyword `prompt` (workflow JSON) |\n| NovelAI | PNG | `tEXt`/`iTXt` chunk, keyword `Comment` (JSON with `\"prompt\"` field) |\n| NovelAI (alternate) | PNG | `tEXt`/`iTXt` chunk, keyword `Description` |\n| A1111 / others | JPEG | `COM` marker |\n| Various | JPEG / WebP | XMP `dc:description` field |\n| Legacy / rare | JPEG / WebP | EXIF `UserComment` |\n| InvokeAI | JPEG / WebP | XMP with `invokeai:` namespace |\n\nA single PNG may contain both A1111 `parameters` and ComfyUI `prompt` chunks — ips emits one record per metadata source, so the same file can appear twice in results.\n\nFor detailed extraction rules, JSON fallback behavior, and fault-tolerance, see [`ips_design_doc.md`](ips_design_doc.md).\n\n## Output Formats\n\n### Console (default)\n\nHighlights matched text in context with the file path and detected generator:\n\n```\n./assets/cyberpunk_city.png [a1111]\n   ...a detailed photo of a [cyberpunk] city at night, neon lights...\n```\n\nLong prompts are truncated to a ±80 character window around the match unless `--full` is set.\n\n### Structured console (`--full`)\n\nPrints parsed metadata fields instead of the context window:\n\n```\n./assets/image.png\n\nGenerator: comfyui\nModel: PlantMilkModelSuite_almond\nLoRA: lora:style:0.7, lora:detail:0.5\nPositive Prompt:\na beautiful sunset over mountains\nNegative Prompt:\nblurry, low quality\n```\n\nUse `-p` / `--path-only` to print only paths (works in structured mode too).\n\n### JSON (`-f json`)\n\n```json\n[\n  {\n    \"path\": \"./assets/cyberpunk_city.png\",\n    \"generator\": \"a1111\",\n    \"model\": \"realisticVision.safetensors\",\n    \"loras\": [{\"name\": \"style\", \"weight\": \"0.7\"}],\n    \"positive_prompt\": \"a detailed photo of a cyberpunk city...\",\n    \"negative_prompt\": \"blurry, low quality\",\n    \"score\": 120\n  }\n]\n```\n\n- `positive_prompt` and `negative_prompt` are omitted when empty.\n- `model`, `loras` are omitted when empty.\n- `score` is only present in fuzzy mode.\n\n### CSV (`-f csv`)\n\n```\npath,generator,positive_prompt,negative_prompt,score\n./assets/cyberpunk_city.png,a1111,\"a detailed photo of a cyberpunk city...\",\"blurry, low quality\",\n```\n\n`model` and `loras` are not included in CSV output (use JSON for those).\n\n## Performance\n\n- Reads only image metadata headers — never decodes pixel data.\n- All extraction and matching runs in parallel via `rayon`.\n- Target: 10,000 local images searched in under 3 seconds on an SSD.\n\n## Development\n\n```bash\ncargo test              # run unit tests\ncargo build             # debug build\ncargo build --release   # optimized release build\n```\n\nTest image fixtures can be placed in `tests/examples/` for integration tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiintothewind%2Fips_cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiintothewind%2Fips_cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiintothewind%2Fips_cli/lists"}