Skip to main content

A CLI tool for completing boot.dev lessons

Project description

bdd

bdd is a command line tool for completing Boot.dev lessons in the terminal.

Why? The Boot.dev web interface is great. If you find the videos helpful or enjoy the gamification elements, stick to the web interface. But if you want to hone your skills in the command line and gain familiarity with your editor, give bdd a try.

Interested in contributing? Check out the contribution guidelines.

Prereqs

This tool relies on the Boot.dev CLI to simplify initial authentication. Install the tool and run bootdev login before attempting to use bdd.

Python 3.10 or greater is recommended.

Windows file paths are not supported at this time but could be.

Installation

Note the pypi package name is bddcmd, but the command is bdd. It's 2024, and short names are scarce.

python3 -m pip install bddcmd
bdd --help

Usage

Run bdd init to set up your configuration. You will specify how to run go python (ex: python vs python3), go (ex: go vs go[version]), etc. Note that the editor command should accept a list of files to open. For example, nvim -p (default) for Neovim, code for VS Code, or a /mnt/c/Program Files/ path if you code in the best IDE for programming.

bdd connect will open a websocket connection to receive success/failure messages when submitting lessons. You will likely want this in a visible terminal while working.

bdd get [Boot.dev lesson URL] will retrieve the lesson files and open them with the editor stored in your configuration.

bdd next and bdd prev will move between lessons. bdd get without a URL will get the lesson contents based on your current position. This is useful after changing position and also for resuming work after exiting your editor.

bdd run and bdd submit function similarly to the respective Boot.dev commands.

bdd progress will show your progress in the current course, including lesson completion status.

Development

Virtual environment

Create your virtual environment. I recommend venv which is part of the standard library as of 3.3.

python3 -m venv .venv

and activate it with source .venv/bin/activate.

Install for development with dependencies

python3 -m pip install -e .[dev]

Add a dependency

Add to pyproject.yaml then repeat the pip install command above.

Manual testing

bdd --help

Automated testing

After following the dev installation steps:

pytest

Testing a build

# (in a venv, most likely)
python3 -m build
python3 -m pip install dist/bddcmd-[version].tar.gz

Release

python3 -m pip install --upgrade build
python3 -m build

Add credentials to .pypirc and run:

python3 -m pip install --upgrade twine
python3 -m twine upload --repository testpypi dist/* # testpypi
# python3 -m twine upload dist/* # pypi

Activate a venv and install the package from testpypi to test.

python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps bdd

How boot.dev lessons work

bdd essentially relies on an undocumented, internal set of boot.dev APIs and conventions. Yes, this is gross, and it will definitely break as changes are made to the platform. The "bet" is that the functionality will be worth this inconvenience.

See bdd.md for more information on how boot.dev lessons work and some examples.

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

bddcmd-1.0.1.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

bddcmd-1.0.1-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file bddcmd-1.0.1.tar.gz.

File metadata

  • Download URL: bddcmd-1.0.1.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for bddcmd-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2e7b25c8a23b2816e2213e13dae98fa42d2f02ca608981c7237c4a2242b8bd1f
MD5 02b5754f0593b4c752f868cf06c67f10
BLAKE2b-256 9151fdb7cd44483a858cc650faa92b314c647f8d73c081c7c16345743fe501ce

See more details on using hashes here.

File details

Details for the file bddcmd-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: bddcmd-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for bddcmd-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 871368d9aedcc92184ba13d00bc5d6257e322625271447e5c451ea91ac32952c
MD5 b1835c68d7771435a6ba684d2c45a049
BLAKE2b-256 6241d690c6f5b7118eef5684beba7a591b2dcdc9ff68c693697db73b77ef1c74

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