Installation

Usage Guides

Reference

Commands

Language Server

MCP Server

Installation

Install CEM and verify your installation.

Installation Methods

NPM Projects

For Node.js-based projects, install CEM as a development dependency:

npm install --save-dev @pwrs/cem

Or with pnpm:

pnpm add -D @pwrs/cem

Go Binary

Install the latest version directly with Go:

go install bennypowers.dev/cem@latest

This installs the cem binary to your $GOPATH/bin directory.

Gentoo Linux

Enable the bennypowers overlay, then install:

eselect repository enable bennypowers
emaint sync -r bennypowers
emerge dev-util/cem

Build from Source

Clone the repository and build locally:

git clone https://github.com/bennypowers/cem.git
cd cem
make

The compiled binary will be available in the dist/ directory. To install it in ~/.local/bin, run:

make install

Verify Installation

After installation, verify CEM is working:

cem version

You should see the version number printed to your terminal.

Shell Completion

CEM supports shell completion for Bash, Zsh, Fish, and PowerShell. The completion scripts provide tab completion for commands, flags, and file paths.

Bash

To load completions in your current shell session:

source <(cem completion bash)

To load completions for every new session, execute once:

Linux:

cem completion bash > /etc/bash_completion.d/cem

macOS:

cem completion bash > $(brew --prefix)/etc/bash_completion.d/cem

Zsh

To load completions in your current shell session:

source <(cem completion zsh)

To load completions for every new session, execute once:

cem completion zsh > "${fpath[1]}/_cem"

You will need to start a new shell for this setup to take effect.

Fish

To load completions in your current shell session:

cem completion fish | source

To load completions for every new session, execute once:

cem completion fish > ~/.config/fish/completions/cem.fish

PowerShell

To load completions in your current shell session:

cem completion powershell | Out-String | Invoke-Expression

To load completions for every new session, add the output of the above command to your PowerShell profile.

Next Steps

After installation, set up CEM for your development environment: