{"_id":"@akaoio/stacker","name":"@akaoio/stacker","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.2":{"name":"@akaoio/stacker","version":"0.0.2","description":"Universal POSIX shell framework - TypeScript + Shell hybrid architecture","type":"module","main":"dist/index.js","module":"dist/index.mjs","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"},"./shell":"./stacker.sh"},"bin":{"stacker":"stacker.sh"},"scripts":{"build":"akao-build","dev":"akao-build --watch","test":"battle test","docs":"composer generate","clean":"rm -rf dist/","prepublish":"npm run build"},"keywords":["shell","posix","framework","typescript","system-management","devops","automation"],"author":{"name":"AKAO.IO"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/akaoio/stacker.git"},"devDependencies":{"@akaoio/builder":"*","@akaoio/composer":"*","@akaoio/battle":"*","@types/node":"^20.0.0","typescript":"^5.0.0"},"engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"6f61efdadabec8de18d526ab4f7b78c353fcad83","bugs":{"url":"https://github.com/akaoio/stacker/issues"},"homepage":"https://github.com/akaoio/stacker#readme","_id":"@akaoio/stacker@0.0.2","_nodeVersion":"18.19.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-5nX4s1PM+97mHqkc6vN9g/3LO7F3Z9RvRSAqkVd/yHCkJTXZZ7g9dzqhDkKgdVVT4RiS8i2ND7zKYH9MucXpGA==","shasum":"d8e2182d7d95558eff5b04dc228f5f93bd501a6c","tarball":"https://registry.npmjs.org/@akaoio/stacker/-/stacker-0.0.2.tgz","fileCount":22,"unpackedSize":261105,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDBSZrrl8/ZwKJo8zLC6giMZcA9o4MEpGRcubDyPZJeNgIhANKPKoC0+bSjWk4BCXsOJcv2f+gW4MXgT7QmUv/kclHi"}]},"_npmUser":{"name":"akaoio","email":"dev@akao.io"},"directories":{},"maintainers":[{"name":"akaoio","email":"dev@akao.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/stacker_0.0.2_1756385792222_0.6266452778835332"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-28T12:56:32.106Z","0.0.2":"2025-08-28T12:56:32.406Z","modified":"2025-08-28T12:56:32.743Z"},"maintainers":[{"name":"akaoio","email":"dev@akao.io"}],"description":"Universal POSIX shell framework - TypeScript + Shell hybrid architecture","homepage":"https://github.com/akaoio/stacker#readme","keywords":["shell","posix","framework","typescript","system-management","devops","automation"],"repository":{"type":"git","url":"git+https://github.com/akaoio/stacker.git"},"author":{"name":"AKAO.IO"},"bugs":{"url":"https://github.com/akaoio/stacker/issues"},"license":"MIT","readme":"# @akaoio/stacker\n\nUniversal POSIX shell framework for system management - The foundational framework that standardizes patterns across all technologies with modular architecture\n\n> Stacker brings order to chaos - a universal shell framework with modular loading that works everywhere, forever.\n\n**Version**: 2.0.0  \n**License**: MIT  \n**Repository**: https://github.com/akaoio/stacker\n\n## Overview\n\nStacker is a comprehensive shell framework that provides standardized patterns for system management, configuration, installation, updates, and service orchestration. Version 2.0.0 features a complete CLI interface with interactive commands and comprehensive help system.\n\n## Core Principles\n\n### Universal POSIX Compliance\nPure POSIX shell implementation that runs on any Unix-like system without dependencies\n**Critical**: This is a foundational requirement\n\n### Framework Pattern Standardization\nEstablishes universal patterns for shell-based system management across all environments\n**Critical**: This is a foundational requirement\n\n### Zero Dependencies\nNo external dependencies, no runtimes, no package stackers - just pure shell\n**Critical**: This is a foundational requirement\n\n### Eternal Infrastructure\nBuilt to last forever - when languages come and go, Stacker remains\n**Critical**: This is a foundational requirement\n\n\n## Features\n\n- **Universal Shell Patterns**: Standardized patterns for error handling, logging, configuration, and state management\n- **Dynamic Module Loading**: On-demand module loading with automatic dependency resolution and smart caching\n- **Modular Architecture**: Clean separation of concerns with independent, reusable modules that load only when needed\n- **Module Registry System**: Comprehensive module tracking, dependency management, and initialization lifecycle\n- **Auto-Loading Intelligence**: Smart function detection that automatically loads required modules based on function calls\n- **Interactive CLI Interface**: Complete command-line interface with interactive mode, comprehensive help system, short aliases, and intelligent argument parsing\n- **XDG Compliance**: Full XDG Base Directory specification compliance for configuration and data storage\n- **Multi-Platform Support**: Works on Linux, BSD, macOS, and any POSIX-compliant system\n- **Service Integration**: Native integration with systemd, init.d, launchd, and cron\n- **Atomic Operations**: Safe atomic updates and rollback capabilities for critical operations\n- **Version Management**: Semantic versioning with compatibility checking and migration support\n- **Health Monitoring**: Built-in health checks and diagnostic capabilities\n\n## Installation\n\n```bash\n# Quick install with default settings\ncurl -sSL https://raw.githubusercontent.com/akaoio/stacker/main/install.sh | sh\n\n# Install as systemd service\ncurl -sSL https://raw.githubusercontent.com/akaoio/stacker/main/install.sh | sh -s -- --systemd\n\n# Install with custom prefix\ncurl -sSL https://raw.githubusercontent.com/akaoio/stacker/main/install.sh | sh -s -- --prefix=/opt/stacker\n```\n\n## Usage\n\n```bash\n# Initialize a new Stacker-based project\nstacker init\n\n# Configure settings\nstacker config set update.interval 3600\n\n# Install application\nstacker install --systemd\n\n# Check health\nstacker health\n\n# Update application\nstacker update\n```\n\n## Commands\n\n### `init, -i`\nInitialize Stacker framework in current directory\n\n**Usage**: `stacker init [OPTIONS]`\n\n**Options**:\n- `--template, -t`: Project template (service, cli, library) (default: service)\n- `--name, -n`: Project name\n- `--repo`: Repository URL\n- `--script`: Main script name\n\n**Examples**:\n- `stacker init` - Initialize with interactive prompts\n- `stacker init --template&#x3D;cli --name&#x3D;mytool` - Initialize CLI application template\n\n### `config, -c`\nManage configuration settings\n\n**Usage**: `stacker config [get|set|list] [key] [value]`\n\n\n**Examples**:\n- `stacker config list` - List all configuration settings\n- `stacker config get update.interval` - Get specific configuration value\n- `stacker config set update.interval 3600` - Set configuration value\n\n### `install`\nInstall Stacker-based application\n\n**Usage**: `stacker install [--systemd|--cron|--manual] [options]`\n\n**Options**:\n- `--systemd`: Install as systemd service\n- `--cron`: Install as cron job\n- `--manual`: Manual installation (default)\n- `--interval&#x3D;N`: Cron interval in minutes\n- `--auto-update, -a`: Enable automatic updates\n- `--redundant`: Both systemd and cron\n\n**Examples**:\n- `stacker install --systemd` - Install as system service\n- `stacker install --cron --interval&#x3D;300` - Install with 5-minute cron schedule\n\n### `update, -u`\nUpdate Stacker-based application\n\n**Usage**: `stacker update [--check|--force]`\n\n**Options**:\n- `--check`: Check for updates without installing\n- `--force`: Force update even if current\n- `--rollback`: Rollback to previous version\n\n**Examples**:\n- `stacker update --check` - Check for available updates\n- `stacker update` - Perform update if available\n\n### `service, -s`\nControl Stacker service\n\n**Usage**: `stacker service [start|stop|restart|status|enable|disable]`\n\n\n**Examples**:\n- `stacker service start` - Start the service\n- `stacker service status` - Check service status\n- `stacker service enable` - Enable service at boot\n\n### `health`\nCheck system health and diagnostics\n\n**Usage**: `stacker health [--verbose]`\n\n**Options**:\n- `--verbose`: Show detailed diagnostic information\n\n**Examples**:\n- `stacker health` - Quick health check\n- `stacker health --verbose` - Detailed system diagnostics\n\n### `status`\nShow current status of Stacker-based application\n\n**Usage**: `stacker status`\n\n\n**Examples**:\n- `stacker status` - Display installation and service status\n\n### `rollback, -r`\nRollback to previous version\n\n**Usage**: `stacker rollback [version]`\n\n\n**Examples**:\n- `stacker rollback` - Rollback to previous version\n- `stacker rollback 1.2.3` - Rollback to specific version\n\n### `self-update`\nUpdate Stacker framework itself\n\n**Usage**: `stacker self-update [--check]`\n\n**Options**:\n- `--check`: Check for framework updates\n- `--channel`: Update channel (stable, beta) (default: stable)\n\n**Examples**:\n- `stacker self-update --check` - Check for Stacker updates\n- `stacker self-update` - Update Stacker framework\n\n### `version, -v`\nShow version information\n\n**Usage**: `stacker version [--json]`\n\n**Options**:\n- `--json`: Output in JSON format\n\n\n### `help, -h`\nShow help information\n\n**Usage**: `stacker help [command]`\n\n\n**Examples**:\n- `stacker help` - Show general help\n- `stacker help install` - Show help for install command\n\n\n## Architecture Components\n\n### Core Module (stacker-core.sh)\nCentral framework providing common functions, error handling, logging, and state management\n\n**Responsibility**: Foundation layer for all Stacker operations\n\n### Configuration Module (stacker-config.sh)\nXDG-compliant configuration management with JSON support and environment variable overrides\n\n**Responsibility**: Centralized configuration handling across all modules\n\n### Installation Module (stacker-install.sh)\nUniversal installation framework supporting systemd, cron, and manual deployment\n\n**Responsibility**: Standardized installation across different environments\n\n### Update Module (stacker-update.sh)\nIntelligent update system with version management and rollback capabilities\n\n**Responsibility**: Safe and reliable system updates\n\n### Service Module (stacker-service.sh)\nService lifecycle management for systemd, init.d, and standalone daemons\n\n**Responsibility**: Unified service control interface\n\n### CLI Interface (integrated)\nComplete command-line interface with interactive commands, argument parsing, and comprehensive help system\n\n**Responsibility**: Direct CLI execution, user interaction, and command processing with full subcommand support\n\n### Self-Update Module (stacker-self-update.sh)\nAuto-update capability with integrity verification and atomic updates\n\n**Responsibility**: Framework self-maintenance\n\n\n## Use Cases\n\n- System initialization and bootstrapping\n- Application deployment and management\n- Service orchestration and monitoring\n- Configuration management across environments\n- Automated updates and maintenance\n- Cross-platform shell script development\n- Infrastructure automation without dependencies\n- Emergency recovery systems\n\n## Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `STACKER_CONFIG_DIR` | Override default config directory | `$HOME/.config/stacker` |\n| `STACKER_DATA_DIR` | Override default data directory | `$HOME/.local/share/stacker` |\n| `STACKER_LOG_LEVEL` | Logging level (debug, info, warn, error) | `info` |\n| `STACKER_UPDATE_CHANNEL` | Update channel (stable, beta, nightly) | `stable` |\n| `STACKER_AUTO_UPDATE` | Enable automatic updates | `false` |\n| `STACKER_PREFIX` | Installation prefix | `/usr/local` |\n\n## Why Stacker Matters\n\nStacker is the foundational framework that brings consistency and reliability to shell-based system management. While modern tools require complex dependencies and runtimes, Stacker provides a universal, dependency-free solution that works everywhere, forever.\n\n### Benefits\n\n- No dependencies means no dependency hell\n- POSIX compliance ensures universal compatibility\n- Standardized patterns reduce complexity and errors\n- Framework approach enables rapid development\n- Battle-tested reliability for production systems\n- Emergency recovery when other systems fail\n- Educational resource for shell best practices\n\n## Development\n\nStacker follows strict POSIX compliance and zero-dependency principles. All code must be pure POSIX shell without bashisms or GNU extensions.\n\n### Contributing\n\n1. Fork the repository\n2. Create your feature branch\n3. Ensure POSIX compliance\n4. Add tests using the test framework\n5. Submit a pull request\n\n### Testing\n\n```bash\n# Run all tests\n./tests/run-all.sh\n\n# Run specific test suite\n./tests/test-core.sh\n```\n\n## Support\n\n- **Issues**: [GitHub Issues](https://github.com/akaoio/stacker/issues)\n- **Documentation**: [Wiki](https://github.com/akaoio/stacker/wiki)\n- **Community**: [Discussions](https://github.com/akaoio/stacker/discussions)\n\n---\n\n*@akaoio/stacker - The foundational framework that brings order to chaos*\n\n*Built with zero dependencies for eternal reliability*","readmeFilename":"README.md","_rev":"1-1d7ff4a3b90f492a09b9f6bfe11d7f33"}