微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🏗️

企业级数据平台CLI全能助手

pltr-cli · vv1.0.1
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
专业技能 安全 S 级 作者 anjor 公开目录收录
768 下载 171 安装 3.4k 收藏 1.7k 浏览

简介

Palantir Foundry官方CLI的文档型技能,提供100+命令的数据集管理、SQL查询、本体操作等完整指南,零代码执行风险。

原始描述

Use the pltr CLI to query datasets, run SQL, manage builds, ontologies, projects, users, streams, AI agents, and ML models in Palantir Foundry.

通过你的 Agent 添加

安装目录:pltr-cli/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/pltr-cli/
Codex CLI~/.codex/skills/pltr-cli/
DeepSeek Harness~/.agents/skills/pltr-cli/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

pltr-cli技能是一个纯文档型AI助手,专门指导用户通过Palantir官方pltr CLI工具与Foundry企业数据平台交互。该技能覆盖100+CLI命令的完整使用场景:数据集操作(信息查询、文件下载、分支管理)、SQL执行与异步查询、本体(Ontology)对象管理、编排调度(构建/作业/计划)、文件系统(文件夹/空间/项目)、用户权限管理、实时流数据处理、AIP智能体交互以及ML模型注册表管理等。用户通过自然语言描述需求,技能自动加载对应的参考文档(reference/.md)或工作流指南(workflows/.md),生成精确的CLI命令示例。

显著优点

企业级功能覆盖:作为Palantir Foundry的官方CLI封装,支持从数据探索到生产部署的全链路操作,包括独特的RID资源标识体系、多格式输出(table/json/csv)、多环境配置切换等高级特性。

零执行风险设计:纯Markdown文档架构,无Python/JS/Shell可执行代码,所有命令均需用户手动在本地CLI执行,从根本上杜绝代码注入和未授权操作风险。

结构化知识组织:按任务类型智能路由参考文件(如SQL查询→sql-commands.md,权限管理→permission-management.md),大幅降低学习成本。

AI原生集成:内置对Anthropic Claude模型和OpenAI嵌入的调用支持,以及AIP Agents的会话管理能力,实现数据平台与大语言模型的无缝衔接。

潜在缺点与局限性

RID依赖门槛:Foundry API强制使用RID(资源标识符),用户必须预先从Web UI或API获取,无法通过自然语言直接定位资源,增加使用摩擦。

外部工具依赖:技能本身不执行任何操作,用户需自行安装配置pltr-cli(0.12.0+)和Python 3.9-3.12环境,并管理FOUNDRY_TOKEN等认证凭据。

无实时验证能力:无法检测用户输入的RID是否有效、Token权限是否充足,错误只能在CLI执行后暴露。

平台锁定:深度绑定Palantir Foundry专有生态,学习成果难以迁移至其他数据平台。

适合的目标群体

  • 数据工程师:构建ETL管道、管理数据血缘、调度生产作业
  • 数据分析师:执行即席SQL查询、探索数据集、导出分析结果
  • 平台管理员:用户/组织管理、权限配置、资源治理
  • ML工程师:模型版本管理、AIP智能体部署、嵌入服务调用
  • 已有Foundry许可的企业团队:需通过CLI自动化重复性平台操作

使用风险

凭证管理风险:文档建议通过环境变量配置FOUNDRY_TOKEN,若用户误将Token硬编码到脚本或提交至版本控制,可能导致凭据泄露。

操作不可逆风险:指导的删除命令(数据集、资源、用户权限)在Foundry中可能立即生效且无回收站机制,需用户自行确认目标。

数据合规风险:SQL查询和文件下载可能涉及敏感数据,用户需确保本地环境符合企业数据安全策略。

CLI版本兼容性:技能基于pltr-cli 0.12.0+设计,若用户使用过旧版本,部分命令语法可能不兼容。

技能正文


name: pltr-cli description: Helps you work with Palantir Foundry using the pltr CLI. Use this when you need to query datasets, manage orchestration builds, work with ontologies, run SQL queries, manage folders/spaces/projects, copy datasets, or perform admin operations in Foundry. Triggers: Foundry, pltr, dataset, SQL query, ontology, build, schedule, RID.

pltr-cli: Palantir Foundry CLI

This skill helps you use the pltr-cli to interact with Palantir Foundry effectively.

Compatibility

  • Skill version: 1.1.0
  • pltr-cli version: 0.12.0+
  • Python: 3.9, 3.10, 3.11, 3.12
  • Dependencies: foundry-platform-sdk >= 1.69.0

Overview

pltr-cli is a comprehensive CLI with 100+ commands for:

  • Dataset operations: Get info, list files, download files, manage branches and transactions
  • SQL queries: Execute queries, export results, manage async queries
  • Ontology: List ontologies, object types, objects, execute actions and queries
  • Orchestration: Manage builds, jobs, and schedules
  • Filesystem: Folders, spaces, projects, resources
  • Admin: User, group, role management
  • Connectivity: External connections and data imports
  • MediaSets: Media file management
  • Language Models: Interact with Anthropic Claude models and OpenAI embeddings
  • Streams: Create and manage streaming datasets, publish real-time data
  • Functions: Execute queries and inspect value types
  • AIP Agents: Manage AI agents, sessions, and versions
  • Models: ML model registry for model and version management

Critical Concepts

RID-Based API

The Foundry API is RID-based (Resource Identifier). Most commands require RIDs:

  • Datasets: ri.foundry.main.dataset.{uuid}
  • Folders: ri.compass.main.folder.{uuid} (root: ri.compass.main.folder.0)
  • Builds: ri.orchestration.main.build.{uuid}
  • Schedules: ri.orchestration.main.schedule.{uuid}
  • Ontologies: ri.ontology.main.ontology.{uuid}

Users must know RIDs in advance (from Foundry web UI or previous API calls).

Authentication

Before using any command, ensure authentication is configured:

# Configure interactively
pltr configure configure

# Or use environment variables
export FOUNDRY_TOKEN="your-token"
export FOUNDRY_HOST="foundry.company.com"

# Verify connection
pltr verify

Output Formats

All commands support multiple output formats:

pltr <command> --format table    # Default: Rich table
pltr <command> --format json     # JSON output
pltr <command> --format csv      # CSV format
pltr <command> --output file.csv # Save to file

Profile Selection

Use --profile to switch between Foundry instances:

pltr <command> --profile production
pltr <command> --profile development

Reference Files

Load these files based on the user's task:

Task Type Reference File
Setup, authentication, getting started reference/quick-start.md
Dataset operations (get, files, branches, transactions) reference/dataset-commands.md
SQL queries reference/sql-commands.md
Builds, jobs, schedules reference/orchestration-commands.md
Ontologies, objects, actions reference/ontology-commands.md
Users, groups, roles, orgs reference/admin-commands.md
Folders, spaces, projects, resources, permissions reference/filesystem-commands.md
Connections, imports reference/connectivity-commands.md
Media sets, media items reference/mediasets-commands.md
Anthropic Claude models, OpenAI embeddings reference/language-models-commands.md
Streaming datasets, real-time data publishing reference/streams-commands.md
Functions queries, value types reference/functions-commands.md
AIP Agents, sessions, versions reference/aip-agents-commands.md
ML model registry, model versions reference/models-commands.md

Workflow Files

For common multi-step tasks:

Workflow File
Data exploration, SQL analysis, ontology queries workflows/data-analysis.md
ETL pipelines, scheduled jobs, data quality workflows/data-pipeline.md
Setting up permissions, resource roles, access control workflows/permission-management.md

Common Commands Quick Reference

# Verify setup
pltr verify

# Current user info
pltr admin user current

# Execute SQL query
pltr sql execute "SELECT * FROM my_table LIMIT 10"

# Get dataset info
pltr dataset get ri.foundry.main.dataset.abc123

# List files in dataset
pltr dataset files list ri.foundry.main.dataset.abc123

# Download file from dataset
pltr dataset files get ri.foundry.main.dataset.abc123 "/path/file.csv" "./local.csv"

# Copy dataset to another folder
pltr cp ri.foundry.main.dataset.abc123 ri.compass.main.folder.target456

# List folder contents
pltr folder list ri.compass.main.folder.0  # root folder

# Search builds
pltr orchestration builds search

# Interactive shell mode
pltr shell

# Send message to Claude model
pltr language-models anthropic messages ri.language-models.main.model.xxx \
    --message "Explain this concept"

# Generate embeddings
pltr language-models openai embeddings ri.language-models.main.model.xxx \
    --input "Sample text"

# Create streaming dataset
pltr streams dataset create my-stream \
    --folder ri.compass.main.folder.xxx \
    --schema '{"fieldSchemaList": [{"name": "value", "type": "STRING"}]}'

# Publish record to stream
pltr streams stream publish ri.foundry.main.dataset.xxx \
    --branch master \
    --record '{"value": "hello"}'

# Execute a function query
pltr functions query execute myQuery --parameters '{"limit": 10}'

# Get AIP Agent info
pltr aip-agents get ri.foundry.main.agent.abc123

# List agent sessions
pltr aip-agents sessions list ri.foundry.main.agent.abc123

# Get ML model info
pltr models model get ri.foundry.main.model.abc123

# List model versions
pltr models version list ri.foundry.main.model.abc123

Best Practices

  1. Always verify authentication first: Run pltr verify before starting work
  2. Use appropriate output format: JSON for programmatic use, CSV for spreadsheets, table for readability
  3. Use async for large queries: pltr sql submit + pltr sql wait for long-running queries
  4. Export results: Use --output to save results for further analysis
  5. Use shell mode for exploration: pltr shell provides tab completion and history

Getting Help

pltr --help                    # All commands
pltr <command> --help          # Command help
pltr <command> <sub> --help    # Subcommand help

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

data-analyticsdatabasebackenddevopsproduct-managementapidocs

同类 Skill