Registry / ai-ml / spawnfile

spawnfile

JSON →
library0.1.11jsnpmunverified

Spawnfile is a canonical source format and compiler for autonomous agent runtimes, currently at version 0.1.11. It allows developers to write one portable agent/team specification and compile it into configuration files for various agent runtimes. Key differentiators include a focus on identity, skills, MCP connections, and team structures, with per-capability support reporting (supported/degraded/unsupported). It requires Node.js >=22.0.0 and pairs with Moltnet for team networking. The compiler emits Dockerfile, entrypoint, and env files, and supports auth profiles for credential management. Release cadence is not specified but appears active on GitHub.

npm install spawnfile
INSTALL
IMPORT
SIG · SPAWNFILE
S
spawnfile
ai-mljavascriptv0.1.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

spawnfile
import spawnfile from 'spawnfile'
const spawnfile = require('spawnfile')
Package uses ESM; CommonJS require() is not supported.
compile
import { compile } from 'spawnfile'
Named export for the compile function, available in ESM.
validate
import { validate } from 'spawnfile'
Named export for the validate function, available in ESM.

Shows basic usage: import functions, validate a Spawnfile, view the graph, and compile to runtime output.

import { compile, validate, view } from 'spawnfile' import { readFileSync } from 'fs' // Load a Spawnfile project (assuming example project files exist) const spawnfileContent = readFileSync('./Spawnfile', 'utf-8') // Validate the project graph try { const valid = await validate(spawnfileContent) console.log('Valid:', valid) } catch (e) { console.error('Validation failed:', e.message) } // View the graph read-only const graph = await view(spawnfileContent) console.log(graph) // Compile to runtime output const output = await compile(spawnfileContent) console.log('Compiled output:', output)
Debug
Known issues
gotchaPackage requires Node.js 22.0.0+; using older versions will fail.
fix
Upgrade Node.js to 22.0.0 or later.
affects: <22.0.0
breakingspawnfile compile does not accept stdin; you must pass the project path.
fix
Use 'spawnfile compile .' or specify a directory.
affects: >=0.1.0
gotchaCompiled output is placed in .spawn/ directory by default; .env.example may contain placeholder secrets.
fix
Review .spawn/output before deploying; never commit .env files.
affects: >=0.1.0
deprecatedThe 'spawnfile run' command is experimental and may change.
fix
Use 'docker run' based on compiled Dockerfile instead.
affects: <0.2.0
Errors
Common errors & fixes
Error: spawnfile: command not found
spawnfile is not installed globally or not in PATH.
fix
Run 'npm install -g spawnfile' to install globally.
SyntaxError: Unexpected token 'export'
Trying to use ESM syntax in a CommonJS context without proper setup.
fix
Ensure package.json has `"type": "module"` or use .mjs extension.
ERR_REQUIRE_ESM
Attempting to require() an ES module.
fix
Use dynamic import() or switch to ESM imports.
Upgrade
Version history
0.1.11latest on npm
Audit
Dependencies
noderequiredRequires Node.js 22.0.0 or higher for runtime execution.
Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources