The Capacitor command-line interface should be installed locally and executed through npm scripts.
npm
npm install @capacitor/cli --save-dev
Consult the Getting Started guide for information on using the CLI and Capacitor scripts.