Browse OSChina open-source news (开源中国)
oschina is a single pure-Go binary. It reads OSChina (开源中国) — China's
largest open-source community — through the public XML API, shapes the
responses into clean records, and pipes into the rest of your tools.
No API key, nothing to run alongside it.
go install github.com/tamnd/oschina-cli/cmd/oschina@latestOr grab a prebuilt binary from the releases, or run the container image:
docker run --rm ghcr.io/tamnd/oschina:latest --help# latest open-source news
oschina news
# most popular / hot news
oschina news --type top
# page 2, 10 items
oschina news --page 2 --page-size 10
# JSON output
oschina news -o json
# URLs only
oschina news -o url
oschina versioncmd/oschina/ thin main, wires cli.Root into fang
cli/ the cobra command tree
oschina/ the library: HTTP client and data models
pkg/render/ reflection-based multi-format renderer
docs/ tago documentation site
make build # ./bin/oschina
make test # go test ./...
make vet # go vet ./...Push a version tag and GitHub Actions runs GoReleaser, which builds the archives, Linux packages, the multi-arch GHCR image, checksums, SBOMs, and a cosign signature:
git tag v0.1.0
git push --tagsThe Homebrew and Scoop steps self-disable until their tokens exist, so the first release works with no extra secrets.
Apache-2.0. See LICENSE.