Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KATA-CLI

kata-cli is a minimalist, keyboard-driven terminal dashboard built for developers to track coding practice (katas) using spaced repetition. It is styled using standard terminal theme ANSI colors so it automatically matches your terminal configuration.


Setup & Installation

1. Clone & Navigate

Clone the upstream repository into your local practice folder:

git clone https://github.com/iamharshdabas/kata-cli.git katas
cd katas

2. Install Dependencies

go mod tidy

3. Build & Run

# Run directly
go run ./cmd/kata-cli

# Compile and run
go build -o kata-cli ./cmd/kata-cli
./kata-cli

You can also use just if you have it installed:

# Compile and run via justfile
just build
./kata-cli

Git Remote Setup (Upstream / Standalone Repository)

When you first clone this repository, the remote named origin points to the upstream creator's repository.

Tip

Get Green Squares (GitHub Contributions): Commits to a forked repository on GitHub do not count towards your contribution activity graph (green squares) unless they are merged into the upstream repository's default branch. Since you want to track your daily practice, it is highly recommended to create a standalone repository instead of a fork.

Method 1: Standalone Repository using GitHub CLI (Recommended)

If you have the GitHub CLI (gh) installed, you can create a standalone repository in your account and link it:

  1. Authenticate and set up Git credentials:

    gh auth login
    gh auth setup-git
  2. Create a new standalone repository on GitHub:

    # Create a private or public repository (e.g. named 'katas')
    gh repo create katas --private
  3. Configure your remotes & push:

    # Rename the creator's remote to 'upstream'
    git remote rename origin upstream
    
    # Add your new standalone repository as 'origin'
    git remote add origin https://github.com/YOUR_USERNAME/katas.git
    
    # Push your history and set the tracking branch
    git push -u origin main

Method 2: Automated Forking via GitHub CLI (Alternative)

If you prefer to fork the repository directly and do not mind that your daily practice commits won't count as contributions on your profile:

# Fork the repository and configure remotes automatically
gh repo fork iamharshdabas/kata-cli --clone=false

This command automatically forks the repository to your account, renames the creator's remote to upstream, and configures your personal fork as origin.


Method 3: Standalone Repository via GitHub Website (If not using GitHub CLI)

If you do not have the GitHub CLI installed, you can manually create a repository on the web:

  1. Create a new repository: Go to github.com/new and create a new repository (e.g., katas). Do not initialize it with a README, license, or .gitignore.
  2. Configure your local remotes:
    # Rename the creator's remote to 'upstream'
    git remote rename origin upstream
    
    # Add your personal repository as 'origin' (using HTTPS URL)
    git remote add origin https://github.com/YOUR_USERNAME/YOUR_KATA_REPO.git
    
    # Push your history to your personal repository
    git push -u origin main

Note: If you skip this setup, the CLI will run local commits only and will not push updates online.

Pulling Creator Updates

To pull new features and fixes from the creator without losing your personal spacing database (db.json):

# Fetch updates from the creator
git fetch upstream

# Merge updates into your main branch
git merge upstream/main -m "sync: upstream"

If any code conflicts arise, resolve them, add them, and commit. Your personal logs in db.json will be preserved!


Keyboard Controls

kata-cli is fully keyboard-driven and uses Vim-like bindings for navigation:

Dashboard Screen

  • j / k (or down / up): Scroll catalog list
  • h / l (or left / right): Cycle views (To Be Cooked, Easy, Medium, Hard, The Catalog)
  • /: Filter/search catalog list by ID or title
  • enter: Enter the selected problem detailed actions menu
  • n: Register a new problem ID
  • q: Exit dashboard

Detailed Actions Menu (Selected Problem)

  • o: Open problem link in default browser
  • r: Redo / rate the problem (opens Redo Prompt)
  • d: Evict problem from catalog (opens Delete Confirmation)
  • esc: Go back to main dashboard

Redo Prompt

  • c: Cooked (Saves successful review, scheduling the next interval)
  • f: Fumbled (Saves unsuccessful review, scheduling it for tomorrow)
  • esc: Cancel review and return to detailed actions menu

Delete Confirmation

  • y / enter: Confirm eviction and trigger git sync
  • n / esc: Cancel and return to detailed actions menu

Core Features

  • Spaced Repetition Tracking: Optimizes your practice schedule using the SM-2 algorithm, calculating next review dates and ease factors based on whether you "cooked" or "fumbled" a problem.
  • Automatic LeetCode Fetching: Instantly pulls and caches problem metadata (title and difficulty) using only the LeetCode ID.
  • Automatic Git Integration: Automatically commits and pushes database (db.json) changes to keep your practice history synced with GitHub (green squares tracker).

About

A minimalist, keyboard-driven terminal dashboard built for developers to track leetcode questions using spaced repetition.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages