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.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
- Always verify authentication first: Run
pltr verify before starting work
- Use appropriate output format: JSON for programmatic use, CSV for spreadsheets, table for readability
- Use async for large queries:
pltr sql submit + pltr sql wait for long-running queries
- Export results: Use
--output to save results for further analysis
- 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
1---2name: pltr-cli3description: 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, c4---5
6---
7name: pltr-cli
8description: 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.
9---
10
11# pltr-cli: Palantir Foundry CLI
12
13This skill helps you use the pltr-cli to interact with Palantir Foundry effectively.
14
15## Compatibility
16
17- **Skill version**: 1.0.0
18- **pltr-cli version**: 0.11.0+
19- **Python**: 3.9, 3.10, 3.11, 3.12
20- **Dependencies**: foundry-platform-sdk >= 1.27.0
21
22## Overview
23
24pltr-cli is a comprehensive CLI with 80+ commands for:
25- **Dataset operations**: Get info, list files, download files, manage branches and transactions
26- **SQL queries**: Execute queries, export results, manage async queries
27- **Ontology**: List ontologies, object types, objects, execute actions and queries
28- **Orchestration**: Manage builds, jobs, and schedules
29- **Filesystem**: Folders, spaces, projects, resources
30- **Admin**: User, group, role management
31- **Connectivity**: External connections and data imports
32- **MediaSets**: Media file management
33
34## Critical Concepts
35
36### RID-Based API
37The Foundry API is **RID-based** (Resource Identifier). Most commands require RIDs:
38- **Datasets**: `ri.foundry.main.dataset.{uuid}`
39- **Folders**: `ri.compass.main.folder.{uuid}` (root: `ri.compass.main.folder.0`)
40- **Builds**: `ri.orchestration.main.build.{uuid}`
41- **Schedules**: `ri.orchestration.main.schedule.{uuid}`
42- **Ontologies**: `ri.ontology.main.ontology.{uuid}`
43
44Users must know RIDs in advance (from Foundry web UI or previous API calls).
45
46### Authentication
47Before using any command, ensure authentication is configured:
48```bash
49# Configure interactively
50pltr configure configure
51
52# Or use environment variables
53export FOUNDRY_TOKEN="your-token"
54export FOUNDRY_HOST="foundry.company.com"
55
56# Verify connection
57pltr verify
58```
59
60### Output Formats
61All commands support multiple output formats:
62```bash
63pltr <command> --format table # Default: Rich table
64pltr <command> --format json # JSON output
65pltr <command> --format csv # CSV format
66pltr <command> --output file.csv # Save to file
67```
68
69### Profile Selection
70Use `--profile` to switch between Foundry instances:
71```bash
72pltr <command> --profile production
73pltr <command> --profile development
74```
75
76## Reference Files
77
78Load these files based on the user's task:
79
80| Task Type | Reference File |
81|-----------|----------------|
82| Setup, authentication, getting started | `reference/quick-start.md` |
83| Dataset operations (get, files, branches, transactions) | `reference/dataset-commands.md` |
84| SQL queries | `reference/sql-commands.md` |
85| Builds, jobs, schedules | `reference/orchestration-commands.md` |
86| Ontologies, objects, actions | `reference/ontology-commands.md` |
87| Users, groups, roles, orgs | `reference/admin-commands.md` |
88| Folders, spaces, projects, resources, permissions | `reference/filesystem-commands.md` |
89| Connections, imports | `reference/connectivity-commands.md` |
90| Media sets, media items | `reference/mediasets-commands.md` |
91
92## Workflow Files
93
94For common multi-step tasks:
95
96| Workflow | File |
97|----------|------|
98| Data exploration, SQL analysis, ontology queries | `workflows/data-analysis.md` |
99| ETL pipelines, scheduled jobs, data quality | `workflows/data-pipeline.md` |
100| Setting up permissions, resource roles, access control | `workflows/permission-management.md` |
101
102## Common Commands Quick Reference
103
104```bash
105# Verify setup
106pltr verify
107
108# Current user info
109pltr admin user current
110
111# Execute SQL query
112pltr sql execute "SELECT * FROM my_table LIMIT 10"
113
114# Get dataset info
115pltr dataset get ri.foundry.main.dataset.abc123
116
117# List files in dataset
118pltr dataset files list ri.foundry.main.dataset.abc123
119
120# Download file from dataset
121pltr dataset files get ri.foundry.main.dataset.abc123 "/path/file.csv" "./local.csv"
122
123# Copy dataset to another folder
124pltr cp ri.foundry.main.dataset.abc123 ri.compass.main.folder.target456
125
126# List folder contents
127pltr folder list ri.compass.main.folder.0 # root folder
128
129# Search builds
130pltr orchestration builds search
131
132# Interactive shell mode
133pltr shell
134```
135
136## Best Practices
137
1381. **Always verify authentication first**: Run `pltr verify` before starting work
1392. **Use appropriate output format**: JSON for programmatic use, CSV for spreadsheets, table for readability
1403. **Use async for large queries**: `pltr sql submit` + `pltr sql wait` for long-running queries
1414. **Export results**: Use `--output` to save results for further analysis
1425. **Use shell mode for exploration**: `pltr shell` provides tab completion and history
143
144## Getting Help
145
146```bash
147pltr --help # All commands
148pltr <command> --help # Command help
149pltr <command> <sub> --help # Subcommand help
150```