Using WP-CLI wp server command with sage

I was using the wp server command with bedrock, pointing the docroot to web and it worked fine but with sage, I see an index.php, in the Resources folder and using the Resources folder as the docroot results in a blank screen. Is there anything in particular I should do if I want to use the wp-cli server with sage?

You are misunderstanding what Sage is. Sage is a WordPress theme not application. Sage — or any theme for that matter — will not work outside of the context of a WordPress install. The docroot needs to be the public directory of the WordPress application (i.e. Bedrock’s web directory), not the theme.

Here’s what I’d do to achieve what you want from scratch:

# Install Bedrock
$ composer create-project roots/bedrock
# Set your environment variables (i.e. DB info, hostname, etc.) in .env

# Install Sage in
$ composer create-project roots/sage coolbeans

# Install/build Sage's assets in
$ yarn && yarn build

# Activate Sage
$ wp theme activate coolbeans/resources

# Start the server from the project root (
$ wp server --docroot=web