Kaggle CLI
$ kaggle Official Med RiskThe official Kaggle CLI (Kaggle/kaggle-cli) lets users and agents search datasets (kaggle datasets list -v), download/unzip datasets (kaggle datasets download), inspect competitions, and submit predictions via ~/.kaggle/kaggle.json or KAGGLE_USERNAME/KAGGLE_KEY.
pip install kaggle Direct shell CLI for dataset discovery (-v CSV) and downloading archives to local workspace disks.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Non-interactive subcommands with -v (--csv) output on list commands, though lacks native --json output and warns loudly if kaggle.json permissions are not 600.
- Supports
-v/--csvonlist; lacks--jsonoutput
Enforces chmod 600 on ~/.kaggle/kaggle.json; competitions submit and datasets create mutate public/competition state.
- Requires
0600permission on~/.kaggle/kaggle.json; downloads can be very large
Easy pip / uvx install across OSes, though requires creating a Kaggle API token first.
- Distributed on PyPI (
kaggle) and usable viauvx
Canonical CLI for pulling Kaggle datasets and competition bundles in ML scripts.
- One-command dataset discovery, download, and
--unzip
Official Kaggle/kaggle-cli repository under Apache-2.0.
- Official
Kaggle/kaggle-clirepository
Clear official API/CLI docs at kaggle.com/docs/api.
- Official docs at kaggle.com/docs/api
Security, Auth & Guardrails
Reads KAGGLE_USERNAME + KAGGLE_KEY env vars or ~/.kaggle/kaggle.json (requires chmod 600 on Unix).
Free, Apache-2.0 open-source Python CLI; requires a free Kaggle account API token.
# Kaggle CLI Agent Rules - Always check dataset sizes in `kaggle datasets list -v` before running `kaggle datasets download`—some datasets exceed tens of gigabytes. - Ensure `~/.kaggle/kaggle.json` permissions are `0600` or supply `KAGGLE_USERNAME`/`KAGGLE_KEY` via env vars.
Agent-Ready Command Recipes
Safe Read-Only Queries
kaggle datasets list -s 'sentiment' --file-type csv --sort-by votes -v
Searches datasets matching 'sentiment' and prints comma-separated rows (-v / --csv).
Controlled Writes & Previews
kaggle datasets download -d zynicide/wine-reviews -p ./data --unzip
Downloads and extracts the dataset into ./data.
Strengths for Agents
- +
-v(--csv) produces clean CSV output for dataset search and listing. - + Built-in
--unzipand-p <path>simplify dataset staging.
Caveats & Pitfalls
- ! No native
--jsonflag;listcommands output either fixed tables or CSV (-v). - ! Refuses or warns if
~/.kaggle/kaggle.jsondoes not have0600permissions, and large datasets can fill disk quickly.