Command line tool for “Can I Use …” and MDN Browser Compat Data
- Instant, offline, results powered by caniuse-db,
@mdn/browser-compat-data, andweb-features. - Displays color-coded Baseline status (Widely available, Newly available, or Limited availability).
- Collapses versions with the same level of support in the table, just like the “Can I Use …” website.
- Shows notes by number.
- Supports tab autocompletion in zsh, bash and fish.
- Built-in
--updatecommand to keep the local compatibility databases up to date.
# npm install -g @bramus/caniuse-cli
$ caniuse viewport-units
$ caniuse "viewport units"
$ caniuse @propertyWhen your local caniuse-db or @mdn/browser-compat-data data is 30 days or older, caniuse will display a reminder to update. You can update the local databases (caniuse-db, @mdn/browser-compat-data, and web-features) at any time by running:
$ caniuse --updateIn zsh:
echo '. <(caniuse --completion)' >> ~/.zshrcIn bash:
caniuse --completion >> ~/.caniuse.completion.sh
echo 'source ~/.caniuse.completion.sh' >> ~/.bashrcIn fish:
echo 'caniuse --completion-fish | source' >> ~/.config/fish/config.fishThat's all!
Now you have an autocompletion system.
bash: _get_comp_words_by_ref: command not found
bash: __ltrim_colon_completions: command not found
bash: _get_comp_words_by_ref: command not found
bash: __ltrim_colon_completions: command not found
Solution: install bash-completion package
@bramus/caniuse-cli is released under the MIT public license. See the enclosed LICENSE for details.
This project is built on the original https://github.com/dsenkus/caniuse-cli/
