Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sgentle/caniuse-cmd
Caniuse command line tool
https://github.com/sgentle/caniuse-cmd
Last synced: 1 day ago
JSON representation
Caniuse command line tool
- Host: GitHub
- URL: https://github.com/sgentle/caniuse-cmd
- Owner: sgentle
- License: mit
- Created: 2015-03-15T10:50:13.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-09-19T15:16:06.000Z (over 6 years ago)
- Last Synced: 2025-01-17T09:03:46.892Z (9 days ago)
- Language: CoffeeScript
- Homepage:
- Size: 18.6 KB
- Stars: 1,623
- Watchers: 32
- Forks: 53
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cli-apps - caniuse-cmd - Search [caniuse.com](https://caniuse.com) about browser support of features. (Development / Frontend Development)
- awesome-command-line-apps - caniuse-cmd - All the power of caniuse.com with none of the GUI. (\*nix/\*nux / Developer)
- fucking-awesome-cli-apps - caniuse-cmd - Search π [caniuse.com](caniuse.com) about browser support of features. (Development / Frontend Development)
README
caniuse-cmd
===========Just what you've always wanted, it's a `caniuse` command line tool!
All the power of [caniuse.com](http://caniuse.com) with none of the nice UI or interactivity!How do?
-------Install with `npm install -g caniuse-cmd`.
Then type things like this:
```
$ caniuse websockets
Web Sockets β 85.22% β 1.35% [W3C Candidate Recommendation]
Bidirectional communication technology for web apps #JSAPIIE β 5.5+ β 10+
Firefox β 2+ β 4+ΒΉ β 6+α΅Β² β 11+
Chrome β 4+ΒΉ β 15+Β² β 16+
Safari β 3.1+ β 5+ΒΉ β 6+Β² β 7+
Opera β 9+ β 11+ΒΉ β 12.1+ΒΉPartial support refers to the websockets implementation using an older version of the protocol and/or the
implementation being disabled by default (due to security issues with the older protocol).
Β²Partial support refers to lacking support for binary data.
```(The output has truly marvellous colours that this markdown is too narrow to contain.)
Or this:
```
$ caniuse input
caniuse input
HTML5 form features β 4.21% β 82.39%
IE β 5.5+ β 10+ Firefox β 2+ β 4+ Chrome β Safari β 3.1+ β 4+ Opera β 9+ β 15+
Spellcheck attribute β 60.31% β 31.63%
IE β 5.5+ β 10+ Firefox β Chrome β 4+ β 9+ Safari β 3.1+ β 5.1+ Opera β 9+ β 10.5+
Range input type β 87.46% β 1.18%
IE β 5.5+ β 10+ Firefox β 2+ β 23+ Chrome β½ 4+ β 5+ Safari β Opera β
Date and time input types β 60.76% β 0%
IE β Firefox β Chrome β 4+ β 20+ Safari β Opera β
Color input type β 60.93% β 3.84%
IE β Firefox β 2+ β 29+ Chrome β 4+ β 20+ Safari β Opera β 9+ β 11+ β 15+ β 17+
Number input type β 49.95% β 38.03%
IE β 5.5+ β 10+ Firefox β 2+ β 29+ Chrome β 4+ β 6+ Safari β 3.1+ β 5+ Opera β
input placeholder attribute β 88.04% β 1.15%
IE β 5.5+ β 10+ Firefox β 2+ β 4+ Chrome β Safari β 3.1+ β 5+ Opera β 9+ β 11+ β 11.5+
Pointer events β 8.5% β 1.67%
IE β 5.5+ β 10+α΅ β 11+ Firefox β Chrome β Safari β 3.1+ β½ 6.1+ Opera β
Web Speech API
IE β Firefox β Chrome β 4+ β 25+α΅ Safari β 3.1+ β 6.1+α΅ β 7.1+ Opera β
Multiple file selection β 67.63% β 0%
IE β 5.5+ β 10+ Firefox β 2+ β 3.6+ Chrome β 4+ β 5+ Safari β 3.1+ β 4+ Opera β 9+ β 10.6+
Gamepad API β 46.08% β 0%
IE β Firefox β 2+ β 29+ Chrome β 4+ β 21+α΅ β 25+ Safari β Opera β 9+ β 24+
Pattern attribute for input fields β 72.88% β 0.7%
IE β 5.5+ β 10+ Firefox β 2+ β 4+ Chrome β 4+ β 10+ Safari β Opera β 9+ β 9.5-9.6+
```Does it have lots of command line options?
------------------------------------------Yes!
```
$ caniuse --help
Options:
Options:
--short, -s Short output: show browsers on one line and don't
display notes or description (default when displaying
multiple results) [boolean]
--long, -l Long output: show more information (default when
displaying a single result) [boolean]
--oneline, -1 One-line output: just global percentages, no per-
browser info [boolean] [default: false]
--oneline-browser, -2 One-line output with browser info, implies --abbrev and
--current [boolean] [default: false]
--abbrev, -a Abbreviate browser names [boolean] [default: false]
--percentages, -p Include browser version usage percentages
[boolean] [default: false]
--future, -f Include future browser versions
[boolean] [default: false]
--current, -c Don't include old browser versions, equivalent to --era
e0 [boolean] [default: false]
--era, -e How many versions back to go, e0 to e-40 [string]
--mobile, -m Include mobile browsers [boolean] [default: false]
--desktop, -d Include desktop browsers [boolean] [default: true]
--browser, -b Show results for these browsers, comma-separated (ie,
edge,firefox,chrome,safari,opera,ios_saf,op_mini,
android,bb,op_mob,and_chr,and_ff,ie_mob,and_uc)
[string]
--web, -w Go to the search page on caniuse.com
[boolean] [default: false]
--config, -C Path to JSON config file
[string] [default: "/Users/user/.caniuse.json"]
--ascii, -A UTF-8 symbols replacement with ASCII description
[boolean] [default: false]
--help Show help [boolean]```
Woah, that's a lot of options! Can haz config file?
---------------------------------------------------Yes! You can specify your own defaults by creating a file called `.caniuse.json`
and putting it in your home directory.For example, if you're primarily interested in mobile browsers two versions back:
```
{
"era": "e-2",
"mobile": true,
"desktop": false
}```