pltr-cli


Namepltr-cli JSON
Version 0.9.0 PyPI version JSON
download
home_pageNone
SummaryCommand-line interface for Palantir Foundry APIs
upload_time2025-09-12 08:54:36
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords api cli data foundry ontology palantir
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pltr-cli

A comprehensive command-line interface for Palantir Foundry APIs, providing 80+ commands for data analysis, dataset management, ontology operations, orchestration, SQL queries, folder management, and administrative tasks.

## Overview

`pltr-cli` provides a powerful and intuitive way to interact with Palantir Foundry from the command line. Built on top of the official `foundry-platform-sdk`, it offers comprehensive access to Foundry's capabilities with a focus on productivity and ease of use.

## ✨ Key Features

- 🔐 **Secure Authentication**: Token and OAuth2 support with encrypted credential storage
- 📊 **Dataset Operations**: Complete dataset management with branches, files, transactions, and views (RID-based API)
- 📁 **Filesystem Management**: Complete filesystem operations including folders, projects, spaces, and resources
- 🏗️ **Project Management**: Create, update, and manage Foundry projects within spaces
- 🌐 **Space Management**: Administer spaces, manage members, and control access
- 🔐 **Resource Permissions**: Grant, revoke, and manage role-based access to resources
- 🔗 **Connectivity & Imports**: Manage external connections and import files/tables from various data sources
- 🎯 **Comprehensive Ontology Access**: 13 commands for objects, actions, and queries
- 🏗️ **Orchestration Management**: Create, manage, and monitor builds, jobs, and schedules
- 🎬 **MediaSets Operations**: Upload, download, and manage media content with transaction support
- 📝 **Full SQL Support**: Execute, submit, monitor, and export query results
- 👥 **Admin Operations**: User, group, role, and organization management (16 commands)
- 💻 **Interactive Shell**: REPL mode with tab completion and command history
- ⚡ **Shell Completion**: Auto-completion for bash, zsh, and fish
- 🎨 **Rich Output**: Beautiful terminal formatting with multiple export formats (table, JSON, CSV)
- 👤 **Multi-Profile Support**: Manage multiple Foundry environments seamlessly

## Installation

### Using pip

```bash
pip install pltr-cli
```

### From source

```bash
# Clone the repository
git clone https://github.com/anjor/pltr-cli.git
cd pltr-cli

# Install with uv
uv sync

# Run the CLI
uv run pltr --help
```

## 🚀 Quick Start

### 1. Configure Authentication

Set up your Foundry credentials:

```bash
pltr configure configure
```

Follow the interactive prompts to enter:
- Foundry hostname (e.g., `foundry.company.com`)
- Authentication method (token or OAuth2)
- Your credentials

### 2. Verify Connection

Test your setup:

```bash
pltr verify
```

### 3. Start Exploring

```bash
# Check current user
pltr admin user current

# List available ontologies
pltr ontology list

# Search for builds
pltr orchestration builds search

# Create a new folder
pltr folder create "My Project"

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

# Manage spaces and projects
pltr space list
pltr project create "My Project" ri.compass.main.space.123
pltr project list --space-rid ri.compass.main.space.123

# Manage resource permissions
pltr resource-role grant ri.compass.main.dataset.123 user123 User viewer
pltr resource-role list ri.compass.main.dataset.123

# Execute a simple SQL query
pltr sql execute "SELECT 1 as test"

# Explore dataset operations (requires dataset RID)
pltr dataset get ri.foundry.main.dataset.abc123
pltr dataset branches list ri.foundry.main.dataset.abc123
pltr dataset files list ri.foundry.main.dataset.abc123

# Dataset transaction management
pltr dataset transactions start ri.foundry.main.dataset.abc123
pltr dataset transactions commit ri.foundry.main.dataset.abc123 <transaction-rid>
pltr dataset files upload myfile.csv ri.foundry.main.dataset.abc123 --transaction-rid <rid>

# Start interactive mode for exploration
pltr shell
```

### 4. Enable Shell Completion

For the best experience:

```bash
pltr completion install
```

📖 **Need more help?** See the **[Quick Start Guide](docs/user-guide/quick-start.md)** for detailed setup instructions.

## 📚 Documentation

pltr-cli provides comprehensive documentation to help you get the most out of the tool:

### 📖 User Guides
- **[Quick Start Guide](docs/user-guide/quick-start.md)** - Get up and running in 5 minutes
- **[Authentication Setup](docs/user-guide/authentication.md)** - Complete guide to token and OAuth2 setup
- **[Command Reference](docs/user-guide/commands.md)** - Complete reference for all 70+ commands
- **[Common Workflows](docs/user-guide/workflows.md)** - Real-world data analysis patterns
- **[Troubleshooting](docs/user-guide/troubleshooting.md)** - Solutions to common issues

### 🔧 Developer Resources
- **[API Wrapper Documentation](docs/api/wrapper.md)** - Architecture and extension guide
- **[Examples Gallery](docs/examples/gallery.md)** - Real-world use cases and automation scripts

### 🎯 Quick Command Overview

**Most Common Commands:**
```bash
# Authentication & Setup
pltr configure configure        # Set up authentication
pltr verify                    # Test connection

# Data Analysis
pltr sql execute "SELECT * FROM table"  # Run SQL queries
pltr ontology list             # List ontologies
pltr dataset get <rid>         # Get dataset info

# Filesystem Management
pltr folder create "My Project"         # Create folders
pltr space create "Team Space" <org-rid> # Create spaces
pltr project create "New Project" <space-rid> # Create projects
pltr resource search "dataset name"     # Search resources
pltr resource-role grant <resource-rid> <user-id> User viewer # Grant permissions

# Orchestration
pltr orchestration builds search       # Search builds
pltr orchestration jobs get <job-rid>  # Get job details
pltr orchestration schedules create   # Create schedule

# MediaSets
pltr media-sets get <set-rid> <item-rid>  # Get media item info
pltr media-sets upload <set-rid> file.jpg "/path/file.jpg" <txn-id>  # Upload media
pltr media-sets download <set-rid> <item-rid> output.jpg  # Download media

# Connectivity & Data Imports
pltr connectivity connection list              # List available connections
pltr connectivity connection get <conn-rid>    # Get connection details
pltr connectivity import file <conn-rid> <source-path> <dataset-rid> --execute  # Import file
pltr connectivity import table <conn-rid> <table-name> <dataset-rid> --execute  # Import table

# Administrative
pltr admin user current        # Current user info
pltr admin user list          # List users

# Interactive & Tools
pltr shell                    # Interactive mode
pltr completion install       # Enable tab completion
```

💡 **Tip**: Use `pltr --help` or `pltr <command> --help` for detailed command help.

For the complete command reference with examples, see **[Command Reference](docs/user-guide/commands.md)**.

### 🏗️ Orchestration Commands

pltr-cli provides comprehensive support for Foundry's Orchestration module:

#### Build Management
```bash
# Search for builds
pltr orchestration builds search

# Get build details
pltr orchestration builds get ri.orchestration.main.build.12345

# Create a new build
pltr orchestration builds create '{"dataset_rid": "ri.foundry.main.dataset.abc"}' --branch main

# Cancel a running build
pltr orchestration builds cancel ri.orchestration.main.build.12345

# List jobs in a build
pltr orchestration builds jobs ri.orchestration.main.build.12345
```

#### Job Management
```bash
# Get job details
pltr orchestration jobs get ri.orchestration.main.job.12345

# Get multiple jobs in batch
pltr orchestration jobs get-batch "rid1,rid2,rid3"
```

#### Schedule Management
```bash
# Get schedule information
pltr orchestration schedules get ri.orchestration.main.schedule.12345

# Create a new schedule
pltr orchestration schedules create '{"type": "BUILD", "target": "dataset-rid"}' \
  --name "Daily Build" --description "Automated daily build"

# Pause/unpause schedules
pltr orchestration schedules pause ri.orchestration.main.schedule.12345
pltr orchestration schedules unpause ri.orchestration.main.schedule.12345

# Execute schedule immediately
pltr orchestration schedules run ri.orchestration.main.schedule.12345

# Delete a schedule
pltr orchestration schedules delete ri.orchestration.main.schedule.12345 --yes
```

**All orchestration commands support:**
- Multiple output formats (table, JSON, CSV)
- File output (`--output filename`)
- Profile selection (`--profile production`)
- Preview mode for schedules (`--preview`)

### 🎬 MediaSets Commands

pltr-cli provides full support for Foundry's MediaSets module for managing media content:

#### Media Item Operations
```bash
# Get media item information
pltr media-sets get ri.mediasets.main.media-set.abc ri.mediasets.main.media-item.123

# Get media item RID by path
pltr media-sets get-by-path ri.mediasets.main.media-set.abc "/images/photo.jpg"

# Get a reference for embedding
pltr media-sets reference ri.mediasets.main.media-set.abc ri.mediasets.main.media-item.123
```

#### Transaction Management
```bash
# Create a new upload transaction
pltr media-sets create ri.mediasets.main.media-set.abc --branch main

# Commit transaction (makes uploads available)
pltr media-sets commit ri.mediasets.main.media-set.abc transaction-id-12345

# Abort transaction (deletes uploads)
pltr media-sets abort ri.mediasets.main.media-set.abc transaction-id-12345 --yes
```

#### Upload and Download
```bash
# Upload a file to media set
pltr media-sets upload ri.mediasets.main.media-set.abc \
  /local/path/image.jpg "/media/images/image.jpg" transaction-id-12345

# Download media item (processed version)
pltr media-sets download ri.mediasets.main.media-set.abc \
  ri.mediasets.main.media-item.123 /local/download/image.jpg

# Download original version
pltr media-sets download ri.mediasets.main.media-set.abc \
  ri.mediasets.main.media-item.123 /local/download/original.jpg --original
```

**All MediaSets commands support:**
- Multiple output formats (table, JSON, CSV)
- File output (`--output filename`)
- Profile selection (`--profile production`)
- Preview mode (`--preview`)
- Transaction-based upload workflow

### 📊 Dataset Transaction Management

pltr-cli provides comprehensive transaction management for datasets, allowing atomic operations with rollback capability:

#### Transaction Lifecycle
```bash
# Start a new transaction
pltr dataset transactions start ri.foundry.main.dataset.abc123 --branch master --type APPEND
# Returns transaction RID for use in subsequent operations

# Check transaction status
pltr dataset transactions status ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz

# List all transactions for a dataset
pltr dataset transactions list ri.foundry.main.dataset.abc123 --branch master

# Commit a transaction (make changes permanent)
pltr dataset transactions commit ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz

# Abort a transaction (discard all changes)
pltr dataset transactions abort ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz --yes
```

#### File Operations with Transactions
```bash
# Upload files within a transaction
pltr dataset files upload data.csv ri.foundry.main.dataset.abc123 \
  --transaction-rid ri.foundry.main.transaction.xyz

# Multiple file uploads in same transaction
pltr dataset files upload file1.csv ri.foundry.main.dataset.abc123 \
  --transaction-rid ri.foundry.main.transaction.xyz
pltr dataset files upload file2.csv ri.foundry.main.dataset.abc123 \
  --transaction-rid ri.foundry.main.transaction.xyz

# Commit when ready
pltr dataset transactions commit ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz
```

#### Transaction Types
- **APPEND**: Add new files to dataset
- **UPDATE**: Add new files and overwrite existing ones
- **SNAPSHOT**: Replace entire dataset with new files
- **DELETE**: Remove files from dataset

#### Example Workflow
```bash
# Start a transaction for bulk data update
TRANSACTION=$(pltr dataset transactions start ri.foundry.main.dataset.abc123 \
  --type UPDATE --format json | jq -r '.transaction_rid')

# Upload multiple files
pltr dataset files upload data1.csv ri.foundry.main.dataset.abc123 --transaction-rid $TRANSACTION
pltr dataset files upload data2.csv ri.foundry.main.dataset.abc123 --transaction-rid $TRANSACTION

# Check status before committing
pltr dataset transactions status ri.foundry.main.dataset.abc123 $TRANSACTION

# Commit if everything looks good
pltr dataset transactions commit ri.foundry.main.dataset.abc123 $TRANSACTION
```

**Benefits:**
- **Data Integrity**: Atomic operations with rollback capability
- **Error Recovery**: Clean rollback from failed operations
- **Collaboration**: Better concurrent modification handling
- **Automation**: Reliable data pipeline operations

## ⚙️ Configuration

pltr-cli stores configuration securely using industry best practices:

- **Profile Configuration**: `~/.config/pltr/profiles.json`
- **Credentials**: Encrypted in system keyring (never stored in plain text)
- **Shell History**: `~/.config/pltr/repl_history` (for interactive mode)

### Environment Variables

For CI/CD and automation, use environment variables:

```bash
# Token authentication
export FOUNDRY_TOKEN="your-api-token"
export FOUNDRY_HOST="foundry.company.com"

# OAuth2 authentication
export FOUNDRY_CLIENT_ID="your-client-id"
export FOUNDRY_CLIENT_SECRET="your-client-secret"
export FOUNDRY_HOST="foundry.company.com"
```

See **[Authentication Setup](docs/user-guide/authentication.md)** for complete configuration options.

## 🔧 Development

### Prerequisites

- Python 3.9+
- [uv](https://github.com/astral-sh/uv) for dependency management

### Quick Development Setup

```bash
# Clone the repository
git clone https://github.com/anjor/pltr-cli.git
cd pltr-cli

# Install dependencies and development tools
uv sync

# Install pre-commit hooks
uv run pre-commit install

# Run tests
uv run pytest

# Run linting and formatting
uv run ruff check src/
uv run ruff format src/
uv run mypy src/
```

### Project Architecture

pltr-cli uses a layered architecture:

- **CLI Layer** (Typer): Command-line interface and argument parsing
- **Command Layer**: Command implementations with validation
- **Service Layer**: Business logic and foundry-platform-sdk integration
- **Auth Layer**: Secure authentication and credential management
- **Utils Layer**: Formatting, progress, and helper functions

See **[API Wrapper Documentation](docs/api/wrapper.md)** for detailed architecture information and extension guides.

## 📊 Current Status

pltr-cli is **production-ready** with comprehensive features:

- ✅ **80+ Commands** across 10 command groups
- ✅ **273 Unit Tests** with 67% code coverage
- ✅ **Published on PyPI** with automated releases
- ✅ **Cross-Platform** support (Windows, macOS, Linux)
- ✅ **Comprehensive Documentation** (Quick start, guides, examples)
- ✅ **Interactive Shell** with tab completion and history
- ✅ **CI/CD Ready** with environment variable support

**Latest Release**: Available on [PyPI](https://pypi.org/project/pltr-cli/)

## 🤝 Contributing

Contributions are welcome! Whether you're fixing bugs, adding features, or improving documentation.

### Getting Started

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes following the existing patterns
4. Add tests for new functionality
5. Run the test suite and linting
6. Commit using conventional commit format (`feat:`, `fix:`, `docs:`, etc.)
7. Push to your branch and create a Pull Request

### Development Guidelines

- Follow existing code patterns and architecture
- Add tests for new functionality
- Update documentation for user-facing changes
- Use type hints throughout
- Follow the existing error handling patterns

See **[API Wrapper Documentation](docs/api/wrapper.md)** for detailed development guidelines.

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Acknowledgments

Built on top of the official [Palantir Foundry Platform Python SDK](https://github.com/palantir/foundry-platform-python).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pltr-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "api, cli, data, foundry, ontology, palantir",
    "author": null,
    "author_email": "anjor <anjor@umd.edu>",
    "download_url": "https://files.pythonhosted.org/packages/bc/55/7714f8613247b657555941585a55fa85e3f114c2e89f2b2bee7177c0deff/pltr_cli-0.9.0.tar.gz",
    "platform": null,
    "description": "# pltr-cli\n\nA comprehensive command-line interface for Palantir Foundry APIs, providing 80+ commands for data analysis, dataset management, ontology operations, orchestration, SQL queries, folder management, and administrative tasks.\n\n## Overview\n\n`pltr-cli` provides a powerful and intuitive way to interact with Palantir Foundry from the command line. Built on top of the official `foundry-platform-sdk`, it offers comprehensive access to Foundry's capabilities with a focus on productivity and ease of use.\n\n## \u2728 Key Features\n\n- \ud83d\udd10 **Secure Authentication**: Token and OAuth2 support with encrypted credential storage\n- \ud83d\udcca **Dataset Operations**: Complete dataset management with branches, files, transactions, and views (RID-based API)\n- \ud83d\udcc1 **Filesystem Management**: Complete filesystem operations including folders, projects, spaces, and resources\n- \ud83c\udfd7\ufe0f **Project Management**: Create, update, and manage Foundry projects within spaces\n- \ud83c\udf10 **Space Management**: Administer spaces, manage members, and control access\n- \ud83d\udd10 **Resource Permissions**: Grant, revoke, and manage role-based access to resources\n- \ud83d\udd17 **Connectivity & Imports**: Manage external connections and import files/tables from various data sources\n- \ud83c\udfaf **Comprehensive Ontology Access**: 13 commands for objects, actions, and queries\n- \ud83c\udfd7\ufe0f **Orchestration Management**: Create, manage, and monitor builds, jobs, and schedules\n- \ud83c\udfac **MediaSets Operations**: Upload, download, and manage media content with transaction support\n- \ud83d\udcdd **Full SQL Support**: Execute, submit, monitor, and export query results\n- \ud83d\udc65 **Admin Operations**: User, group, role, and organization management (16 commands)\n- \ud83d\udcbb **Interactive Shell**: REPL mode with tab completion and command history\n- \u26a1 **Shell Completion**: Auto-completion for bash, zsh, and fish\n- \ud83c\udfa8 **Rich Output**: Beautiful terminal formatting with multiple export formats (table, JSON, CSV)\n- \ud83d\udc64 **Multi-Profile Support**: Manage multiple Foundry environments seamlessly\n\n## Installation\n\n### Using pip\n\n```bash\npip install pltr-cli\n```\n\n### From source\n\n```bash\n# Clone the repository\ngit clone https://github.com/anjor/pltr-cli.git\ncd pltr-cli\n\n# Install with uv\nuv sync\n\n# Run the CLI\nuv run pltr --help\n```\n\n## \ud83d\ude80 Quick Start\n\n### 1. Configure Authentication\n\nSet up your Foundry credentials:\n\n```bash\npltr configure configure\n```\n\nFollow the interactive prompts to enter:\n- Foundry hostname (e.g., `foundry.company.com`)\n- Authentication method (token or OAuth2)\n- Your credentials\n\n### 2. Verify Connection\n\nTest your setup:\n\n```bash\npltr verify\n```\n\n### 3. Start Exploring\n\n```bash\n# Check current user\npltr admin user current\n\n# List available ontologies\npltr ontology list\n\n# Search for builds\npltr orchestration builds search\n\n# Create a new folder\npltr folder create \"My Project\"\n\n# List root folder contents\npltr folder list ri.compass.main.folder.0\n\n# Manage spaces and projects\npltr space list\npltr project create \"My Project\" ri.compass.main.space.123\npltr project list --space-rid ri.compass.main.space.123\n\n# Manage resource permissions\npltr resource-role grant ri.compass.main.dataset.123 user123 User viewer\npltr resource-role list ri.compass.main.dataset.123\n\n# Execute a simple SQL query\npltr sql execute \"SELECT 1 as test\"\n\n# Explore dataset operations (requires dataset RID)\npltr dataset get ri.foundry.main.dataset.abc123\npltr dataset branches list ri.foundry.main.dataset.abc123\npltr dataset files list ri.foundry.main.dataset.abc123\n\n# Dataset transaction management\npltr dataset transactions start ri.foundry.main.dataset.abc123\npltr dataset transactions commit ri.foundry.main.dataset.abc123 <transaction-rid>\npltr dataset files upload myfile.csv ri.foundry.main.dataset.abc123 --transaction-rid <rid>\n\n# Start interactive mode for exploration\npltr shell\n```\n\n### 4. Enable Shell Completion\n\nFor the best experience:\n\n```bash\npltr completion install\n```\n\n\ud83d\udcd6 **Need more help?** See the **[Quick Start Guide](docs/user-guide/quick-start.md)** for detailed setup instructions.\n\n## \ud83d\udcda Documentation\n\npltr-cli provides comprehensive documentation to help you get the most out of the tool:\n\n### \ud83d\udcd6 User Guides\n- **[Quick Start Guide](docs/user-guide/quick-start.md)** - Get up and running in 5 minutes\n- **[Authentication Setup](docs/user-guide/authentication.md)** - Complete guide to token and OAuth2 setup\n- **[Command Reference](docs/user-guide/commands.md)** - Complete reference for all 70+ commands\n- **[Common Workflows](docs/user-guide/workflows.md)** - Real-world data analysis patterns\n- **[Troubleshooting](docs/user-guide/troubleshooting.md)** - Solutions to common issues\n\n### \ud83d\udd27 Developer Resources\n- **[API Wrapper Documentation](docs/api/wrapper.md)** - Architecture and extension guide\n- **[Examples Gallery](docs/examples/gallery.md)** - Real-world use cases and automation scripts\n\n### \ud83c\udfaf Quick Command Overview\n\n**Most Common Commands:**\n```bash\n# Authentication & Setup\npltr configure configure        # Set up authentication\npltr verify                    # Test connection\n\n# Data Analysis\npltr sql execute \"SELECT * FROM table\"  # Run SQL queries\npltr ontology list             # List ontologies\npltr dataset get <rid>         # Get dataset info\n\n# Filesystem Management\npltr folder create \"My Project\"         # Create folders\npltr space create \"Team Space\" <org-rid> # Create spaces\npltr project create \"New Project\" <space-rid> # Create projects\npltr resource search \"dataset name\"     # Search resources\npltr resource-role grant <resource-rid> <user-id> User viewer # Grant permissions\n\n# Orchestration\npltr orchestration builds search       # Search builds\npltr orchestration jobs get <job-rid>  # Get job details\npltr orchestration schedules create   # Create schedule\n\n# MediaSets\npltr media-sets get <set-rid> <item-rid>  # Get media item info\npltr media-sets upload <set-rid> file.jpg \"/path/file.jpg\" <txn-id>  # Upload media\npltr media-sets download <set-rid> <item-rid> output.jpg  # Download media\n\n# Connectivity & Data Imports\npltr connectivity connection list              # List available connections\npltr connectivity connection get <conn-rid>    # Get connection details\npltr connectivity import file <conn-rid> <source-path> <dataset-rid> --execute  # Import file\npltr connectivity import table <conn-rid> <table-name> <dataset-rid> --execute  # Import table\n\n# Administrative\npltr admin user current        # Current user info\npltr admin user list          # List users\n\n# Interactive & Tools\npltr shell                    # Interactive mode\npltr completion install       # Enable tab completion\n```\n\n\ud83d\udca1 **Tip**: Use `pltr --help` or `pltr <command> --help` for detailed command help.\n\nFor the complete command reference with examples, see **[Command Reference](docs/user-guide/commands.md)**.\n\n### \ud83c\udfd7\ufe0f Orchestration Commands\n\npltr-cli provides comprehensive support for Foundry's Orchestration module:\n\n#### Build Management\n```bash\n# Search for builds\npltr orchestration builds search\n\n# Get build details\npltr orchestration builds get ri.orchestration.main.build.12345\n\n# Create a new build\npltr orchestration builds create '{\"dataset_rid\": \"ri.foundry.main.dataset.abc\"}' --branch main\n\n# Cancel a running build\npltr orchestration builds cancel ri.orchestration.main.build.12345\n\n# List jobs in a build\npltr orchestration builds jobs ri.orchestration.main.build.12345\n```\n\n#### Job Management\n```bash\n# Get job details\npltr orchestration jobs get ri.orchestration.main.job.12345\n\n# Get multiple jobs in batch\npltr orchestration jobs get-batch \"rid1,rid2,rid3\"\n```\n\n#### Schedule Management\n```bash\n# Get schedule information\npltr orchestration schedules get ri.orchestration.main.schedule.12345\n\n# Create a new schedule\npltr orchestration schedules create '{\"type\": \"BUILD\", \"target\": \"dataset-rid\"}' \\\n  --name \"Daily Build\" --description \"Automated daily build\"\n\n# Pause/unpause schedules\npltr orchestration schedules pause ri.orchestration.main.schedule.12345\npltr orchestration schedules unpause ri.orchestration.main.schedule.12345\n\n# Execute schedule immediately\npltr orchestration schedules run ri.orchestration.main.schedule.12345\n\n# Delete a schedule\npltr orchestration schedules delete ri.orchestration.main.schedule.12345 --yes\n```\n\n**All orchestration commands support:**\n- Multiple output formats (table, JSON, CSV)\n- File output (`--output filename`)\n- Profile selection (`--profile production`)\n- Preview mode for schedules (`--preview`)\n\n### \ud83c\udfac MediaSets Commands\n\npltr-cli provides full support for Foundry's MediaSets module for managing media content:\n\n#### Media Item Operations\n```bash\n# Get media item information\npltr media-sets get ri.mediasets.main.media-set.abc ri.mediasets.main.media-item.123\n\n# Get media item RID by path\npltr media-sets get-by-path ri.mediasets.main.media-set.abc \"/images/photo.jpg\"\n\n# Get a reference for embedding\npltr media-sets reference ri.mediasets.main.media-set.abc ri.mediasets.main.media-item.123\n```\n\n#### Transaction Management\n```bash\n# Create a new upload transaction\npltr media-sets create ri.mediasets.main.media-set.abc --branch main\n\n# Commit transaction (makes uploads available)\npltr media-sets commit ri.mediasets.main.media-set.abc transaction-id-12345\n\n# Abort transaction (deletes uploads)\npltr media-sets abort ri.mediasets.main.media-set.abc transaction-id-12345 --yes\n```\n\n#### Upload and Download\n```bash\n# Upload a file to media set\npltr media-sets upload ri.mediasets.main.media-set.abc \\\n  /local/path/image.jpg \"/media/images/image.jpg\" transaction-id-12345\n\n# Download media item (processed version)\npltr media-sets download ri.mediasets.main.media-set.abc \\\n  ri.mediasets.main.media-item.123 /local/download/image.jpg\n\n# Download original version\npltr media-sets download ri.mediasets.main.media-set.abc \\\n  ri.mediasets.main.media-item.123 /local/download/original.jpg --original\n```\n\n**All MediaSets commands support:**\n- Multiple output formats (table, JSON, CSV)\n- File output (`--output filename`)\n- Profile selection (`--profile production`)\n- Preview mode (`--preview`)\n- Transaction-based upload workflow\n\n### \ud83d\udcca Dataset Transaction Management\n\npltr-cli provides comprehensive transaction management for datasets, allowing atomic operations with rollback capability:\n\n#### Transaction Lifecycle\n```bash\n# Start a new transaction\npltr dataset transactions start ri.foundry.main.dataset.abc123 --branch master --type APPEND\n# Returns transaction RID for use in subsequent operations\n\n# Check transaction status\npltr dataset transactions status ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz\n\n# List all transactions for a dataset\npltr dataset transactions list ri.foundry.main.dataset.abc123 --branch master\n\n# Commit a transaction (make changes permanent)\npltr dataset transactions commit ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz\n\n# Abort a transaction (discard all changes)\npltr dataset transactions abort ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz --yes\n```\n\n#### File Operations with Transactions\n```bash\n# Upload files within a transaction\npltr dataset files upload data.csv ri.foundry.main.dataset.abc123 \\\n  --transaction-rid ri.foundry.main.transaction.xyz\n\n# Multiple file uploads in same transaction\npltr dataset files upload file1.csv ri.foundry.main.dataset.abc123 \\\n  --transaction-rid ri.foundry.main.transaction.xyz\npltr dataset files upload file2.csv ri.foundry.main.dataset.abc123 \\\n  --transaction-rid ri.foundry.main.transaction.xyz\n\n# Commit when ready\npltr dataset transactions commit ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz\n```\n\n#### Transaction Types\n- **APPEND**: Add new files to dataset\n- **UPDATE**: Add new files and overwrite existing ones\n- **SNAPSHOT**: Replace entire dataset with new files\n- **DELETE**: Remove files from dataset\n\n#### Example Workflow\n```bash\n# Start a transaction for bulk data update\nTRANSACTION=$(pltr dataset transactions start ri.foundry.main.dataset.abc123 \\\n  --type UPDATE --format json | jq -r '.transaction_rid')\n\n# Upload multiple files\npltr dataset files upload data1.csv ri.foundry.main.dataset.abc123 --transaction-rid $TRANSACTION\npltr dataset files upload data2.csv ri.foundry.main.dataset.abc123 --transaction-rid $TRANSACTION\n\n# Check status before committing\npltr dataset transactions status ri.foundry.main.dataset.abc123 $TRANSACTION\n\n# Commit if everything looks good\npltr dataset transactions commit ri.foundry.main.dataset.abc123 $TRANSACTION\n```\n\n**Benefits:**\n- **Data Integrity**: Atomic operations with rollback capability\n- **Error Recovery**: Clean rollback from failed operations\n- **Collaboration**: Better concurrent modification handling\n- **Automation**: Reliable data pipeline operations\n\n## \u2699\ufe0f Configuration\n\npltr-cli stores configuration securely using industry best practices:\n\n- **Profile Configuration**: `~/.config/pltr/profiles.json`\n- **Credentials**: Encrypted in system keyring (never stored in plain text)\n- **Shell History**: `~/.config/pltr/repl_history` (for interactive mode)\n\n### Environment Variables\n\nFor CI/CD and automation, use environment variables:\n\n```bash\n# Token authentication\nexport FOUNDRY_TOKEN=\"your-api-token\"\nexport FOUNDRY_HOST=\"foundry.company.com\"\n\n# OAuth2 authentication\nexport FOUNDRY_CLIENT_ID=\"your-client-id\"\nexport FOUNDRY_CLIENT_SECRET=\"your-client-secret\"\nexport FOUNDRY_HOST=\"foundry.company.com\"\n```\n\nSee **[Authentication Setup](docs/user-guide/authentication.md)** for complete configuration options.\n\n## \ud83d\udd27 Development\n\n### Prerequisites\n\n- Python 3.9+\n- [uv](https://github.com/astral-sh/uv) for dependency management\n\n### Quick Development Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/anjor/pltr-cli.git\ncd pltr-cli\n\n# Install dependencies and development tools\nuv sync\n\n# Install pre-commit hooks\nuv run pre-commit install\n\n# Run tests\nuv run pytest\n\n# Run linting and formatting\nuv run ruff check src/\nuv run ruff format src/\nuv run mypy src/\n```\n\n### Project Architecture\n\npltr-cli uses a layered architecture:\n\n- **CLI Layer** (Typer): Command-line interface and argument parsing\n- **Command Layer**: Command implementations with validation\n- **Service Layer**: Business logic and foundry-platform-sdk integration\n- **Auth Layer**: Secure authentication and credential management\n- **Utils Layer**: Formatting, progress, and helper functions\n\nSee **[API Wrapper Documentation](docs/api/wrapper.md)** for detailed architecture information and extension guides.\n\n## \ud83d\udcca Current Status\n\npltr-cli is **production-ready** with comprehensive features:\n\n- \u2705 **80+ Commands** across 10 command groups\n- \u2705 **273 Unit Tests** with 67% code coverage\n- \u2705 **Published on PyPI** with automated releases\n- \u2705 **Cross-Platform** support (Windows, macOS, Linux)\n- \u2705 **Comprehensive Documentation** (Quick start, guides, examples)\n- \u2705 **Interactive Shell** with tab completion and history\n- \u2705 **CI/CD Ready** with environment variable support\n\n**Latest Release**: Available on [PyPI](https://pypi.org/project/pltr-cli/)\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Whether you're fixing bugs, adding features, or improving documentation.\n\n### Getting Started\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes following the existing patterns\n4. Add tests for new functionality\n5. Run the test suite and linting\n6. Commit using conventional commit format (`feat:`, `fix:`, `docs:`, etc.)\n7. Push to your branch and create a Pull Request\n\n### Development Guidelines\n\n- Follow existing code patterns and architecture\n- Add tests for new functionality\n- Update documentation for user-facing changes\n- Use type hints throughout\n- Follow the existing error handling patterns\n\nSee **[API Wrapper Documentation](docs/api/wrapper.md)** for detailed development guidelines.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\n\nBuilt on top of the official [Palantir Foundry Platform Python SDK](https://github.com/palantir/foundry-platform-python).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Command-line interface for Palantir Foundry APIs",
    "version": "0.9.0",
    "project_urls": {
        "Changelog": "https://github.com/anjor/pltr-cli/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/anjor/pltr-cli/blob/main/README.md",
        "Homepage": "https://github.com/anjor/pltr-cli",
        "Issues": "https://github.com/anjor/pltr-cli/issues",
        "Repository": "https://github.com/anjor/pltr-cli"
    },
    "split_keywords": [
        "api",
        " cli",
        " data",
        " foundry",
        " ontology",
        " palantir"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "787e7b84e7c9ffdb41822f5bb9e60f5f4a6cf0b7e8f950db19d1a7b2d06a535a",
                "md5": "d9d25163fca6a66d8b48d6ca724ea730",
                "sha256": "34591fa051a21bf090e754ca036182a69eadb864c9b95dac95af8f7502f79904"
            },
            "downloads": -1,
            "filename": "pltr_cli-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d9d25163fca6a66d8b48d6ca724ea730",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 103546,
            "upload_time": "2025-09-12T08:54:35",
            "upload_time_iso_8601": "2025-09-12T08:54:35.070534Z",
            "url": "https://files.pythonhosted.org/packages/78/7e/7b84e7c9ffdb41822f5bb9e60f5f4a6cf0b7e8f950db19d1a7b2d06a535a/pltr_cli-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bc557714f8613247b657555941585a55fa85e3f114c2e89f2b2bee7177c0deff",
                "md5": "0ff85468742a6ab5a92f4ca9bc9f602d",
                "sha256": "f1e164a356e7f7750430d521ab90ad0cec5941ea6b61239780ae8d9848cfee3a"
            },
            "downloads": -1,
            "filename": "pltr_cli-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0ff85468742a6ab5a92f4ca9bc9f602d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 240977,
            "upload_time": "2025-09-12T08:54:36",
            "upload_time_iso_8601": "2025-09-12T08:54:36.668441Z",
            "url": "https://files.pythonhosted.org/packages/bc/55/7714f8613247b657555941585a55fa85e3f114c2e89f2b2bee7177c0deff/pltr_cli-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-12 08:54:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "anjor",
    "github_project": "pltr-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pltr-cli"
}
        
Elapsed time: 1.92426s