Skip to main content
python-ecd logo

✨ A Python CLI tool for managing Everybody Codes puzzles ✨

Code Quality Coverage PyPI Latest Release PyPI Downloads Python License


💛 Acknowledgements

This tool relies on the Everybody Codes Data library. Shout out to @wimglenn!

📋 Features

  • Initialize workspace for Everybody Codes puzzles
  • Keep event and story solutions in separate directory trees
  • Download puzzle inputs automatically
  • Configure authentication without exposing session tokens in shell history
  • Run solutions with both test and real input data
  • Submit solutions and check if they are correct
  • Track accepted puzzle parts in the workspace

📦 Installation

The package can be installed using uv, which is recommended for better dependency management and faster installations:

# Install it as a system tool
uv tool install python-ecd

# Otherwise use:
uvx python-ecd

The tool requires Python 3.13 or newer and is available as both python-ecd and ecd.

💻 Usage

Initialize a Workspace

Create a new workspace for your puzzles solutions:

It can be done in the current directory:

ecd init

Or in a specified path:

ecd init everybody-codes-solutions

If the directory does not exist, it will be created. Initialization adds an .ecd.toml file that identifies the workspace and stores accepted puzzle parts. The events/ and stories/ directories are created later, when ecd pull needs them.

To migrate a workspace created with an earlier version, run this command from its root:

ecd init

Migration only creates .ecd.toml; existing workspace files are preserved. Other commands will show this instruction until the workspace is migrated.

Options:

  • --force, -f: Overwrite existing files
  • --no-git: Do not initialize a Git repository (useful inside an existing repository or development pourposes)

Set Session Token

Copy the session token from the Session Cookie section of your Everybody Codes profile, then store it using an interactive hidden prompt:

ecd token set

The token is stored at ~/.config/ecd/token, with access restricted to the current user on POSIX systems. For temporary use or CI, set the ECD_TOKEN environment variable instead; it takes precedence over the file.

Inspect or validate the active authentication without revealing the token:

ecd token status  # Local source and file permissions
ecd token check   # Remote validation against Everybody Codes
ecd token remove  # Remove the stored file after confirmation

Download Puzzle Input

Download the input for all available parts. Select exactly one event or story:

ecd pull <QUEST_NUMBER> --year <EVENT_YEAR>
ecd pull <QUEST_NUMBER> --story <STORY_NUMBER>

Options:

  • --year, -y: Event year
  • --story, -s: Story number
  • --force, -f: Overwrite existing files

Exactly one of --year or --story is required. Event quests are stored under events/<year>/quest_<id>/; story quests use stories/<story>/quest_<id>/. This command creates the necessary directories and files if they do not exist.

Test Solutions

Run your solution using test data:

ecd test <QUEST_NUMBER> --year <EVENT_YEAR> [OPTIONS]
# or: ecd test <QUEST_NUMBER> --story <STORY_NUMBER> [OPTIONS]

Options:

  • --year, -y: Event year (mutually exclusive with --story)
  • --story, -s: Story number (mutually exclusive with --year)
  • --part, -p: Part number to test (default: 1)

Run Solutions

Execute your solution for a specific puzzle:

ecd run <QUEST_NUMBER> --year <EVENT_YEAR> [OPTIONS]
# or: ecd run <QUEST_NUMBER> --story <STORY_NUMBER> [OPTIONS]

Options:

  • --year, -y: Event year (mutually exclusive with --story)
  • --story, -s: Story number (mutually exclusive with --year)
  • --part, -p: Part number to execute (default: 1)

Submit Solutions

Submit your solution for a specific puzzle:

ecd push <QUEST_NUMBER> --year <EVENT_YEAR> [OPTIONS]
# or: ecd push <QUEST_NUMBER> --story <STORY_NUMBER> [OPTIONS]

Options:

  • --year, -y: Event year (mutually exclusive with --story)
  • --story, -s: Story number (mutually exclusive with --year)
  • --part, -p: Part number to submit (default: 1)

When the answer is correct, the accepted part is recorded in .ecd.toml and the next available part (if any) is pulled automatically.

Show Progress

Display the accepted quests and parts recorded in the current workspace:

ecd progress
ecd progress sync  # Synchronize local quests with Everybody Codes

Only successful submissions made after .ecd.toml was created are included. Use ecd progress sync to retrieve earlier progress for quests already present in the workspace. Progress totals cover the complete challenge (20 quests for an event and 3 for a story), regardless of how many quest directories exist locally. Accepted answers are never displayed or stored locally.

Display Version

Show the current version of the tool:

ecd --version

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development

Install the locked environment and Git hooks, then run the same checks as CI:

make install
make format
make lint
make test

make format fixes lint issues where possible and formats the code.

Contributions target develop. Releases are prepared automatically from Conventional Commits after develop is merged into main; publishing uses a protected pypi environment and PyPI Trusted Publishing.

©️ License

This project is licensed under the terms of the MIT license.

Metadata

Release files for python-ecd 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-ecd 0.3.0
File Size Uploaded Provenance
python_ecd-0.3.0.tar.gz 13.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for python-ecd 0.3.0
File Interpreter ABI Platform
python_ecd-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.3 kB

Release files / python_ecd-0.3.0.tar.gz

Download URL python_ecd-0.3.0.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8fa889d60e11ff9d992240d3e391224599a3d0ee606ac2d3e7fae994bbab1b38
BLAKE2b-256 checksum
How to use checksums
cbcd4622608670f42cf2ca1d60f782f48233eb91f3f94c116fc94aaadd50d51c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / python_ecd-0.3.0-py3-none-any.whl

Download URL python_ecd-0.3.0-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7e0d6c58224395e8836e4f13a7405bc318d240fad7fb6caa36b69c4cbf6d237
BLAKE2b-256 checksum
How to use checksums
0dcd244fa63d12f95e497890b232a53d584ae37fa66081e30405a323d7c638fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for python-ecd 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page