Use root README on crates.io and npm pages#195
Merged
Conversation
clickhousectl had no README and was thus rendering with just the description on crates.io / npm. Repoint both at the repo root README so they show the actual CLI docs. - crates/clickhousectl/Cargo.toml: `readme = "../../README.md"`. Cargo copies the file into the published tarball as README.md (verified via `cargo package --list` and `cargo publish --dry-run`). - npm/package.json: `prepack` script copies ../README.md before npm packs the tarball. npm doesn't follow symlinks pointing outside the package directory, and `"files"` doesn't accept `..` paths, so a prepack hook is the simplest mechanism. The copied file is gitignored so the source of truth stays at the repo root. - Drop the wrapper-specific npm/README.md.
iskakaushik
approved these changes
May 18, 2026
clickhousectl@0.2.0 was published to crates.io without a README (and without the npm publish working at all due to OIDC issues now fixed in #193). Bump to 0.2.1 so the README-fixed release in this PR can ship clean. The old 0.2.0 will be yanked once 0.2.1 lands. Bumps: - crates/clickhousectl: 0.2.0 -> 0.2.1 - crates/clickhouse-cloud-api: 0.2.0 -> 0.2.1 (kept in lockstep) - clickhousectl's dep on cloud-api: 0.2.0 -> 0.2.1 - npm/package.json: 0.2.0 -> 0.2.1 - Cargo.lock regenerated
iskakaushik
approved these changes
May 18, 2026
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.
clickhousectl had no README at all, so its crates.io page renders with just the description. Same for the npm wrapper. Point both at the repo root README instead — single source of truth.
Approach
crates/clickhousectl/Cargo.tomlgetsreadme = "../../README.md". Cargo copies the file into the published tarball asREADME.md. Verified withcargo package --list -p clickhousectl(README.md appears) andcargo publish --dry-run -p clickhousectl(clean run, 38 files, 152.7 KiB compressed).npm/package.jsongets aprepackscript that runscp ../README.md README.mdbefore pack. npm doesn't follow symlinks pointing outside the package dir and won't accept..infiles, so prepack is the simplest mechanism. Verified withnpm pack --dry-run(README.md included, 31.7 KB). The copied file is gitignored so the source of truth stays at the repo root.npm/README.mdis deleted.Test plan
cargo package --list -p clickhousectlincludes README.mdcargo publish --dry-run -p clickhousectlsucceedsnpm pack --dry-runinnpm/includes README.md (31.7 KB)Next steps after merging
To make 0.2.0 the README-included version (per the discussion):
clickhousectlcrate on crates.io (Settings → Delete; <72h window, 0 downloads, eligible).v0.2.0GH release + tag.v0.2.0. Workflow republishes everything cleanly.🤖 Generated with Claude Code