Repository navigation
Add Homebrew formula for dcode (deepagents-code) - #1
Merged
Merged
Conversation
dcode is LangChain's terminal AI coding agent, published to PyPI as deepagents-code. Pin the full langchain/langgraph dependency closure as resource blocks so brew install works offline and reproducibly.
The sdist requires compiling a WASM guest module against a proprietary WASI SDK tarball fetched from GitHub at build time, which isn't something a Homebrew resource build should attempt. Upstream already ships a portable py3-none-any wheel with the WASM blob embedded, invoked through the wasmtime dependency at runtime.
wasmtime's sdist build script downloads a prebuilt C-API tarball from GitHub releases at build time rather than compiling from source, which defeats the point of pinning a resource. Use the platform-specific wheels PyPI already publishes instead.
Pillow (a transitive dependency via the media extra) requires jpeg and zlib headers to build from source, plus freetype for font rendering support; mirror the same set the aider-chat formula uses.
Drops the full-URL workaround now that the tap lives in a homebrew-<name>-prefixed repo, enabling the short `brew tap` form.
Removes the rust/jpeg-turbo/freetype build dependencies by pinning each resource to its prebuilt wheel (per-platform where a package ships native extensions) instead of building from source, matching how pip/uv normally install these packages. Pins cryptography to 48.0.1 since 49.0.0 dropped macOS Intel wheels. forbiddenfruit has no published wheel but is pure Python, so it still builds instantly with no extra dependency. Validated end-to-end: a fresh Python 3.12 venv installing all 132 pinned resources plus the main wheel passes `pip check` clean and `dcode --version` runs correctly.
Runs `brew install --build-from-source` + `brew test` on all four platform combinations the formula's resource blocks target: macOS arm64/Intel and Linux arm64/x64.
Avoids the Intel macOS "larger runner" tier for this check; the arm64 macOS runner plus both Linux architectures still cover the formula's non-macOS-Intel resource branches.
The workflow needs to live on main to be picked up properly (e.g. workflow_dispatch only appears once a workflow exists on the default branch), which isn't merged yet. Moving it to its own branch/PR.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Formula/dcode.rb, a Homebrew formula fordcode(LangChain's Deep Agents Code terminal coding agent, published to PyPI asdeepagents-code)langchain/langgraphdependency closure asresourceblocks sobrew install dcodeworks offline and reproduciblyon_macos/on_linux×on_arm/on_intel), so the only build dependency ispython@3.12— no Rust toolchain or C libraries neededcryptographyis pinned to48.0.1(not the latest49.0.0, which dropped macOS Intel wheels) while still satisfying every version constraint in the closureREADME.mdwith install instructions (brew tap pokryfka/dcode/brew install dcode) and formula maintenance notesTest plan
ruby -c Formula/dcode.rb— syntax check passespip install --no-deps:pip checkreports no broken requirements,dcode --versionruns correctlybrew install --build-from-source ./Formula/dcode.rb && brew test dcodeon a real Homebrew install (macOS/Linux)Generated by Claude Code