An open API service indexing awesome lists of open source software.

https://github.com/xiaoluoboding/cw-github-linguist

The GitHub Linguist API build on top of Cloudflare Workers, retrieves language metadata from GitHub repositories.
https://github.com/xiaoluoboding/cw-github-linguist

api github language metadata

Last synced: 7 months ago
JSON representation

The GitHub Linguist API build on top of Cloudflare Workers, retrieves language metadata from GitHub repositories.

Awesome Lists containing this project

README

          

# Cloudflare Workers for GitHub Linguist

The GitHub Linguist API build on top of Cloudflare Workers, retrieves language metadata from GitHub repositories.

## How it works

https://github.com/github-linguist/linguist/blob/master/docs/how-linguist-works.md

## Usage

Enter a valid `$LANGUAGE` as params

```bash
curl https://cw-github-linguist.indiehacker.workers.dev/?language=$LANGUAGE
```

## Example

### Input

```bash
curl https://cw-github-linguist.indiehacker.workers.dev/?language=TypeScript
```

### Output

```json
{
"type": "programming",
"color": "#3178c6",
"aliases": ["ts"],
"interpreters": ["deno", "ts-node", "tsx"],
"extensions": [".ts", ".cts", ".mts"],
"tm_scope": "source.ts",
"ace_mode": "typescript",
"codemirror_mode": "javascript",
"codemirror_mime_type": "application/typescript",
"language_id": 378
}
```

## License

MIT [xiaoluoboding](https://github.com/xiaoluoboding)