kaggle-cli
Official Kaggle CLI
Official Kaggle command-line tool that lets you download competition data, submit predictions, manage datasets and notebooks, and browse discussions from your terminal instead of a browser.
This is the official command-line tool for Kaggle, the data science competition platform owned by Google. Instead of using the Kaggle website through a browser, this tool lets you interact with Kaggle from your terminal, which is useful for automating tasks or working on a remote server where a browser is not practical.
The tool is installed as a Python package with a single pip command. Once installed, you run it with the kaggle command followed by whatever action you want to take.
The main things it can do: list and download data for competitions, submit your results to a competition, and manage datasets by listing, creating, updating, downloading, or deleting them. It also covers models and model variations with the same set of actions. For Kaggle notebooks (which Kaggle calls kernels), you can list them, update them, run them, download their code and output files, or delete them. There is also basic support for browsing and reading Kaggle's discussion forums.
Kaggle uses this tool heavily in its data science workflows and publishes it under the Apache 2.0 open-source license. The repository is written in Python and uses a build tool called Hatch for development tasks like running tests, linting, and formatting. The tests connect to the live Kaggle website rather than a local mock, so running them requires a Kaggle account with API credentials configured.
User documentation with detailed examples and authentication setup instructions is kept in a separate docs folder within the repository rather than in the main README.
Where it fits
- Download Kaggle competition datasets directly to a remote server or cloud machine where a browser isn't available.
- Submit competition prediction files from a script or automated ML pipeline without opening the Kaggle website.
- Create, update, or download public Kaggle datasets programmatically from the command line.
- Trigger Kaggle notebooks and download their output files in automated workflows.