npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

geomind

v0.1.0

Published

GeoMind - A geospatial analysis agent with autonomous data cognition and persistent memory

Readme

GeoMind

具备自主数据认知与持续记忆能力的地理空间分析智能体。

GeoMind 基于 Pi Agent 构建,能够通过 psql 自主探索 PostGIS 数据库,无需人工编写模式文档。它会记住你的纠错和偏好,越用越好。


安装

前置要求

  • Node.js >= 18
  • PostgreSQL(本地或远程均可)
  • 大模型 API Key(支持 Anthropic Claude、OpenAI、DeepSeek 等)
  • QGIS(可选,用于空间分析处理)

从 npm 安装(推荐)

npm install -g geomind

从源码安装(开发者)

git clone https://github.com/zhanlutuzi/GeoMind.git
cd GeoMind
pnpm install
pnpm build
pnpm link --global

Windows 用户:如果全局安装报权限错误,请用管理员身份运行命令行。

卸载

# npm 安装的
npm uninstall -g geomind

# 源码安装的
pnpm uninstall --global geomind

快速开始

1. 设置大模型

GeoMind 需要一个大模型 API Key。设置环境变量后启动:

export ANTHROPIC_API_KEY=sk-ant-...
geomind

或者启动后使用 /login 命令交互式登录。

2. 配置数据库

首次启动后,在对话中使用 /setup 命令配置数据库连接:

/setup

按提示输入数据库信息(host、port、用户名、数据库名)。支持本地和远程数据库。

你也可以手动编辑配置文件:

// .geomind/config.json(工程级)或 ~/.geomind/config.json(全局)
{
  "psql": {
    "command": "psql",
    "database": "my_database",
    "host": "localhost",
    "port": 5432,
    "user": "readonly_user"
  },
  "qgis_process": {
    "path": "/path/to/qgis_process",
    "available": true
  }
}

3. 开始使用

geomind

然后直接用自然语言和它对话:

> 帮我看看数据库里有什么表

> 查一下东京都内有多少个铁路站点

> 找出涩谷区地价最高的5个地点,导出为 GeoJSON

> 分析哪些铁路站点位于洪水风险区域内

GeoMind 会自主探索数据库、生成 SQL、执行查询,遇到不确定的会主动问你。


功能特性

🔍 自主数据库探索

无需人工编写模式文档。GeoMind 通过 psql 自主发现表结构、空间列、参考系等信息。不确定的语义会主动询问用户。

🧠 持续记忆

GeoMind 会记住:

  • 数据库知识:表结构、列含义、查询模式(工程级)
  • 用户偏好:常关注区域、分析习惯、展示偏好(全局)
  • 用户纠错:你曾经纠正过的错误理解(全局)

每 5 轮对话自动反思一次,将新知识合并到记忆中。

🌍 空间分析

  • 通过 PostGIS 执行空间 SQL(ST_Contains、ST_Buffer、ST_Intersects 等)
  • 支持 QGIS Processing(qgis_process)进行高级空间分析(可选)
  • 可导出 GeoJSON、生成交互式 HTML 地图报告

⚙️ 配置分层

| 类型 | 位置 | 适用场景 | |------|------|---------| | 全局 | ~/.geomind/ | API Key、用户身份、偏好、QGIS 路径 | | 工程级 | ./.geomind/ | 数据库连接、数据库知识记忆 |

工程级配置覆盖全局配置。


常用命令

| 命令 | 说明 | |------|------| | /setup | 交互式配置数据库连接和 QGIS | | /login | 设置大模型 API Key | | /model | 切换大模型 | | /new | 新建会话 | | /compact | 压缩上下文 |


开发

环境准备

  • pnpm(安装:npm install -g pnpm
git clone https://github.com/zhanlutuzi/GeoMind.git
cd GeoMind
pnpm install
pnpm dev          # 开发模式(tsx 直接运行,无需编译)
pnpm build        # 编译
pnpm start        # 运行编译后的版本

项目结构

├── src/
│   ├── index.ts          # 入口文件
│   ├── config.ts         # 配置管理(全局/工程分层)
│   ├── setup.ts          # 环境检测与初始化
│   └── prompts/
│       └── system.ts     # System Prompt 动态生成
├── .geomind/
│   └── extensions/
│       ├── memory.ts     # 记忆系统 Extension
│       └── setup.ts      # /setup 命令 Extension
├── scripts/
│   ├── patch-branding.js # 品牌定制脚本(仅开发时用)
│   └── ensure-shebang.js # 编译后添加 shebang
└── devplan/              # 开发计划文档

平台支持

  • ✅ macOS
  • ✅ Linux
  • ✅ Windows

致谢

GeoMind 基于 Pi Agent 开源框架构建。感谢 Earendil Works 团队提供的优秀 Agent 基础设施,包括工具调用、会话管理、终端 UI 等核心能力,使我们能够专注于地理空间领域的智能体研究。

License

MIT