{"id":48089105,"url":"https://github.com/fuwn/anilist-cli","last_synced_at":"2026-04-08T19:00:28.940Z","repository":{"id":348649640,"uuid":"1199161162","full_name":"Fuwn/anilist-cli","owner":"Fuwn","description":"🍡 Command-line client for the AniList GraphQL API","archived":false,"fork":false,"pushed_at":"2026-04-02T05:35:55.000Z","size":110,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-04T16:19:10.368Z","etag":null,"topics":["anilist","anime","api","api-client","cli","client","graphql","light-novel","light-novels","manga","ocaml"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fuwn.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-04-02T05:15:52.000Z","updated_at":"2026-04-02T18:07:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Fuwn/anilist-cli","commit_stats":null,"previous_names":["fuwn/anilist-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Fuwn/anilist-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fuwn%2Fanilist-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fuwn%2Fanilist-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fuwn%2Fanilist-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fuwn%2Fanilist-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fuwn","download_url":"https://codeload.github.com/Fuwn/anilist-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fuwn%2Fanilist-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31441057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T15:22:31.103Z","status":"ssl_error","status_checked_at":"2026-04-05T15:22:00.205Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["anilist","anime","api","api-client","cli","client","graphql","light-novel","light-novels","manga","ocaml"],"created_at":"2026-04-04T15:27:21.441Z","updated_at":"2026-04-05T16:00:33.433Z","avatar_url":"https://github.com/Fuwn.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍡 `anilist`\n\n\u003e Command-line client for the AniList GraphQL API\n\n`anilist` is an OCaml command-line client for the AniList GraphQL API. It lowers concise CLI arguments into GraphQL operations and prints JSON responses.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/screenshot.png\" alt=\"Screenshot\"\u003e\n\u003c/p\u003e\n\n## Features\n\n- Ergonomic lowering for common AniList queries\n- Tree-shaped selection support with `--field` and `--selection-set`\n- Variables, fragments, inline fragments, and multi-operation documents\n- Schema introspection via `schema`, `schema --type`, and `schema --directive`\n- Custom HTTP headers with repeated `--header`\n- Docker runner for use without a local OCaml toolchain\n\n## Build\n\n```bash\ndune build\n```\n\n## Install\n\nInstall the executable into your local opam prefix:\n\n```bash\ndune install --release\n```\n\nThen run:\n\n```bash\nanilist media --id 1 --selection-set id,title.romaji,format,status\n```\n\n## Docker\n\nBuild the image:\n\n```bash\ndocker build -t fuwn/anilist .\n```\n\nRun a query:\n\n```bash\ndocker run --rm fuwn/anilist media --id 1 --selection-set id,title.romaji,format,status\n```\n\n## Shell Script Savings\n\nIn a shell script, the usual GraphQL flow means carrying an endpoint, a JSON payload, and a quoted query string:\n\n```bash\nendpoint='https://graphql.anilist.co'\n\ncurl \\\n  --silent \\\n  --header 'Content-Type: application/json' \\\n  --data '{\"query\":\"query { Media(id: 1) { id title { romaji } format status } }\"}' \\\n  \"$endpoint\"\n```\n\nWith `anilist`, the same request becomes the command itself:\n\n```bash\nanilist media --id 1 --selection-set id,title.romaji,format,status\n```\n\nThat removes the JSON wrapper, the embedded GraphQL string, and most of the shell quoting friction while keeping the JSON response unchanged.\n\n## Usage\n\nGet an anime:\n\n```bash\nanilist media --id 1 --selection-set id,title.romaji,format,status\n```\n\nInspect the schema:\n\n```bash\nanilist schema\nanilist schema --type Media\nanilist schema --directive include\n```\n\nSend an authorization header:\n\n```bash\nanilist --header 'Authorization: Bearer \u003ctoken\u003e' media --id 1 --selection-set id,title.romaji\n```\n\nUse variables explicitly:\n\n```bash\nanilist query \\\n  --variable-definition '$media_id: Int!' \\\n  --variable 'media_id=1' \\\n  --field media \\\n  --id var:media_id \\\n  --selection-set id,title.romaji,format,status\n```\n\nThe endpoint defaults to `https://graphql.anilist.co`. Override it with `ANILIST_GRAPHQL_ENDPOINT`:\n\n```bash\nANILIST_GRAPHQL_ENDPOINT='https://graphql.anilist.co' anilist media --id 1 --selection-set id,title.romaji\n```\n\n## License\n\nLicensed under the GNU Affero General Public License v3.0 only. See [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuwn%2Fanilist-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuwn%2Fanilist-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuwn%2Fanilist-cli/lists"}