This repo documents the HTTP API surface of the @anthropic-ai/claude-code
release by extracting stable string literals from the published npm
package. It is release documentation and compatibility tracking, not a runtime
tool. Every documented fact must trace back to a literal in a specific
published version.
git clone https://github.com/thevibeworks/claude-code-http-spec.git
cd claude-code-http-spec
# Pull a release, extract, compare to previous, validate the gates.
scripts/fetch-release.sh latest
scripts/extract-binary.sh <version>
scripts/compare-release.sh <previous> <version>
scripts/validate-extraction.sh <version>scripts/validate-extraction.sh is the gate. It must exit 0 before any
extraction is published.
- Literals only. Document URL paths, beta flags, header names, env-var names, and published model IDs that appear as literal strings in the release. Do not infer endpoints from runtime logs, and do not document obfuscated minifier names (they change every build).
- Pin
LC_ALL=Cfor bothsortandcomm. An ambient UTF-8 locale makescommfabricate phantom diffs even when both inputs are byte-sorted. This is the single most common mistake; the scripts pin it for you. - Never commit the binary or unpacked package. They are large and
redistributable artifacts. Record name, version, sha512 integrity, the
unpacked file list, and the binary size in a manifest instead.
.gitignoreis configured to keep them out. - Hold unreleased model codenames. If extraction surfaces a model codename
that is not on the public allowlist in
scripts/validate-extraction.sh, the validator fails loudly. Do not publish it. Record what was held inFLAGGED.mdand redact it from any curated artifact. See that file for the current policy. - No secrets, ever. The validator scans for API keys, bearer tokens, refresh tokens, home-directory paths, and private-key headers. If it flags something, the extraction does not ship.
scripts/fetch-release.sh <version>— writes a manifest underextractions/v<version>/MANIFEST.txt(metadata + hashes only).scripts/extract-binary.sh <version>— writesraw/paths.txtandraw/beta_flags.txt, byte-sorted and unique.scripts/compare-release.sh <previous> <version>— writes the added/removed deltas intoSUMMARY.md.scripts/validate-extraction.sh <version>— must exit 0.- Update
specs/*.httpandREADME.mdso the documented version matches.
- Shell scripts are POSIX
shwhere practical,set -eu, one job each. - Keep raw lists machine-diffable: one literal per line,
LC_ALL=C sort -u. - Match the existing layout under
extractions/v<version>/.
Open an issue with:
- The release version in question (
claude --version, or the npm version). - The literal or endpoint that looks wrong, and the file path where it lives.
- The
rg/stringspattern that does or does not reproduce it.