Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Kaggle CLI

$ kaggle Official Med Risk
Kaggle (Google) · AI & Media · Apache-2.0 · macos / linux / windows

The 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.

FCRS-1.0 Score
80 /100
Good
Medium Confidence
Zero-Friction Install
pip install kaggle
CLI vs MCP Decision CLI Only

Direct shell CLI for dataset discovery (-v CSV) and downloading archives to local workspace disks.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 18 / 25

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/--csv on list; lacks --json output
Trust & Safety 20 / 25

Enforces chmod 600 on ~/.kaggle/kaggle.json; competitions submit and datasets create mutate public/competition state.

  • Requires 0600 permission on ~/.kaggle/kaggle.json; downloads can be very large
Setup & Portability 13 / 15

Easy pip / uvx install across OSes, though requires creating a Kaggle API token first.

  • Distributed on PyPI (kaggle) and usable via uvx
Utility & Efficiency 13 / 15

Canonical CLI for pulling Kaggle datasets and competition bundles in ML scripts.

  • One-command dataset discovery, download, and --unzip
Maintenance & Lineage 8 / 10

Official Kaggle/kaggle-cli repository under Apache-2.0.

  • Official Kaggle/kaggle-cli repository
Docs & Verifiability 8 / 10

Clear official API/CLI docs at kaggle.com/docs/api.

  • Official docs at kaggle.com/docs/api

Security, Auth & Guardrails

Auth Modes
Env API Key Config File
Credential Storage

Reads KAGGLE_USERNAME + KAGGLE_KEY env vars or ~/.kaggle/kaggle.json (requires chmod 600 on Unix).

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

Free, Apache-2.0 open-source Python CLI; requires a free Kaggle account API token.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Search Kaggle datasets and output parseable CSV
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

Download a specific dataset archive to a target directory
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 --unzip and -p <path> simplify dataset staging.

Caveats & Pitfalls

  • ! No native --json flag; list commands output either fixed tables or CSV (-v).
  • ! Refuses or warns if ~/.kaggle/kaggle.json does not have 0600 permissions, and large datasets can fill disk quickly.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI