@aveltens/pi-kit-linked-data

中文文档
0.10.3发布于 2026/10/29MITES Module构建来源已验证近 30 天下载 2160

Pi Coding Agent skills and extensions to work with RDF, SPARQL and other Linked Data technologies

原始使用文档
文档目录11 节
  1. Quick Start
  2. Install
  3. Query local RDF files
  4. Query a remote SPARQL endpoint
  5. Query Wikidata
  6. What's Included
  7. Tools
  8. Commands
  9. Skills
  10. CLI Tools
  11. Requirements

@aveltens/pi-kit-linked-data

Pi Coding Agent skills and extensions to work with RDF, SPARQL, and other Linked Data technologies.

Adds tools and matching skills to the Pi Coding Agent:

ToolWhat it does
sparql_query_filesRun SPARQL 1.1 queries against local RDF/Turtle files
sparql_query_endpointQuery any remote SPARQL endpoint by URL
sparql_query_wikidataQuery the Wikidata Knowledge Graph for real-world facts

Two discovery tools are also included: discover_rdf_files and discover_sparql_queries.

Quick Start

Install

pi install npm:@aveltens/pi-kit-linked-data

To try the package without installing it permanently:

pi -e npm:@aveltens/pi-kit-linked-data

To install per-project (shared with your team via .pi/settings.json):

pi install -l npm:@aveltens/pi-kit-linked-data

Query local RDF files

Put some Turtle files in your workspace, then ask Pi in plain English:

"What classes are defined in my ontology?" "List all SKOS concepts with their labels." "Find all resources of type schema:Person."

Pi will run discover_rdf_files to locate the files and sparql_query_files to query them.

Query a remote SPARQL endpoint

"Query DBpedia for population of Germany." "List the classes available at https://example.org/sparql."

Pi uses sparql_query_endpoint and handles PREFIX declarations automatically.

Query Wikidata

"Who were the presidents of France in the 20th century?" "What is the capital of Japan?" "List all Nobel Prize winners in Physics since 2010."

Pi uses sparql_query_wikidata, which pre-injects all standard Wikidata prefixes (wd:, wdt:, wikibase:, etc.) — no declarations needed.

What's Included

Tools

ToolDescription
sparql_query_filesExecutes SPARQL 1.1 (SELECT/ASK/CONSTRUCT/DESCRIBE) against local .ttl, .rdf, .n3, .jsonld, .trig, .nq, .nt files using Comunica
sparql_query_endpointExecutes SPARQL 1.1 against any remote endpoint over HTTP
sparql_query_wikidataExecutes SPARQL 1.1 against the Wikidata Query Service with standard prefixes pre-injected
discover_rdf_filesFinds all RDF data files in the workspace
discover_sparql_queriesFinds all .rq / .sparql query files in the workspace

Commands

CommandDescription
/rdf-memory-explorerStarts a local HTTP server and prints the URL in the chat — open it in any browser to browse stores and run SPARQL queries visually. Works in containers and remote environments.

Skills

Skills guide Pi on when and how to use the tools:

  • sparql-query-files — semantic graph traversal, class/property discovery, reusing existing .rq files
  • sparql-query-endpoint — endpoint exploration, output format selection, PREFIX declarations
  • sparql-query-wikidata — entity/property model, label service patterns, multi-hop traversal

CLI Tools

The package ships two command-line tools you can run directly from your project.

Add convenience scripts to your package.json:

{
  "query": "cd .pi/npm && npx pi-kit-query",
  "validate": "cd .pi/npm && npx pi-kit-validate"
}

Then use them like:

npm run query
npm run validate

Requirements

版本与发布记录

@aveltens/pi-kit-linked-data 共发布 17 个版本,首次发布于 2026/05/13;过去 12 个月发布了 17 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.10.3latest2026/10/2910 天前
0.10.22026/10/2216 天前
0.10.12026/10/2217 天前
0.10.02026/10/1524 天前
0.9.12026/06/025 个月前
0.9.02026/06/015 个月前

关于 @aveltens/pi-kit-linked-data 的常见问题

@aveltens/pi-kit-linked-data 是什么?

Pi Coding Agent skills and extensions to work with RDF, SPARQL and other Linked Data technologies

如何安装 @aveltens/pi-kit-linked-data?

在项目目录运行 npm install @aveltens/pi-kit-linked-data,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typebox(*)、@earendil-works/pi-ai(*)、@earendil-works/pi-coding-agent(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 pi-kit-query、pi-kit-validate,可以用 npx pi-kit-query 直接运行。

@aveltens/pi-kit-linked-data 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/aveltens__pi-kit-linked-data 是否存在。

@aveltens/pi-kit-linked-data 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@aveltens/pi-kit-linked-data 可以商用吗?

@aveltens/pi-kit-linked-data 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@aveltens/pi-kit-linked-data 的下载量有多少?

根据 npm 官方下载统计,@aveltens/pi-kit-linked-data 在 2026/10/07 – 2026/11/05 这 30 天内被下载 2,160 次,日均约 72 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aveltens/pi-kit-linked-data 还在维护吗?

最新版本 0.10.3 发布于 2026/10/29(10 天前);至今共发布 17 个版本,其中过去 12 个月发布了 17 个;首次发布于 2026/05/13。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。