About Aigc CLI
Aigc CLI is an MCP server published by martianzhang in the Content category: aIGC CLI - 统一 AI 图片、视频、Midjourney 生成与检测命令行工具。支持 OpenAI、OpenRouter 及任意 OpenAI 兼容中转。内置 MCP Server、AIGC 检测引擎。. Conduid read 40 tools from its source: add_watermark, caption_image, convert_depth, crop_watermark, detect_image, fetch and 34 more. No package is published for it, so it installs from a source checkout.
The repository has 8 stars and 1 forks, and its last commit was on 18 Nov 2026. Conduid has no tagged release on record for it. Its topics include aigc, aigc-cli, aigc-detection, chatbot, cli and image-generation.
Install
git clone https://github.com/martianzhang/aigc-cliTools (40)
add_watermark向图片添加可见 AI 水印(仅用于创建去水印算法的测试样本,不注入任何元数据)。gemini 使用注册 alpha map;未知名称按文字渲染。完全离线运行,无需 API Key。输出为 <原图>_watermarked.png。caption_imageRead or write the caption/description of an image file. Provide file_path and optional caption to write. If caption is omitted, reads the current caption. Supports JPEG and PNG.convert_depthConvert an image or video into a grayscale depth map (near = white, far = black) using a local Depth Anything V2 ONNX model. Completely offline — no API key needed. The output is the standard input for depth-guided / control-video image-to-video workflows (Wan VACE, Kling Motion Control, Vidu Reference-to-Video): upload the depth map as a motion/space reference plus a reference photo, and the model generates new content keeping the original structure with the new appearance. Input type is auto-detected by extension: image → <name>_depth.png (no ffmpeg needed), video → <name>_depth.mp4 (requires ffmpeg on PATH). Optional annotation overlays detected skeleton (human pose) or faces (landmarks + eyes) onto the depth output. Skeleton requires "aigc-cli depth init --skeleton"; faces are pure-Go pigo (cascades via "aigc-cli depth init --face"). Prerequisite: Run "aigc-cli depth init" to download the ONNX Runtime + model. Examples: convert_depth input_path="/path/to/photo.jpg" convert_depth input_path="/path/to/video.mp4" convert_depth input_path="/path/to/video.mp4" start_time="00:01:00" end_time="00:01:30" convert_depth input_path="/path/to/photo.jpg" invert=true convert_depth input_path="/path/to/photo.jpg" annotate="skeleton" convert_depth input_path="/path/to/video.mp4" annotate="face"crop_watermark裁切图片以去除水印。通用方法,无需学习水印模板。自动检测水印位置并裁切,适合边角水印。detect_image检测图片中的 C2PA Content Credentials、SynthID 隐形水印、TC260 AIGC 标签(中国 GB 45438-2025),以及 EXIF 相机元数据。完全离线运行,无需 API Key。支持 PNG、JPEG、WebP、GIF、BMP 格式。fetchFetch a URL with the built-in free fetcher (direct HTTP; HTML is converted to markdown, main content only) and return its content. Non-HTML content is returned as-is. Free, no API key, SSRF-guarded. Large results are paginated by character offset. Use `web_fetch` to go through a configured third-party API instead.generate_imagegenerate_musicgenerate_sfxgenerate_speechgenerate_videoget_balance查询余额/用量。默认展示该 Provider 的全部余额端点。支持 APIMart、OpenRouter、DeepSeek、Moonshot(Kimi);其他 Provider 无公开余额接口。OpenRouter 需 management key 才能取账户信用点余额,否则只返回 Key 维度用量。get_config获取当前有效配置(provider、model、size 等),API key 已脱敏。用于确认生成 image/video 时应使用的参数。get_model_pricing查询指定模型的详细定价信息。无需 API Key。get_task查询异步任务的状态和结果。APIMart: 查询 task_id;OpenRouter: 查询 job_id(视频提交后返回的 ID)。轮询直到 status 为 completed。kb_addAdd a local file to the knowledge base. Supports: .md, .txt, .go, .py, .json, .yaml, .html.kb_fetchFetch a URL, extract its main content, convert to markdown, and save to the knowledge base.kb_findSearch the local knowledge base using keyword and semantic search. Use this when you need to recall information that was previously saved to the knowledge base.kb_listList all documents in the knowledge base.kb_searchSearch the web and save results to the local knowledge base. Use this to research a topic and save it for later recall.kb_showShow the full content of a document in the knowledge base by its ID. Use the ID returned by kb_find.list_models列出 APIMart 市场所有可用模型及其类型。无需 API Key。midjourney_describemidjourney_imaginemidjourney_rerollmidjourney_videorecognize_textRecognize text in an image file using offline OCR. Completely offline — no API key needed. Uses ONNX Runtime + PP-OCRv4 model (DBNet detection + CRNN recognition). Prerequisite: Run "aigc-cli ocr init" to download the model first. Supports: JPEG, PNG, GIF, BMP, WebP, and PDF files. - For text-based PDFs: extracts text directly without OCR. - For scanned PDFs: renders pages to images first, then OCRs each page. Output: Recognized text as Markdown. Use output_format="json" for structured output with bounding boxes and confidence scores.redact_applyredact_checkCheck text or a DOCX file for leftover sensitive values. Supply "text" or "file_path" (DOCX or plain text). Supply either a comma/newline-separated "values" list, an inline mapping JSON, or a mapping_path written by redact_apply. Returns the matching positions; no network or model is used.redact_restoreRestore a redacted DOCX from a placeholder mapping. Requires a mapping returned by redact_apply (inline "mapping" JSON or "mapping_path"). Output defaults to <name>.restored.docx next to the input. Only DOCX is supported; PDF and images are not reversible.redact_scanredact_textRedact PII in plain text. The default engine is built-in rules + checksum validators (ID cards, phones, bank cards, email, USCC, case numbers, plates, passports, lawyer licences) plus redact.dictionary exact terms. No API key or network is required. Set engine="auto" or "model" to add the configured model (local tokencls or a chat provider). A non-loopback provider also requires allow_remote=true. Returns the redacted text, entity types/placeholders and span positions. Original values are NOT returned unless include_mapping=true; that mapping is sensitive because it can restore the document.remove_backgroundRemove image background using RMBG 2.0 AI semantic segmentation. Completely offline — no API key needed. Uses ONNX Runtime + RMBG 2.0 model. Prerequisite: Run "aigc-cli background init" to download the model first. Output: A PNG with transparency channel, saved alongside the original file as <filename>_removebg.png. Examples: remove_background file_path="/path/to/photo.jpg" remove_background file_path="/path/to/photo.png" output_path="/path/to/out.png" remove_background file_path="/path/to/photo.jpg" replace_color="#FF0000"remove_watermark⚠️ 检测并移除图片中的可见 AI 水印(内置 gemini,其他需通过 learn-watermark 学习)。
仅用于验证检测算法或合法修复用途(如修复个人旧照片)。
禁止用于去除他人版权图片的水印。
完全离线运行,无需 API Key。输出为 <原图>_clean<ext>。searchSearch the web with the built-in free engine (DuckDuckGo) and return ranked titles and URLs. Free, no API key. Read a result in full with `fetch`. Use `web_search` instead when a third-party search API is configured.search_ideas搜索本地灵感库,返回 AI 图片生成提示词及可下载的参考图片。支持多语言关键词搜索——如果用户输入的是中文、日文等非英文,建议先用英文翻译再搜索,同时也用原语言搜索一次,合并结果以获得更全面的匹配。支持随机获取(设置 random=true)。transcribe_audioupscaleUpscale an image 2x/4x with a local Real-ESRGAN / Real-CUGAN / Swin2SR ONNX model. Completely offline — no API key needed. Large images are processed in feathered tiles. Output is opaque PNG (the models do not produce an alpha channel). Prerequisite: Run "aigc-cli upscale init" to download the ONNX Runtime + model. Which model? (default realesr-general-x4v3; run "aigc-cli upscale init --list" for licenses/use cases) general photos: realesr-general-x4v3 (default) | real-esrgan-x4plus (photo HQ, slower) anime / illustration: real-cugan-2x (2x) | real-esrgan-x4plus-anime-6b | real-esrgan-x4plus-anime-4b32f (faster) | real-esrgan-animevideov3 (fastest) noisy / compressed: swin2sr-realworld-x4 | swin2sr-compressed-x4 clean / classical: swin2sr-classical-x4 lightweight 2x: swin2sr-lightweight-x2 Examples: upscale input_path="/path/to/photo.jpg" upscale input_path="/path/to/art.png" model="real-cugan-2x" upscale input_path="/path/to/photo.jpg" scale=2web_fetchFetch a URL through the configured third-party fetch API (the same provider web_search uses) and return provider-formatted Markdown. The provider may bill per request. Requires a fetch-capable provider under `web_search.*`. For free fetching use `fetch`.web_searchSearch the web through the configured third-party provider (defaults.search.provider) and return ranked titles and URLs. The provider may bill per request. Requires a provider under `web_search.*`. For free searching use `search`.Security checks
6 checks have not been run yet.