Installing an alpha dev version with composer
As I said, just don't specify a version and composer will automatically pick a version constraint that installs the most stable version:

$ composer require drupal/block_class
Using version ^1.0@alpha for drupal/block_class
./composer.json has been updated
Gathering patches for root package.
&gt; DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing drupal/block_class (1.0.0-alpha1): Loading from cache
Writing lock file
Generating autoload files
&gt; DrupalProject\composer\ScriptHandler::createRequiredFiles