pltr-cli

anjor's avatarfrom anjor

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.

⭐9stars🔀1forks📁View on GitHub🕐Updated Dec 9, 2025⬇️2downloads

When & Why to Use This Skill

This Claude skill provides a comprehensive interface for Palantir Foundry via the pltr CLI, enabling users to manage complex data ecosystems through natural language. It streamlines the interaction with Foundry's RID-based architecture, allowing for efficient dataset manipulation, SQL query execution, and orchestration management. By integrating these capabilities, it significantly reduces the operational overhead for data engineers and analysts working within the Palantir platform.

Use Cases

  • Data Exploration and SQL Analysis: Execute SQL queries directly against Foundry datasets and export results to CSV or JSON for immediate analysis and reporting.
  • Pipeline Orchestration: Monitor, search, and manage data builds and schedules to ensure ETL processes are running correctly and troubleshoot failures.
  • Ontology and Object Management: Navigate and interact with the Foundry Ontology to list object types, query specific objects, and trigger business actions.
  • Foundry Filesystem and Admin Operations: Perform administrative tasks such as managing folder structures, project permissions, and copying datasets across different spaces or profiles.
  • Automated Data Downloads: Programmatically list and download specific files from dataset branches for local processing or verification.
namepltr-cli
descriptionHelps 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.0.0
  • pltr-cli version: 0.11.0+
  • Python: 3.9, 3.10, 3.11, 3.12
  • Dependencies: foundry-platform-sdk >= 1.27.0

Overview

pltr-cli is a comprehensive CLI with 80+ 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

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

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

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