This repository is used to develop & test CodeCrafters challenges.
- Make sure that you have Docker installed.
- For now, you'll need to compile the SDK from source using Bun.
- Make sure you have Bun installed.
- Clone this repository and run
bun install && make install - (In the future, we'll publish pre-compiled binaries for the SDK)
lstatis not present in MacOS, create a symlink tostatin usr/local/binsudo ln -s /usr/bin/stat /usr/local/bin/lstat
- Test it with
course-sdk --version.
We'll use [build-your-own-git](https://github.com/codecrafters-io/build-your-own-git) as an example here.
Clone the course repository and cd into it:
git clone https://github.com/codecrafters-io/build-your-own-git.git
cd build-your-own-gitRun this command to compile and test Go solutions:
course-sdk test go # test all stages for Go
course-sdk test go stage_slug_1,stage_slug_2 # test only specific stagesIf you want to just compile the starter code & solutions, and not run tests:
course-sdk compile # compiles all languages
course-sdk compile go # compiles only GoTo add support for a new language (TODO, not working yet):
course-sdk add-language <language>course-sdk add-language and course-sdk upgrade-language pull template files
from language-templates, cloning it to a cache and resetting to origin/main on every run.
Set COURSE_SDK_LANGUAGE_TEMPLATES_REPO to read from a local checkout instead:
COURSE_SDK_LANGUAGE_TEMPLATES_REPO=../language-templates course-sdk upgrade-language goUse it when developing templates, or to pick up a templates change that has not been merged yet.