pltr-cli


Namepltr-cli JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryCommand-line interface for Palantir Foundry APIs
upload_time2025-08-10 15:31:49
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 command-line interface tool for interacting with Palantir Foundry APIs.

## Overview

`pltr-cli` provides a streamlined way to interact with Palantir Foundry services from the command line. Built on top of the official `foundry-platform-sdk`, it offers intuitive commands for dataset management, ontology operations, SQL queries, and more.

## Features

- 🔐 **Secure Authentication**: Support for both token and OAuth2 authentication with secure credential storage
- 📊 **Dataset Management**: List, create, upload, and download datasets with progress indicators
- 🔍 **Ontology Operations**: Search and interact with ontology objects and actions
- 📝 **SQL Queries**: Execute SQL queries directly from the command line
- 🎨 **Rich Output**: Beautiful terminal output with table formatting and color support
- 👤 **Multi-Profile Support**: Manage multiple Foundry environments with profile configurations

## 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

### Configure Authentication

Set up your Foundry credentials:

```bash
pltr configure --profile production
```

This will prompt you for:
- Foundry host URL
- Authentication method (token or OAuth2)
- Credentials

### Basic Usage

```bash
# List datasets
pltr dataset list

# Upload a file to a dataset
pltr dataset upload <dataset-id> path/to/file.csv

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

# Search ontology objects
pltr ontology object search "customer name:John"
```

## Command Reference

### Dataset Commands

- `pltr dataset list` - List all accessible datasets
- `pltr dataset get <id>` - Get dataset details
- `pltr dataset upload <id> <file>` - Upload file to dataset
- `pltr dataset download <id>` - Download dataset files

### Ontology Commands

- `pltr ontology object search <query>` - Search for objects
- `pltr ontology object get <id>` - Get specific object
- `pltr ontology action execute <action>` - Execute ontology action

### SQL Commands

- `pltr sql execute <query>` - Execute SQL query
- `pltr sql export <query> --output <file>` - Export query results

### Configuration Commands

- `pltr configure` - Set up authentication
- `pltr configure --profile <name>` - Configure named profile

## Configuration

Configuration files are stored in `~/.pltr/`:
- `~/.pltr/config` - Profile configurations
- Credentials are stored securely in your system keyring

### Environment Variables

You can also configure authentication via environment variables:

```bash
export FOUNDRY_HOST=https://your-foundry.palantir.com
export FOUNDRY_TOKEN=your-token-here
```

## Development

### Prerequisites

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

### Setup

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

# Install dependencies
uv sync

# Run tests
uv run pytest

# Format code
uv run ruff format
uv run ruff check --fix
```

### Project Structure

```
pltr-cli/
├── src/
│   └── pltr/
│       ├── cli.py           # Main CLI entry point
│       ├── auth/            # Authentication handling
│       ├── commands/        # CLI command implementations
│       ├── services/        # Foundry service wrappers
│       ├── config/          # Configuration management
│       └── utils/           # Utilities and helpers
└── tests/                   # Test suite
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## 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/8d/0d/d6e9e2715e53b1dc2de6473cd46fef6530c5fa1b5f2e5af4c2cc0b1422be/pltr_cli-0.1.2.tar.gz",
    "platform": null,
    "description": "# pltr-cli\n\nA command-line interface tool for interacting with Palantir Foundry APIs.\n\n## Overview\n\n`pltr-cli` provides a streamlined way to interact with Palantir Foundry services from the command line. Built on top of the official `foundry-platform-sdk`, it offers intuitive commands for dataset management, ontology operations, SQL queries, and more.\n\n## Features\n\n- \ud83d\udd10 **Secure Authentication**: Support for both token and OAuth2 authentication with secure credential storage\n- \ud83d\udcca **Dataset Management**: List, create, upload, and download datasets with progress indicators\n- \ud83d\udd0d **Ontology Operations**: Search and interact with ontology objects and actions\n- \ud83d\udcdd **SQL Queries**: Execute SQL queries directly from the command line\n- \ud83c\udfa8 **Rich Output**: Beautiful terminal output with table formatting and color support\n- \ud83d\udc64 **Multi-Profile Support**: Manage multiple Foundry environments with profile configurations\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## Quick Start\n\n### Configure Authentication\n\nSet up your Foundry credentials:\n\n```bash\npltr configure --profile production\n```\n\nThis will prompt you for:\n- Foundry host URL\n- Authentication method (token or OAuth2)\n- Credentials\n\n### Basic Usage\n\n```bash\n# List datasets\npltr dataset list\n\n# Upload a file to a dataset\npltr dataset upload <dataset-id> path/to/file.csv\n\n# Execute a SQL query\npltr sql execute \"SELECT * FROM dataset LIMIT 10\"\n\n# Search ontology objects\npltr ontology object search \"customer name:John\"\n```\n\n## Command Reference\n\n### Dataset Commands\n\n- `pltr dataset list` - List all accessible datasets\n- `pltr dataset get <id>` - Get dataset details\n- `pltr dataset upload <id> <file>` - Upload file to dataset\n- `pltr dataset download <id>` - Download dataset files\n\n### Ontology Commands\n\n- `pltr ontology object search <query>` - Search for objects\n- `pltr ontology object get <id>` - Get specific object\n- `pltr ontology action execute <action>` - Execute ontology action\n\n### SQL Commands\n\n- `pltr sql execute <query>` - Execute SQL query\n- `pltr sql export <query> --output <file>` - Export query results\n\n### Configuration Commands\n\n- `pltr configure` - Set up authentication\n- `pltr configure --profile <name>` - Configure named profile\n\n## Configuration\n\nConfiguration files are stored in `~/.pltr/`:\n- `~/.pltr/config` - Profile configurations\n- Credentials are stored securely in your system keyring\n\n### Environment Variables\n\nYou can also configure authentication via environment variables:\n\n```bash\nexport FOUNDRY_HOST=https://your-foundry.palantir.com\nexport FOUNDRY_TOKEN=your-token-here\n```\n\n## Development\n\n### Prerequisites\n\n- Python 3.9+\n- [uv](https://github.com/astral-sh/uv) for dependency management\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/anjor/pltr-cli.git\ncd pltr-cli\n\n# Install dependencies\nuv sync\n\n# Run tests\nuv run pytest\n\n# Format code\nuv run ruff format\nuv run ruff check --fix\n```\n\n### Project Structure\n\n```\npltr-cli/\n\u251c\u2500\u2500 src/\n\u2502   \u2514\u2500\u2500 pltr/\n\u2502       \u251c\u2500\u2500 cli.py           # Main CLI entry point\n\u2502       \u251c\u2500\u2500 auth/            # Authentication handling\n\u2502       \u251c\u2500\u2500 commands/        # CLI command implementations\n\u2502       \u251c\u2500\u2500 services/        # Foundry service wrappers\n\u2502       \u251c\u2500\u2500 config/          # Configuration management\n\u2502       \u2514\u2500\u2500 utils/           # Utilities and helpers\n\u2514\u2500\u2500 tests/                   # Test suite\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'feat: add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\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).",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Command-line interface for Palantir Foundry APIs",
    "version": "0.1.2",
    "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": "1bacf622e365bd3f33f71ffb7fcc8ff1ba8ac5e9d7fef8334c1252a91bd26a35",
                "md5": "9ce0397babd818d8b30fe97e10bc81c1",
                "sha256": "2f04a2a58d39d219e791e2ea79bc58c65682dac05c0a4401e8cf71062f4706c5"
            },
            "downloads": -1,
            "filename": "pltr_cli-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9ce0397babd818d8b30fe97e10bc81c1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 27524,
            "upload_time": "2025-08-10T15:31:47",
            "upload_time_iso_8601": "2025-08-10T15:31:47.785701Z",
            "url": "https://files.pythonhosted.org/packages/1b/ac/f622e365bd3f33f71ffb7fcc8ff1ba8ac5e9d7fef8334c1252a91bd26a35/pltr_cli-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8d0dd6e9e2715e53b1dc2de6473cd46fef6530c5fa1b5f2e5af4c2cc0b1422be",
                "md5": "bacfcd4fbd652f0fd66048d089b28fed",
                "sha256": "d202018e763538350c20224398f52bb2938b458027ae2677cd04270a8bb6b91e"
            },
            "downloads": -1,
            "filename": "pltr_cli-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "bacfcd4fbd652f0fd66048d089b28fed",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 92089,
            "upload_time": "2025-08-10T15:31:49",
            "upload_time_iso_8601": "2025-08-10T15:31:49.197425Z",
            "url": "https://files.pythonhosted.org/packages/8d/0d/d6e9e2715e53b1dc2de6473cd46fef6530c5fa1b5f2e5af4c2cc0b1422be/pltr_cli-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-10 15:31:49",
    "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: 0.47933s