learnfolio-install
v1.0.0
Published
Universal installer framework for learnfolio marketplace products
Maintainers
Readme
learnfolio-install
Universal installer framework for learnfolio.com marketplace products - self-host any platform in minutes!
What is this?
@learnfolio/install is a powerful CLI tool that makes it easy for non-technical users to deploy complex self-hosted applications. It handles:
- 🔍 System requirements checking
- 🔑 API key collection
- 🐳 Docker Compose orchestration
- 📊 Database initialization
- 🔍 Vector store setup (Qdrant, Weaviate, etc.)
- 🔒 SSL configuration
- 🔄 Updates and migrations
How it Works
- Product manifest (YAML/JSON) defines the entire stack
- Installer validates system, collects config, generates files
- Docker runs everything in isolated containers
- User brings their own keys (BYOK) - nothing stored centrally
Installation
Install globally:
npm install -g @learnfolio/installOr use without installation:
npx @learnfolio/installUsage
Install a learnfolio marketplace product:
# Basic usage
learnfolio-install product-name
# Specify version
learnfolio-install product-name --version 1.2.0
# Custom directory
learnfolio-install product-name --directory /path/to/my-app
# Use custom registry
learnfolio-install product-name --registry https://registry.learnfolio.coExample: Installing AI Content Hub
learnfolio-install ai-content-hub
🚀 Learnfolio Installer
────────────────────────────────────────
Installing AI Content Hub v1.2.0
Complete AI-powered content management with vector search
? Project name my-ai-hub
? OpenAI API Key ****************************
? Auth Secret (press Enter to auto-generate)
? Domain name (optional) my-ai-hub.com
? Enable SSL with Let's Encrypt No
? Environment Production
✅ Installation successful!
Next Steps:
1. Navigate to your project:
cd my-ai-hub
2. Start your services:
docker compose up -d
3. Access your application:
http://localhost:3000List available products:
learnfolio-install listValidate a product manifest:
learnfolio-install validate product.yamlUpdate an installed product:
learnfolio-install update my-ai-hubProduct Manifest Format
Products are defined with a simple YAML or JSON manifest:
name: ai-content-hub
version: "1.2.0"
description: Complete AI-powered content management with vector search
price: "$299"
author: Learnfolio
services:
- name: web
image: registry.learnfolio.ai/ai-content-hub/web:1.2.0
ports: [3000]
environment:
DATABASE_URL: postgresql://${DB_USER}:${DB_PASSWORD}@postgres:5432/${DB_NAME}
OPENAI_API_KEY: ${OPENAI_API_KEY}
dependsOn: [postgres, qdrant]
healthCheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
- name: postgres
image: postgres:15-alpine
volumes: [pgdata:/var/lib/postgresql/data]
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
healthCheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
retries: 5
- name: qdrant
image: qdrant/qdrant:latest
ports: [6333]
volumes: [qdrant-data:/qdrant/storage]
healthCheck:
test: ["CMD", "curl", "-f", "http://localhost:6333/health"]
interval: 10s
retries: 5
dependencies:
docker: ">=20.10"
dockerCompose: ">=2.0"
ram: "4GB"
os: ["linux", "darwin"]
cpu: "x64"
requiredApiKeys:
- name: OPENAI_API_KEY
label: OpenAI
validation: sk-.*
help: Get your key at openai.com -> API Keys
- name: AUTH_SECRET
label: Auth Secret
generate: true
help: Secret for JWT signing
postInstall:
migrateDatabase: true
seedData: true
vectorStore:
provider: qdrant
collections:
- name: documents
description: Document embeddings
- name: content
description: Content embeddings
ssl: false
setupAdminUser: trueCreating Products for learnfolio Marketplace
Step 1: Create Your Product Manifest
Create a product.yaml in your product repository following the format above.
Step 2: Build and Push Docker Images
# Build your service images
docker build -t registry.learnfolio.ai/your-product/web:1.0.0 -f web.Dockerfile .
# Push to learnfolio registry
docker push registry.learnfolio.ai/your-product/web:1.0.0Step 3: Register Your Product
Submit your manifest to learnfolio.com marketplace.
Step 4: Deploy
Users can now install your product with a single command!
npx @learnfolio/install your-productDevelopment
Build from source:
# Clone the repository
git clone https://github.com/learnfolio/installer
# Install dependencies
cd learnfolio-install
pnpm install
# Build
pnpm run build
# Link for local testing
pnpm link
# Use locally
learnfolio-install test-productRun in development mode:
pnpm run dev test-productWatch mode:
pnpm run watchArchitecture
learnfolio-install/
├── src/
│ ├── index.ts # CLI entry point
│ ├── types.ts # TypeScript interfaces
│ ├── core/
│ │ ├── installer.ts # Main installation logic
│ │ ├── registry.ts # Product registry client
│ │ └── updater.ts # Update handler
│ ├── utils/
│ │ ├── prompt-manager.ts # Interactive prompts
│ │ ├── system-checker.ts # System validation
│ │ ├── docker-generator.ts # Docker Compose generator
│ │ ├── env-manager.ts # Environment file manager
│ │ └── service-initializer.ts # Post-install setup
│ └── validators/
│ └── manifest-validator.ts # Manifest validation
├── templates/ # Default templates
├── package.json
├── tsconfig.json
└── README.mdEnvironment Variables
The installer handles environment variables automatically based on the product manifest. Users can:
- Provide values during interactive setup
- Use
--config product.yamlfor pre-configured installation - Use
--yesto skip all prompts (development mode)
Troubleshooting
Docker not found
# Install Docker
# macOS: https://docs.docker.com/docker-for-mac/install/
# Ubuntu: apt install docker.io docker-composePort already in use
The installer will detect port conflicts and prompt you to use an alternative port.
Insufficient RAM
Check your product's RAM requirements and ensure you have enough available memory.
Installation fails mid-way
Run:
cd <project-directory>
docker compose down
docker compose up -dThen manually run migrations if needed.
Roadmap
- [ ] License key validation (optional)
- [ ] Telemetry collection (opt-in)
- [ ] Rollback support
- [ ] Multiple deployment profiles (dev/staging/production)
- [ ] Service monitoring dashboard
- [ ] Backup/restore automation
- [ ] One-click updates from CLI
- [ ] Windows support
- [ ] Mobile app for monitoring
Contributing
Contributions welcome! Please read our contributing guidelines before submitting PRs.
License
MIT License - see LICENSE file for details
Support
- 📚 Documentation: https://learnfolio.com/docs/installer
- 🐛 Issues: https://github.com/learnfolio/installer/issues
- 💬 Community: https://discord.gg/learnfolio
About learnfolio
learnfolio.com - The marketplace for self-hosted platforms. Buy once, own forever, scale infinitely.
Build your empire on your terms. No subscriptions, no lock-in, complete control.
Ready to launch your own self-hosted marketplace product?
Join learnfolio.com and start selling to thousands of customers!
