This repository is used to generate stage solutions and hints for CodeCrafters challenges.
bun installStageGen does not currently fetch challenges. You need to place your challenge files under challenges/<slug>.
What you need for each challenge:
stage_descriptions/compiled_starters/solutions/
Nothing else is required. Do not copy the challenge’s .git folder.
For example, to copy the build-your-own-redis challenge (assuming you have the local repo):
# from your StageGen repo root
mkdir -p challenges/build-your-own-redis
# copy only the three folders from your source challenge repo
cp -R /path/to/source/build-your-own-redis/stage_descriptions challenges/build-your-own-redis/
cp -R /path/to/source/build-your-own-redis/compiled_starters challenges/build-your-own-redis/
cp -R /path/to/source/build-your-own-redis/solutions challenges/build-your-own-redis/
# make sure you did not bring over a .git folder
rm -rf challenges/build-your-own-redis/.git
OPENAI_API_KEYrequiredDRY_RUN=1to skip writing files
Generate for all languages found under solutions/*:
bun run src/index.ts \
--challenge-slug build-your-own-redis \
--stage-id 02-rg2Target a specific set of languages:
bun run src/index.ts \
--project-root . \
--challenge-slug build-your-own-redis \
--stage-id 02-rg2 \
--targets javascript,python,goDry run without writing files:
DRY_RUN=1 bun run src/index.ts \
--project-root . \
--challenge-slug build-your-own-redis \
--stage-id 02-rg2--project-root <path> default: cwd
--challenge-slug <slug> if omitted, derived from folder name
--stage-id <id> example: 02-rg2
--stage-kind <base|localized> default: base
--targets <csv> example: javascript,go,python
--refs <csv> default: python,rust,go
--model <name> default: gpt-5
--lang-concurrency <n> default: 4
--task-concurrency <n> default: 2