MCPcopy Index your code
hub / github.com/apocas/firecrackerode

github.com/apocas/firecrackerode @v1.0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.2 ↗ · + Follow
6 symbols 6 edges 11 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

firecrackerode

Node.js client for Amazon's Firecracker MicroVM platform.

Installation

npm install firecrackerode

Usage

Getting started

To use firecrackerode first you need to instantiate it:

var Firecracker = require('dockerode');
var firecracker = new Firecracker({socketPath: '/tmp/firecracker.socket'});

Creating a MicroVM

//https://s3.amazonaws.com/spec.ccfc.min/img/hello/kernel/hello-vmlinux.bin
firecracker.bootSource({
  'kernel_image_path': process.cwd() + '/images/hello-vmlinux.bin',
  'boot_args': 'console=ttyS0 reboot=k panic=1 pci=off'
}).then(function(data) {
  //https://s3.amazonaws.com/spec.ccfc.min/img/hello/fsfiles/hello-rootfs.ext4
  var drive = firecracker.drive('rootfs');
  return drive.updatePreboot({
    'path_on_host': process.cwd() + '/images/hello-rootfs.ext4',
    'is_root_device': true,
    'is_read_only': false
  });
}).then(function(data) {
  return firecracker.action('InstanceStart');
}).then(function(data){
  console.log('MicroVM booted!');
}).catch(function(err) {
  console.log(err);
});

Helper functions

//Downloading an image
firecracker.downloadImage('https://s3.amazonaws.com/spec.ccfc.min/img/hello/kernel/hello-vmlinux.bin', os.tmpdir() + '/hello-vmlinux.bin').then(function () {
  console.log('Kernel image downloaded!');
}).catch(function(err) {
  console.log(err);
});

//Spawn Firecracker process
firecracker.spawn().then(function () {
  console.log('Firecracker spawned!');
}).catch(function(err) {
  console.log(err);
});

//Kill Firecracker process
firecracker.kill()

Core symbols most depended-on inside this repo

Drive
called by 0
lib/drive.js
MachineConfig
called by 0
lib/machineconfig.js
Firecracker
called by 0
lib/firecracker.js
Interface
called by 0
lib/interface.js
Modem
called by 0
lib/modem.js
MMDS
called by 0
lib/mmds.js

Shape

Function 6

Languages

TypeScript100%

Modules by API surface

lib/modem.js1 symbols
lib/mmds.js1 symbols
lib/machineconfig.js1 symbols
lib/interface.js1 symbols
lib/firecracker.js1 symbols
lib/drive.js1 symbols

For agents

$ claude mcp add firecrackerode \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact