@edenapp/genesis
v0.2.6
Published
Genesis - Package and bundle Eden applications into .edenite format.
Maintainers
Readme
@edenapp/genesis
📦 Genesis - Package and bundle Eden applications.
Overview
Genesis is the official bundler for Eden apps. It packages your Eden applications into .edenite format using modern Zstandard (zstd) compression - ready to be planted in any Eden environment.
Features
- 🗜️ High-Performance Compression: Uses Zstandard compression for superior compression ratios
- 🔒 Integrity Verification: Built-in SHA256 checksums for archive verification
- 🎯 Metadata Support: Archive format versioning for forward compatibility
Installation
npm install -g @edenapp/genesisUsage
Build an App
Bundle your app into .edenite format:
genesis build ./my-appWith custom output path:
genesis build ./my-app -o ./dist/my-app.edeniteWith custom compression level (1-22, default 11):
genesis build ./my-app -c 9Verbose output:
genesis build ./my-app -vDry run (validate without creating files):
genesis build ./my-app --dry-runExtract an App
Extract an .edenite file to a directory:
genesis extract my-app.edenite ./output-dirWith verbose output:
genesis extract my-app.edenite ./output-dir -vSkip checksum verification (not recommended):
genesis extract my-app.edenite ./output-dir --no-verifyValidate an App
Check if your app manifest and files are valid:
genesis validate ./my-appGet Info
Display information about an .edenite file:
genesis info my-app-1.0.0.edeniteApp Structure
Your Eden app directory should contain:
my-app/
├── manifest.json # Required: App metadata
├── index.html # Optional: Frontend entry point (can be remote URL)
├── backend.js # Optional: Backend entry point (app can be frontend-only)
├── app.js # Optional: Frontend logic
├── icon.png # Optional: App icon
└── ... # Any other app filesmanifest.json
{
"id": "com.example.myapp",
"name": "My App",
"version": "1.0.0",
"description": "My awesome Eden app",
"author": "Your Name",
"backend": {
"entry": "backend.js"
},
"frontend": {
"entry": "index.html"
},
"icon": "icon.png"
}.edenite Format
An .edenite file is a Zstandard-compressed TAR archive with the following structure:
- Format:
[4 bytes metadata length][metadata JSON][zstd-compressed TAR] - Metadata: Includes format version, SHA256 checksum, creation time, and app manifest
- Compression: Zstandard (zstd) compression with configurable levels (1-22)
- Integrity: SHA256 checksum verification on extraction
Programmatic API
import { GenesisBundler } from '@edenapp/genesis';
// Bundle an app
const result = await GenesisBundler.bundle({
appDirectory: './my-app',
outputPath: './output/my-app.edenite',
verbose: true,
compressionLevel: 9, // Optional: 1-22, default 3
dryRun: false, // Optional: validate only
});
// Extract an app
const extractResult = await GenesisBundler.extract({
edenitePath: './my-app.edenite',
outputDirectory: './extracted',
verbose: true,
verifyChecksum: true, // Optional: verify integrity
});
// Get archive info
const info = await GenesisBundler.getInfo('./my-app.edenite');
console.log(info.manifest);
console.log(info.checksum);License
MIT
