{"id":51640754,"url":"https://github.com/tamnd/rustbook-cli","last_synced_at":"2026-07-13T19:02:55.504Z","repository":{"id":364748641,"uuid":"1269074954","full_name":"tamnd/rustbook-cli","owner":"tamnd","description":"Fetch pages and links from The Rust Programming Language book (doc.rust-lang.org) as structured records","archived":false,"fork":false,"pushed_at":"2026-06-29T15:00:56.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-29T17:05:17.116Z","etag":null,"topics":["api-client","cli","documentation","golang","json","rust","scraper"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tamnd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-14T09:25:54.000Z","updated_at":"2026-06-29T15:01:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tamnd/rustbook-cli","commit_stats":null,"previous_names":["tamnd/rustbook-cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tamnd/rustbook-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Frustbook-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Frustbook-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Frustbook-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Frustbook-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tamnd","download_url":"https://codeload.github.com/tamnd/rustbook-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Frustbook-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35432821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","cli","documentation","golang","json","rust","scraper"],"created_at":"2026-07-13T19:02:53.706Z","updated_at":"2026-07-13T19:02:55.495Z","avatar_url":"https://github.com/tamnd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rustbook\n\nA command line for rustbook.\n\n`rustbook` is a single pure-Go binary. It reads public rustbook data\nover plain HTTPS, shapes it into clean records, and prints output that pipes\ninto the rest of your tools. No API key, nothing to run alongside it.\n\nThe same package is also a [resource-URI driver](#use-it-as-a-resource-uri-driver),\nso a host program like [ant](https://github.com/tamnd/ant) can address\nrustbook as `rustbook://` URIs.\n\n## Install\n\n```bash\ngo install github.com/tamnd/rustbook-cli/cmd/rustbook@latest\n```\n\nOr grab a prebuilt binary from the [releases](https://github.com/tamnd/rustbook-cli/releases), or run\nthe container image:\n\n```bash\ndocker run --rm ghcr.io/tamnd/rustbook:latest --help\n```\n\n## Usage\n\n```bash\nrustbook page \u003cpath\u003e                      # fetch one page as a record\nrustbook page \u003cpath\u003e -o json              # as JSON, ready for jq\nrustbook page \u003cpath\u003e --template '{{.Body}}'  # just the readable body text\nrustbook links \u003cpath\u003e                     # the pages it links to, one per line\nrustbook --help                           # the whole command tree\n```\n\nEvery command shares one output contract: `-o table|json|jsonl|csv|tsv|url|raw`,\n`--fields` to pick columns, `--template` for a custom line, and `-n` to limit.\nThe default adapts to where output goes (a table on a terminal, JSONL in a\npipe), so the same command reads well by hand and parses cleanly downstream.\n\nThis is a fresh scaffold. It ships one example resource type, `page`, wired end\nto end. Model the real rustbook records in `rustbook/` and declare their\noperations in `rustbook/domain.go`; each one becomes a command, an HTTP\nroute, and an MCP tool at once.\n\n## Serve it\n\nThe same operations are available over HTTP and as an MCP tool set for agents,\nwith no extra code:\n\n```bash\nrustbook serve --addr :7777    # GET /v1/page/\u003cpath\u003e  returns NDJSON\nrustbook mcp                   # speak MCP over stdio\n```\n\n## Use it as a resource-URI driver\n\n`rustbook` registers a `rustbook` domain the way a program registers a\ndatabase driver with `database/sql`. A host enables it with one blank import:\n\n```go\nimport _ \"github.com/tamnd/rustbook-cli/rustbook\"\n```\n\nThen [ant](https://github.com/tamnd/ant) (or any program that links the package)\ndereferences `rustbook://` URIs without knowing anything about rustbook:\n\n```bash\nant get rustbook://page/\u003cpath\u003e   # fetch the record\nant cat rustbook://page/\u003cpath\u003e   # just the body text\nant ls  rustbook://page/\u003cpath\u003e   # the pages it links to, each addressable\nant url rustbook://page/\u003cpath\u003e   # the live https URL\n```\n\n## Development\n\n```\ncmd/rustbook/   thin main: hands cli.NewApp to kit.Run\ncli/                 assembles the kit App from the rustbook domain\nrustbook/                the library: HTTP client, data models, and domain.go (the driver)\ndocs/                tago documentation site\n```\n\n```bash\nmake build      # ./bin/rustbook\nmake test       # go test ./...\nmake vet        # go vet ./...\n```\n\n## Releasing\n\nPush a version tag and GitHub Actions runs GoReleaser, which builds the\narchives, Linux packages, the multi-arch GHCR image, checksums, SBOMs, and a\ncosign signature:\n\n```bash\ngit tag v0.1.0\ngit push --tags\n```\n\nThe Homebrew and Scoop steps self-disable until their tokens exist, so the first\nrelease works with no extra secrets.\n\n## License\n\nApache-2.0. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamnd%2Frustbook-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftamnd%2Frustbook-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamnd%2Frustbook-cli/lists"}