经 AI Skill Hub 精选评估,PI2LLM 获评「推荐使用」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
PI2LLM 是一款基于 JavaScript 开发的开源工具,专注于 astrophotography、javascript、json 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
PI2LLM 是一款基于 JavaScript 开发的开源工具,专注于 astrophotography、javascript、json 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:npm 全局安装 npm install -g pi2llm # 方式二:npx 直接运行(无需安装) npx pi2llm --help # 方式三:项目依赖安装 npm install pi2llm # 方式四:从源码运行 git clone https://github.com/scottstirling/pi2llm cd pi2llm npm install npm start
# 命令行使用
pi2llm --help
# 基本用法
pi2llm [options] <input>
# Node.js 代码中使用
const pi2llm = require('pi2llm');
const result = await pi2llm.run(options);
console.log(result);
# pi2llm 配置说明 # 查看配置选项 pi2llm --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export PI2LLM_CONFIG="/path/to/config.yml"
)
LLM Assistant for PixInsight is a script that integrates a local or cloud-based Large Language Model (LLM) directly into your PixInsight workspace. It acts as an astrophotography processing assistant, aware of a selected image's specific data and metadata, to provide advice on next processing steps, help understand the image data, and generate descriptions of finished work.
Start getting data-driven recommendations tailored to your image, right inside PixInsight.
---
.pi2llm.json file.Common LLM API Endpoints table to the README.md for reference and will add more info as users request.Here is a screenshot of the main chat UI, showing the image selection dropdown, the chat history, and the input box. 
Here is a screenshot of the main chat UI with image analysis enabled, showing the image selection dropdown, per-image opt-in checkbox, chat history, and prompt input. 
---
New Chat: Button resets the conversation and clears history. Settings: Opens the configuration dialog at any time. * Export History: Saves the current conversation to a .txt or .json file. 
---
1. PixInsight: Version 1.8.9 or later is recommended. 2. An LLM Server (Local or Cloud): You must have access to an LLM that provides an OpenAI-compatible API endpoint. This is a flexible requirement that can be met in several ways: Local Servers (Recommended for privacy and no cost): LM Studio: An easy-to-use desktop app for running local models and serving an API endpoint locally. llama.cpp: A high-performance engine with an OpenAI-compatible server option for more advanced users. Cloud Services (For powerful, cutting-edge models): Cloudflare AI Gateway: A fantastic service to connect to models from Meta (Llama 3), Google, Qwen and more, which offers 10,000 "neurons" (around 40,000 tokens) free per day. Google Gemini AI: Use Google's latest Gemini models via their OpenAI-compatible endpoint. * Currently, any other service that offers an OpenAI-compatible API or Cloudflare Gateway-compatible API. 3. An LLM Model: A capable chat or instruction-tuned model. Models such as Llama 3.2 Instruct, Mixtral, Qwen 3, Gemini Flash and Pro, OpenAI, Claude and variants of Mistral are excellent choices, able to identify astronomical targets by celestial coordinates and knowledgeable to various degrees about PixInsight and astrophotography processing.
---
main branch of this repository as a .zip file and extract it to a memorable location.Script > Feature Scripts....pi2llm folder (the folder that contains pi2llm-main.js and the lib sub-folder).The LLM Assistant should appear under the Script > Utilities menu as LLM Assistant.
---
Once configured, using the assistant is a simple interactive process. You may begin chatting to the LLM directly through the input text area, using Ctrl+Enter as a keyboard shortcut to Send, or use the Send button.
1. Open one or more images in your PixInsight workspace. For best results, use images that have been plate-solved with astrometric data and have been saved with processing history and/or XISF or FITS headers. 2. Go to Script > Utilities > LLM Assistant to launch the main tool. 3. The chat window will appear. See the Configuration section ^ if needed. 4. Select a Target Image: Use the dropdown menu at the top left of the window to choose an open image to work on. 5. Analyze: Click the "Analyze Selected Image" button. The script will gather details about the image and its processing history and send the details to the LLM and, if opted in, a copy of the image as a JPG is sent after being resized to fit the configured maximum dimensions for the LLM API. 6. Chat The first response from the LLM will appear. You can now have a conversation: Ask for recommendations: "What should I do next?" Ask for clarification: "Explain what DynamicBackgroundExtraction does." * Ask for a description: "Please write a description for this image for AstroBin."
Here is a screenshot showing the data sent to the LLM at the top, and part of the response from Alibaba's Qwen LLM model Qwen3-4b-2507 running locally on LMStudio 3.24.
Note that the Qwen 4b model loves to use emojis in its responses, but here incorrectly describes the target as being in Cassiopeia rather than Lacerta. Your mileage may vary with the smaller LLM models accuracy. and all LLMs are liable to "hallucinate" to fill in gaps.
Here is a response from Gemini Flash 2.0 explaining how UnsharpMask and Convolution work in response to a follow up question about that. 
Before using the assistant, configure it to connect to a live LLM API endpoint, local or remote.
Script > Utilities > LLM AssistantSettings button to open the configuration dialog.Here is a screenshot of the configuration dialog, showing the defaults. 
3. LLM URL: Enter the full URL of an LLM's chat completions API endpoint. For LM Studio, this is http://127.0.0.1:1234/v1/chat/completions. For a Cloudflare AI Gateway, it will look like https://gateway.ai.cloudflare.com/v1/${ACCOUNT_ID_STRING}/${API_GATEWAY}/workers-ai/${MODEL_PATH} where the model is specified in the URL. For a Google AI API, the URL will look like https://generativelanguage.googleapis.com/v1beta/openai/chat/completions and the model is specified as a separate configuration value. 4. API Key: For local servers, you can typically leave the default "no-key". For cloud services, enter your API token for your account's authentication. 5. Model: This field is often required by cloud services to specify which model to use, though some vendors put the model name in the URL. It can be left blank for local LLM servers. For a Cloudflare AI Gateway, an example might be @cf/meta/llama-4-scout-17b-16e-instruct. For Google AI, an example might be gemini-2.0-flash. For local servers like llama.cpp where you only load one model, this field can often be left blank. 6. Temperature: Controls the "creativity" and randomness of the LLM's responses. The default is a good starting point and anywhere from 0.8 to 1.2 is normal. 7. Max Tokens: Limits the length of the LLM's responses. The maximum tokens supported vary by LLM model and vendor. Chat history counts toward the max token count. 8. Enable Visual Analysis: Option to enable or disable sending image data to the LLM. Default is disabled. 9. Vision max pixels: Set to the maximum supported by the visual LLM, which is referenced if needed to resize the LLM's copy of a selected image. The maximum supported varies by vendor and model. See your vendor's documentation, but safe bets are 1024 for local models and 2048 for remote vendor APIs. 10. System Prompt: A default system prompt is provided and can be customized to change the assistant's behavior. 11. Click "OK" to save the settings.
Load Profile... button lets configuration settings be loaded from a local JSON file.Save Profile... button lets configuration settings can be saved to a local file in JSON format.Reset to Defaults button resets configuration values to defaults.---
To configure LLM Assistant, get the "Chat Completions Endpoint" for an LLM provider. Here is a list of common endpoints for popular local and remote services.
| Vendor / Tool | Chat Completions Endpoint | Notes |
|---|---|---|
| **Local Servers** | *These run on your own computer.* | |
| LM Studio | http://127.0.0.1:1234/v1/chat/completions | LM Studio server default.<br>Port may vary if changed in settings. |
| Ollama | http://127.0.0.1:11434/v1/chat/completions | ollama default openAI-compatible endpoint. |
| llama.cpp | http://127.0.0.1:8080/v1/chat/completions | Default for llama-server.<br>Port is configurable. |
| **Cloud Services** | *These are remote services and require an API Key.* | |
| OpenAI | https://api.openai.com/v1/chat/completions | For models like GPT-4o, GPT-4 Turbo.<br>Requires a paid API key. |
| Google AI | https://generativelanguage.googleapis.com/v1beta/openai/chat/completions | Requires a Google account and API key. |
| Anthropic | https://api.anthropic.com/v1/messages | Requires an Anthropic account and API key.<br>The specific model must also be configured. |
| **API Routers** | *These services provide access to multiple models.* | |
| OpenRouter.ai | https://openrouter.ai/api/v1/chat/completions | Access many models (GPT, Claude, Llama, etc.)<br>with one API key. |
| Cloudflare AI | https://gateway.ai.cloudflare.com/v1/{ACCOUNT_ID}/{GATEWAY}/workers-ai/{MODEL} | Requires a Cloudflare account.<br>The model is part of the URL. |
| Meta Llama | (Varies by host) | Meta does not host a public API.<br>Access via local servers or routers like OpenRouter. |
---
AI集成天文摄影工具,自动化处理
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:PI2LLM 的核心功能完整,质量良好。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | pi2llm |
| 原始描述 | 开源AI工具:LLM AI integration for PixInsight。⭐14 · JavaScript |
| Topics | astrophotographyjavascriptjsonllmpixinsight |
| GitHub | https://github.com/scottstirling/pi2llm |
| License | MIT |
| 语言 | JavaScript |
收录时间:2026-05-28 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。