Skip to content

feat: multi-platform service setup (--setup, --service, build scripts, CI)#41

Merged
chinkan merged 21 commits into
mainfrom
feature/multi-platform-service-setup
Jun 12, 2026
Merged

feat: multi-platform service setup (--setup, --service, build scripts, CI)#41
chinkan merged 21 commits into
mainfrom
feature/multi-platform-service-setup

Conversation

@chinkan

@chinkan chinkan commented Jun 12, 2026

Copy link
Copy Markdown
Owner

What

Integrates setup wizard into rustfox --setup, adds rustfox --service for background service management across Linux/macOS/Windows, and provides build scripts + CI for release artifacts.

CLI

Command Description
rustfox --setup Opens browser-based setup wizard on :8719
rustfox --setup --cli Interactive terminal wizard
rustfox --service install Install + enable + start background service
rustfox --service remove Stop + disable + remove service
rustfox --service status Show service status
rustfox --service start/stop Start/stop without install/uninstall

Platform service support

Platform Mechanism
Linux systemd --user
macOS launchd agent
Windows sc.exe service

Build artifacts (GitHub Releases)

  • .tar.gz for Linux x86_64
  • .tar.gz for macOS aarch64 (Apple Silicon)
  • .zip for Windows x86_64
  • .deb for Linux (attached to release)

Architecture

  • Wizard extracted from src/bin/setup.rs (1163 lines) into src/setup/wizard.rsbin/setup.rs is now a 19-line thin wrapper
  • Service management in src/setup/service.rs with #[cfg(target_os = ...)] gates
  • CLI dispatch in src/setup/mod.rs (manual arg parsing, no new deps)
  • Service templates in scripts/services/ with {{MUSTACHE}} placeholders
  • Release workflow builds native targets only (no cross-compilation)

Verification

  • cargo check
  • cargo clippy -- -D warnings
  • cargo fmt --all -- --check
  • cargo test (372 pass) ✅

Design doc

Spec: docs/superpowers/specs/2026-06-12-multi-platform-service-setup-design.md
Plan: docs/superpowers/plans/2026-06-12-multi-platform-service-setup.md

chinkan added 21 commits June 12, 2026 09:47
…nstall path, release.yml, spawn_blocking, numbering)
Replaces the stub at src/setup/wizard.rs with the full implementation
migrated from src/bin/setup.rs. The wizard now lives in the rustfox
library so the main binary can reuse it via 'rustfox --setup'.

Highlights:
- Web mode: Axum server serving setup/index.html SPA on port 8719
- CLI mode: terminal-based setup prompts with defaults
- OAuth flow: MCP server discovery, PKCE, dynamic client registration,
  token exchange callback, and token polling endpoint
- Shared config parsing/formatting helpers with 14 unit tests
- Service installation delegated to setup::service::handle()

Tests: cargo test --lib setup::wizard::tests → 14 passed
@chinkan chinkan merged commit c24f0be into main Jun 12, 2026
5 checks passed
@chinkan chinkan deleted the feature/multi-platform-service-setup branch June 12, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant