explaingit

kaggle/kaggle-cli

7,304PythonAudience · dataComplexity · 2/5LicenseSetup · easy

TLDR

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.

Mindmap

mindmap
  root((Kaggle CLI))
    What it does
      Download datasets
      Submit predictions
      Manage notebooks
      Browse discussions
    Features
      Competitions
      Datasets
      Models
      Kernels
    Tech Stack
      Python
      Hatch
    Audience
      Data scientists
      ML engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Download Kaggle competition datasets directly to a remote server or cloud machine where a browser isn't available.

USE CASE 2

Submit competition prediction files from a script or automated ML pipeline without opening the Kaggle website.

USE CASE 3

Create, update, or download public Kaggle datasets programmatically from the command line.

USE CASE 4

Trigger Kaggle notebooks and download their output files in automated workflows.

Tech stack

PythonHatch

Getting it running

Difficulty · easy Time to first run · 5min

Requires a Kaggle account with API credentials (kaggle.json) configured before any commands will work.

Apache 2.0, use freely for any purpose including commercial, modify and distribute as long as you include the original license and copyright notice.

In plain English

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.

Copy-paste prompts

Prompt 1
Show me how to set up the Kaggle CLI with my API credentials and download the training and test data for a specific Kaggle competition.
Prompt 2
Write a shell script that uses the Kaggle CLI to download a competition dataset, unzip it, and print the list of files.
Prompt 3
How do I submit a predictions CSV to a Kaggle competition using the kaggle CLI and see my submission score?
Prompt 4
Show me how to upload a local folder of CSV files to Kaggle as a new public dataset using the kaggle CLI.
Prompt 5
Using the Kaggle CLI, how do I list all competitions I've entered and check my latest submission status for each?
Open on GitHub → Explain another repo

← kaggle on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.