@mastra/apple-container
Apple container CLI sandbox provider for Mastra workspaces.
Implements the WorkspaceSandbox interface with Apple's container CLI. The provider starts a long-lived OCI Linux container and runs workspace commands through container exec.
Installation
npm install @mastra/apple-container
Usage
import { Workspace } from '@mastra/core/workspace';
import { AppleContainerSandbox } from '@mastra/apple-container';
const sandbox = new AppleContainerSandbox({
image: 'node:22-slim',
volumes: {
'/Users/me/project': '/workspace',
},
workingDir: '/workspace',
});
const workspace = new Workspace({ sandbox });
await workspace.init();
const result = await workspace.sandbox?.executeCommand?.('node', ['--version']);
console.log(result?.stdout);
await workspace.destroy();
Documentation
Changelog
See the package changelog for version history and release notes.
Support
We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.