Package Exports
- jamkit
- jamkit/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jamkit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Jamkit CLI
A powerful command-line tool for building native mobile apps using web-like technologies. Jamkit enables developers to create cross-platform applications for iOS and Android using SBML (markup), SBSS (styling), and JavaScript.
๐ Features
- Cross-Platform Development: Build for both iOS and Android from a single codebase
- Native App Generation: Creates fully native mobile applications
- Real-time Development: Live reload and debugging support
- IPFS Publishing: Built-in decentralized app distribution
- Template System: Quick project scaffolding with various templates
- Simulator Integration: Seamless iOS Simulator and Android Emulator support
- BON Configuration: Human-readable configuration format
- TypeScript Support: Full TypeScript codebase with comprehensive type definitions
๐ Requirements
macOS
- Node.js 18+ and npm
- Xcode (from Mac App Store) - Required for iOS development
- Xcode Command Line Tools - Required for iOS development
- Android SDK - Required for Android development
Windows
- Node.js 18+ and npm
- Android SDK - Required for Android development
- Note: iOS development not supported
Linux
- Node.js 18+ and npm
- Android SDK - Required for Android development
- Note: iOS development not supported
๐ Installation
macOS
1. Install Node.js and npm
Using Homebrew (recommended):
brew update
brew install nodeOr download from Node.js official website
2. Install Jamkit globally
npm install -g jamkit3. Install Xcode (for iOS development)
- Download from Mac App Store
- Install Xcode command line tools:
xcode-select --install4. Install Android SDK (for Android development)
- Download Android Studio
- Install Android SDK and create AVD (Android Virtual Device)
Windows
1. Install Node.js and npm
- Download and install from Node.js official website
- Verify installation:
node --version
npm --version2. Install Jamkit globally
npm install -g jamkit3. Install Android SDK (for Android development)
- Download Android Studio
- Install Android SDK and create AVD (Android Virtual Device)
- Add Android SDK to PATH environment variable
Note: iOS development is not supported on Windows. Use macOS for iOS app development.
Linux
1. Install Node.js and npm
Using package manager (Ubuntu/Debian):
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejsOr download from Node.js official website
2. Install Jamkit globally
npm install -g jamkit3. Install Android SDK (for Android development)
- Download Android Studio
- Install Android SDK and create AVD (Android Virtual Device)
Note: iOS development is not supported on Linux. Use macOS for iOS app development.
๐ Quick Start
Create a New Project
# Create a new app project
jamkit create my-app --type app --template hello-world
# Create a new book project
jamkit create my-book --type book --template hello-worldRun on Simulator
# Run on iOS Simulator (macOS only)
jamkit run --platform ios
# Run on Android Emulator
jamkit run --platform androidBuild Your App
# Build app package
jamkit build
# Install on simulator
jamkit install --platform iosPublish to IPFS
jamkit publish --shorten-url๐ CLI Commands
Project Management
jamkit create <directory>- Create a new projectjamkit run- Run project on simulator with live reloadjamkit build- Build app package (.jam or .bxp)jamkit install- Install app on simulator
Publishing & Distribution
jamkit publish- Publish to IPFS with QR code generationjamkit open <url>- Open URL in simulator
Development Tools
jamkit database generate <excel-file>- Generate database from Exceljamkit style migrate- Migrate old SBSS styles to new formatjamkit native compose <path>- Integrate native code
๐ Project Structure
my-app/
โโโ package.bon # Project configuration (BON format)
โโโ catalogs/ # App resources and content
โ โโโ MainApp/ # Main application catalog
โ โ โโโ catalog.bon
โ โ โโโ catalog.sqlite
โ โโโ ...
โโโ ...โ๏ธ Configuration
package.bon
The main configuration file uses BON (Bookjam Object Notation) format:
{
id: com.yourcompany.yourapp,
version: 1.0,
title: Your App Title,
localization: {
en: {
title: App Title
},
ko: {
title: ์ฑ ์ ๋ชฉ
}
}
}CLI Options
Create Command
jamkit create <directory> [options]
--type <type> Project type: 'app' or 'book' (default: app)
--app-id <id> App identifier (default: auto-generated)
--version <version> App version (default: 1.0)
--template <template> Template name (default: hello-world)
--repository <repo> Template repository (default: bookjam/jamkit-templates)
--language <lang> Language code (default: global)
--theme <theme> UI themeRun Command
jamkit run [options]
--platform <platform> Platform: 'ios' or 'android' (default: auto-detect)
--mode <mode> Run mode: 'main', 'jam', or 'widget' (default: main)
--shell-host <host> Shell host (default: 127.0.0.1)
--shell-port <port> Shell port (default: 8888)
--skip-sync Skip file synchronizationPublish Command
jamkit publish [options]
--host-url <url> Custom host URL
--file-url <url> Direct file URL
--image-url <url> App icon URL
--image-file <path> App icon file path
--title <title> Custom app title
--language <lang> Language for localization
--ipfs-host <host> IPFS host (default: ipfs.infura.io)
--ipfs-port <port> IPFS port (default: 5001)
--ipfs-protocol <proto> IPFS protocol: 'http' or 'https' (default: https)
--shorten-url Generate shortened URL with QR code
--apple-install-url <url> iOS installation URL
--google-install-url <url> Android installation URL๐ง Development
Building from Source
# Clone the repository
git clone <repository-url>
cd jamkit
# Install dependencies
npm install
# Build TypeScript to JavaScript
npm run build
# Run in development mode
npm run dev
# Type checking only
npm run typecheckArchitecture
This is a Node.js CLI application written in TypeScript with ESM modules:
- Entry Point:
src/index.ts- Commander.js CLI interface - Core Logic:
src/commands.ts- All command implementations - Platform Support:
src/simulator.ts- iOS/Android simulator managementsrc/simctl.ts- iOS Simulator controlsrc/avdctl.ts- Android Emulator control
- Build Tools:
src/template.ts- Project template managementsrc/catalog.ts- Excel to SQLite conversionsrc/obfuscator.ts- Code obfuscation
- Utilities:
src/shell.ts- Simulator shell communicationsrc/syncfolder.ts- File synchronizationsrc/native.ts- Native code integrationsrc/bon.ts- BON format parser/writer
TypeScript Configuration
The project uses comprehensive TypeScript configuration with:
- Target: ES2022 with ESM modules
- Custom Types:
src/@types/directory with module-specific type definitions - Build Output:
dist/directory with JavaScript and type declarations - Source Maps: Enabled for debugging
๐งช Testing
# Run built CLI
node dist/index.js --help
# Test specific commands
node dist/index.js create test-app --type app๐ File Formats
BON (Bookjam Object Notation)
A configuration format based on JSON with simplified string-only values:
Key Features:
- JSON-like structure with objects
{}and arrays[] - All property keys can be unquoted (unless they contain special characters)
- All values are strings - no numbers, booleans, or null types
- Trailing commas are allowed
- More forgiving syntax for human readability
Example:
{
id: com.example.app,
version: 1.0,
debug: true,
port: 8080
}Note that 1.0, true, and 8080 are all treated as string values, not their respective JSON types.
Catalog Files
- catalog.bon: Human-readable catalog configuration
- catalog.sqlite: Generated database for app runtime
App UI Files
- SBML: Markup format for app layout (similar to HTML)
- SBSS: Stylesheet format for app styling (similar to CSS)
๐ค Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes with proper TypeScript typing
- Build and test (
npm run build && npm test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Links
๐ Support
- Issues: Report bugs and feature requests on GitHub Issues
- Documentation: Comprehensive guides in the
docs/directory - CLI Help: Use
jamkit <command> --helpfor command-specific help
Made with โค๏ธ by the Jamkit team