caniuse-cmd
Just what you've always wanted, it's a caniuse
command line tool!
All the power of 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 #JSAPI
IE โ 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
}