v0.4.2 - nself-org/cli GitHub Wiki

nself cli v0.4.2

Release Date: January 18, 2026 Focus: Service & Monitoring Management


Overview

v0.4.2 adds 6 new service management commands that complete the optional services layer of nself. These commands provide full control over email, search, serverless functions, ML experiment tracking, and monitoring - all with smart defaults that work out of the box.

New Commands

Command Purpose
nself email Email service configuration, testing, SMTP pre-flight checks
nself search Search engine management (6 engines supported)
nself functions Serverless functions deployment with TypeScript support
nself mlflow MLflow experiment tracking and model management
nself metrics Prometheus/metrics configuration and profiles
nself monitor Dashboard access and real-time CLI monitoring

Features

Email Command (nself email)

Comprehensive email service management with 16+ provider support.

Commands:

  • nself email - Show current configuration
  • nself email setup - Interactive setup wizard
  • nself email list - List all supported providers
  • nself email configure <provider> - Configure specific provider
  • nself email validate - Validate configuration
  • nself email check - SMTP pre-flight connection test
  • nself email test [email] - Send test email
  • nself email docs [provider] - Show provider documentation

Supported Providers:

  • Transactional: SendGrid, Mailgun, Postmark, Amazon SES
  • Marketing: Mailchimp Transactional, SparkPost
  • Enterprise: Microsoft 365, Google Workspace
  • Infrastructure: Mailjet, Sendinblue (Brevo), SMTP2GO
  • Self-Hosted: Custom SMTP, Mailu, Mail-in-a-Box
  • Development: MailPit (default), Mailhog, Mailtrap

Pre-flight Check (nself email check):

  • DNS resolution verification
  • TCP connectivity test
  • SMTP banner response check
  • TLS certificate validation

Search Command (nself search)

Multi-engine search with 6 backend options.

Commands:

  • nself search enable <engine> - Enable search with specified engine
  • nself search disable - Disable search service
  • nself search status - Show current configuration
  • nself search test - Test search functionality
  • nself search index - Manage search indices
  • nself search docs - Show engine documentation

Supported Engines:

Engine Best For Memory
PostgreSQL FTS Built-in, zero config Uses DB memory
MeiliSearch Typo-tolerant, instant 256MB - 1GB
Typesense Fast, typo-tolerant 256MB - 512MB
Elasticsearch Full-featured, complex queries 1GB - 4GB
OpenSearch AWS-compatible, enterprise 1GB - 4GB
Sonic Minimal memory, basic search 64MB - 128MB

Functions Command (nself functions)

Serverless function deployment with JavaScript and TypeScript support.

Commands:

  • nself functions create <name> - Create new function
  • nself functions deploy [target] - Deploy functions (local/production)
  • nself functions list - List all functions
  • nself functions logs [name] - View function logs
  • nself functions test [name] - Test function endpoint
  • nself functions delete <name> - Delete function

Function Templates:

  • basic - Simple HTTP handler
  • webhook - Webhook processing with signature verification
  • api - REST API endpoint with CRUD operations
  • scheduled - Cron-scheduled background tasks

TypeScript Support:

# Create TypeScript function
nself functions create my-api --template api --ts

# Deploy with validation
nself functions deploy validate
nself functions deploy local
nself functions deploy production

MLflow Command (nself mlflow)

ML experiment tracking and model management integration.

Commands:

  • nself mlflow enable - Enable MLflow
  • nself mlflow disable - Disable MLflow
  • nself mlflow status - Show configuration
  • nself mlflow open - Open MLflow UI
  • nself mlflow test - Test API connectivity
  • nself mlflow experiments [action] - Manage experiments
  • nself mlflow runs [experiment] - List experiment runs

Experiments Subcommands:

nself mlflow experiments list              # List all experiments
nself mlflow experiments create "My Exp"   # Create new experiment
nself mlflow experiments delete 1          # Delete experiment by ID

Runs Listing:

nself mlflow runs                          # List runs from default
nself mlflow runs 1                        # List runs from experiment 1
nself mlflow runs "My Experiment"          # List runs by name

Metrics Command (nself metrics)

Monitoring stack configuration with 3 profile levels.

Commands:

  • nself metrics enable [profile] - Enable monitoring
  • nself metrics disable - Disable monitoring
  • nself metrics status - Show current configuration
  • nself metrics profile [name] - Manage profiles
  • nself metrics configure - Interactive configuration

Monitoring Profiles:

Profile Services Memory Use Case
minimal 4 ~500MB Development, low resource
standard 7 ~1GB Production basics
full 10 ~2GB Enterprise, full observability
auto Varies Varies Automatic based on environment

Profile Services:

  • minimal: Prometheus, Grafana, cAdvisor, Node Exporter
  • standard: + Loki, Promtail, Alertmanager
  • full: + Tempo, Postgres Exporter, Redis Exporter

Monitor Command (nself monitor)

Real-time monitoring dashboards and CLI views.

Commands:

  • nself monitor - Open Grafana (default)
  • nself monitor dashboard - Open Grafana
  • nself monitor prometheus - Open Prometheus UI
  • nself monitor loki - Open Loki in Grafana Explore
  • nself monitor alerts - Open Alertmanager UI
  • nself monitor services - CLI service status view
  • nself monitor resources - CLI resource usage view
  • nself monitor logs [service] - Tail service logs

CLI Views:

# Real-time service health
nself monitor services

# Container resource usage
nself monitor resources

# Live log streaming
nself monitor logs hasura

Technical Improvements

Cross-Platform Compatibility

All 6 commands are fully compatible with:

  • macOS (Bash 3.2, BSD tools)
  • Linux (Bash 4+, GNU tools)
  • WSL (Windows Subsystem for Linux)

Fixes Applied:

  • Replaced all echo -e with printf for portable colored output
  • Replaced all sed -i.bak with safe_sed_inline() wrapper
  • Added platform-compat.sh sourcing to all commands

Unit Tests

New test suite with 92 tests covering:

  • File existence checks
  • Function definition verification
  • Provider/engine support validation
  • Cross-platform compatibility checks (no echo -e, no Bash 4+ features)

Run Tests:

bash src/tests/unit/test-services.sh

Documentation

Complete documentation for all 6 commands:


Upgrade Instructions

From v0.4.1

This is a feature release with no breaking changes:

nself update

Or manually:

cd /path/to/nself
git pull origin main

New Environment Variables

Variable Default Description
AUTH_SMTP_HOST mailpit SMTP server hostname
AUTH_SMTP_PORT 1025 SMTP server port
AUTH_SMTP_SECURE true Use TLS
SEARCH_ENGINE postgres Search engine selection
MONITORING_PROFILE auto Monitoring profile level

Testing Verification

All changes verified on:

  • Ubuntu 22.04 (Bash 5.1, GNU tools)
  • macOS (Bash 3.2, BSD tools)
  • CI Pipeline (92/92 unit tests passing)

Known Issues

No known issues in v0.4.2.


Roadmap

v0.4.3 (Next)

  • Database operations command (nself db)
  • Backup/restore commands
  • Production deployment enhancements

v0.4.4 and Beyond

  • Scaling commands
  • Performance profiling
  • Multi-environment migration

Full Changelog

See CHANGELOG.md for complete history.

⚠️ **GitHub.com Fallback** ⚠️