2. Quickstart guide#

Blueapi acts as a worker that can run Bluesky plans against devices for a specific laboratory setup. It can control devices to collect data and export events to tell downstream services about the data it has collected.

You should be in the blueapi directory that you have cloned. From here, if you open VSCode, you will probably be prompted to ‘Reopen in Container’ which you can do and then run the following commands to start the worker.

If you not, you can still run the following from the venv created in page 1 but you may need to run the command below to have the dependencies required for this tutorial.

pip install .[demo]

Start Worker#

To start the worker:

blueapi serve

This will use all the defaults in src/blueapi/config.py

Basic Introspection#

Blueapi comes with a minimal CLI client for basic control/debugging. We can use this to see which plans and devices are available. In a new terminal window, run the following commands.

If working in a venv, you may need to reactivate it. To do this, assuming you are still in the blueapi repo in your terminal, use:

source .venv/bin/activate

Now, run the following to see what plans and devices are available:

blueapi controller plans
blueapi controller devices

We should now have an empty context.

See also Full CLI reference