Skip to main content

Kaggle competition bootstrapper TUI - get right into the data

Project description

kag - fresh Kaggle competition workspaces from your terminal

kag is a Textual TUI inspired by try, built for Kaggle workflows.

It helps you go from "I want to work on this competition" to a ready folder with data, notebook, notes, and editor open.

Demo

Asciinema walkthrough placeholder: docs/demo-placeholder.md

Planned recording file path: docs/demo.cast

What kag does

  • Shows a searchable competition picker with sections:
    • Your notebooks (local projects in KAG_PATH)
    • Joined competitions
    • All competitions
  • Uses paginated loading for competitions (20 per page) and auto-loads more when you reach the end.
  • Scaffolds a project folder:
    • data/ (download + extract)
    • <competition>.ipynb
    • notes.md
    • .venv (optional)
    • git init (optional)
  • Checks competition access before download and opens browser tabs for overview + rules when acceptance is needed.
  • Enriches notes.md from Kaggle competition content (Overview, Evaluation, Data, Code, Rules).

Installation

Prerequisites

  • Python 3.11+
  • Kaggle CLI installed and authenticated
    • Preferred: KAGGLE_API_TOKEN
    • Also supported: KAGGLE_USERNAME + KAGGLE_KEY
    • Legacy fallback: ~/.kaggle/kaggle.json

Recommended: uv

uv tool install kag

Alternative: pipx

pipx install kag

Fallback: pip

python -m pip install kag

Validate your install:

kag --doctor

For development:

uv sync

Quick start

kag                  # open TUI
kag titanic          # open TUI with initial search query
kag --doctor         # environment checks
kag --version        # show installed version

Shell integration (for automatic cd)

Add this to your shell config:

# zsh/bash
eval "$(kag --init)"

Without shell integration, kag still works, but your current shell will not auto-cd into the selected project directory.

Usage

kag                  # open TUI
kag titanic          # open TUI with initial search query
kag --doctor         # environment checks
kag --doctor --json  # machine-readable checks
kag --version        # show installed version

How it works

  1. Open picker (kag)
  2. Search and select competition or local project
  3. If needed, choose download and editor
  4. kag verifies competition access before download
  5. Project is scaffolded and opened
  6. If --init hook is installed, your shell cds into the project

Search behavior

Search is currently case-insensitive substring filtering over competition slug/title and local project names.

Configuration

KAG_PATH controls where projects are created (default: ~/Kaggle):

export KAG_PATH=~/Kaggle

Optional ~/.kag_config.toml:

kag_path = "/Users/you/Kaggle"
default_editor = "code"
auto_venv = true
auto_git = true

Troubleshooting

Run:

kag --doctor

It checks:

  • kag on PATH
  • kaggle CLI + auth status
  • API probe (kaggle competitions list --page-size 1)
  • shell hook presence
  • writable directories
  • detected editors

Current limitations

  • Competition join/terms acceptance is browser-assisted (not a direct Kaggle CLI command).
  • Notes extraction depends on Kaggle page APIs/content shape and may vary by competition.
  • Search is substring-based (not fuzzy-ranked yet).

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kag-0.1.0.tar.gz (31.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kag-0.1.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file kag-0.1.0.tar.gz.

File metadata

  • Download URL: kag-0.1.0.tar.gz
  • Upload date:
  • Size: 31.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kag-0.1.0.tar.gz
Algorithm Hash digest
SHA256 496e0e4b219044443ee1b23289f02f5eb9a4d6693d060234fbc13aa81c25885c
MD5 e12493884337730cb13296c82de13c30
BLAKE2b-256 0faa92a1bcc27c7bfe2b7db31b5d226f45dcc86f76f717bb32e225cdb4c3b65f

See more details on using hashes here.

File details

Details for the file kag-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kag-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kag-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1860a62932410e90c91ba4dd0e8c11551ec3904365b7ab02f6e346b5047ddefa
MD5 962beee631b697656307e7e6425e55c2
BLAKE2b-256 37e3855b03d790b3bf52854ac6d2e52fbfc7903190927bac420e8e79b5f77e45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page