@runloop/api-client - v1.4.0
    Preparing search index...

    Class BlueprintOps

    Blueprint SDK interface for managing blueprints.

    The BlueprintOps class provides a high-level abstraction for managing blueprints, which define the base configuration for devboxes. Blueprints are built from Dockerfiles and can be used to create multiple devboxes with consistent environments.

    This interface is accessed via RunloopSDK.blueprint. You should construct a RunloopSDK instance and use it from there:

    const runloop = new RunloopSDK();
    const blueprint = await runloop.blueprint.create({
    name: 'my-blueprint',
    dockerfile: `FROM ubuntu:22.04
    RUN apt-get update`,
    });
    const devbox = await runloop.devbox.createFromBlueprintId(blueprint.id, { name: 'my-devbox' });

    To use a local directory as a build context, use an object.

    const runloop = new RunloopSDK();
    const obj = await runloop.storageObject.uploadFromDir(
    './',
    {
    name: 'build-context',
    ttl_ms: 3600000, // 1 hour
    }
    );
    const blueprint = await runloop.blueprint.create({
    name: 'my-blueprint-with-context',
    dockerfile: `FROM ubuntu:22.04
    COPY . .`,
    build_context: obj,
    });
    Index

    Methods

    • Create a new blueprint.

      Parameters

      • params: CreateParams

        Parameters for creating the blueprint.

      • Optionaloptions: RequestOptions<unknown> & { polling?: Partial<PollingOptions<BlueprintView>> }

        Request options including polling configuration.

      Returns Promise<RunloopSDK.Blueprint>

      A Blueprint instance.