{"id":13478255,"url":"https://github.com/aschey/vercel-tokei","last_synced_at":"2026-01-23T07:49:51.793Z","repository":{"id":43519959,"uuid":"511377890","full_name":"aschey/vercel-tokei","owner":"aschey","description":"Tokei badge service running as a Vercel serverless function","archived":false,"fork":false,"pushed_at":"2026-01-10T11:55:59.000Z","size":887,"stargazers_count":15,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T03:43:16.163Z","etag":null,"topics":["badges","serverless","shields","tokei","vercel","vercel-serverless"],"latest_commit_sha":null,"homepage":"https://aschey.tech/tokei","language":"Rust","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/aschey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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":"2022-07-07T04:09:12.000Z","updated_at":"2026-01-03T17:07:17.000Z","dependencies_parsed_at":"2024-01-16T06:18:56.133Z","dependency_job_id":"40eb8553-e3e5-4e0d-b0a8-5be14dbd24a0","html_url":"https://github.com/aschey/vercel-tokei","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aschey/vercel-tokei","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschey%2Fvercel-tokei","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschey%2Fvercel-tokei/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschey%2Fvercel-tokei/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschey%2Fvercel-tokei/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aschey","download_url":"https://codeload.github.com/aschey/vercel-tokei/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschey%2Fvercel-tokei/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28683997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: 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":["badges","serverless","shields","tokei","vercel","vercel-serverless"],"created_at":"2024-07-31T16:01:54.686Z","updated_at":"2026-01-23T07:49:51.786Z","avatar_url":"https://github.com/aschey.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Tokei Serverless API\n\n![license](https://img.shields.io/badge/License-MIT%20or%20Apache%202-green.svg)\n[![CI](https://github.com/aschey/vercel-tokei/actions/workflows/build.yml/badge.svg)](https://github.com/aschey/vercel-tokei/actions/workflows/build.yml)\n![GitHub repo size](https://img.shields.io/github/repo-size/aschey/vercel-tokei)\n\nThis is a fork of the\n[Tokei badge service](https://github.com/XAMPPRocky/tokei_rs) that runs as a\nVercel serverless function, utilizing Vercel's\n[edge caching](https://vercel.com/docs/concepts/functions/serverless-functions/edge-caching#)\nfor fast responses. You can use the service hosted at\n[https://aschey.tech/tokei](https://aschey.tech/tokei) or you can fork this repo\nand host it on your personal Vercel account.\n\n## Motivation\n\nHosting Tokei on a traditional server has the inherent issue of filling up disk\nspace because Tokei works by cloning repositories. This can cause the service to\ngo down if the disk space on the server fills up. Running on a serverless\nplatform mitigates this issue because the container that runs the service is\nephemeral. If someone requests a repository that crashes the service, it should\nstill work fine for other users because it will just spin up a separate\ncontainer.\n\n## Examples\n\n**Default (total lines):**\n![Total Lines](https://aschey.tech/tokei/github/aschey/vercel-tokei)\n\n**Lines of Code:**\n![Lines of Code](https://aschey.tech/tokei/github/aschey/vercel-tokei?category=code)\n\n**Blanks:**\n![Blanks](https://aschey.tech/tokei/github/aschey/vercel-tokei?category=blanks)\n\n**Comments:**\n![Comments](https://aschey.tech/tokei/github/aschey/vercel-tokei?category=comments)\n\n**Files:**\n![Files](https://aschey.tech/tokei/github/aschey/vercel-tokei?category=files)\n\n**Plastic**:\n![Flat](https://aschey.tech/tokei/github/aschey/vercel-tokei?style=plastic)\n\n**Flat Square**:\n![Flat](https://aschey.tech/tokei/github/aschey/vercel-tokei?style=flat-square)\n\n**Social**:\n![Flat](https://aschey.tech/tokei/github/aschey/vercel-tokei?style=social)\n\n**For the Badge**:\n![Flat](https://aschey.tech/tokei/github/aschey/vercel-tokei?style=for-the-badge)\n\n**Styled:**\n![Styled](https://aschey.tech/tokei/github/aschey/vercel-tokei?labelColor=badbe6\u0026color=32a852\u0026style=for-the-badge\u0026label=Lines\u0026logo=https://simpleicons.org/icons/rust.svg)\n\n**Logo Only:**\n![Logo Only](https://aschey.tech/tokei/github/aschey/vercel-tokei?color=157c8c\u0026style=for-the-badge\u0026logo=https://simpleicons.org/icons/rust.svg\u0026label=)\n\n**Logo as Label:**\n![Logo as Label](https://aschey.tech/tokei/github/aschey/vercel-tokei?color=9b73eb\u0026style=for-the-badge\u0026logo=https://simpleicons.org/icons/rust.svg\u0026label=\u0026logoAsLabel=true\u0026labelColor=dbd3ed)\n\n## URL Scheme\n\n```sh\nhttps://aschey.tech/tokei/\u003cdomain\u003e[.com]/\u003cnamespace\u003e/\u003crepository\u003e[?category=\u003ccategory\u003e\u0026format=\u003cformat\u003e\u0026style=\u003cstyle\u003e\u0026labelColor=\u003clabelColor\u003e\u0026color=\u003ccolor\u003e\u0026label=\u003clabel\u003e\u0026logo=\u003clogo\u003e\u0026logoAsLabel=\u003clogoAsLabel\u003e\u0026cacheSeconds=\u003ccacheSeconds\u003e\u0026branch=\u003cbranch\u003e\u0026languages=\u003clanguages\u003e]\n```\n\nAll querystring parameters are optional.\n\n### Standard Options used by [shields.io](https://shields.io/)\n\n- **style**: SVG badge style\n\n  - **valid options**: `flat`, `flat-square`, `plastic`, `social`, or\n    `for-the-badge`\n  - **default**: `flat`\n\n- **label**: Override the default label text. Pass in an empty value (`label=`)\n  to disable.\n\n  - **default**: Defaults to the label that matches the category\n\n- **labelColor**: Background color of the label on the left side\n\n  - **valid options**: `brightgreen`, `green`, `yellow`, `yellowgreen`,\n    `orange`, `red`, `blue`, `grey`, `lightgrey`, or any valid CSS color. Note\n    that CSS color strings like `hsl(195, 100%, 50%)` must be properly url\n    encoded. You can omit the leading `#` from hex colors.\n  - **default**: `grey`\n\n- **color**: Background color of the metric on the right side\n\n  - **valid options**: same as above\n  - **default**: `blue`\n\n- **logo**: Logo that will appear before the label.\n\n  - **valid options**: Value can be supplied in either of the following formats:\n\n    - HTTP URL to a hosted svg icon. **Example:**\n      `logo=https://www.svgrepo.com/show/513821/code.svg`.\n    - Data URL containing a base64-encoded SVG.\n      - **Note:** make sure you use URL-safe base64 encoding (`+` characters\n        need to be encoded as `%2B`). Many tools do not default to this.\n      - **Example:** `logo=data:image/svg%2Bxml;base64,PHN2ZyB4bWxucz0iaH...`.\n\n  - **default**: None\n\n- **cacheSeconds**: How long to cache the response for. We use Vercel's\n  [`stale-while-revalidate`](https://vercel.com/docs/concepts/functions/serverless-functions/edge-caching#stale-while-revalidate)\n  option to maximize cache efficiency\n\n  - **valid options**: Any number \u003e= 60\n  - **default**: `60`\n\n### Custom Options\n\n- **category**: Which metric is displayed\n\n  - **valid options**: `lines`, `code`, `blanks`, `comments`, `files`\n  - **default**: `lines`\n\n- **format**: Output format\n\n  - **valid options**: `svg` or `json`\n  - **default**: `svg`\n\n- **logoAsLabel**: This setting only applies when a logo is supplied and the\n  label is empty. If this setting is true, then the logo will use the label\n  background color. If it is false, it will use the message background color.\n\n  - **valid options**: `1` or `true` will be parsed as a truthy value.\n    Everything else will be considered `false`.\n\n- **branch**: Use a specific git branch\n\n- **language**: Count only the specified languages. Multiple languages can be\n  specified using commas. Note that languages are case-sensitive and should be\n  capitalized. ex: `language=Rust,JavaScript`\n\n## Self Hosting\n\nTo host this API yourself, you can fork this repository and connect your fork to\nyour Vercel account. Once deployed, your API should be available at\n`your-subdomain.vercel.app/tokei`.\n\n## Running Locally\n\nInstall the [Vercel CLI](https://vercel.com/docs/cli). Once installed, run\n`vercel dev` from the root directory. The site should be available at\n`localhost:3000/tokei/[domain]/[user]/[repo]`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faschey%2Fvercel-tokei","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faschey%2Fvercel-tokei","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faschey%2Fvercel-tokei/lists"}