feat(reasonix): add CLI with CLIProxy DeepSeek Flash defaults

Merged
SH
6d ago
+276-0

Summary

  • Install reasonix as a bun global via package.json (pinned to ^1.39.10, the newest release past the 7-day minimum-release-age).
  • Add config/reasonix: config.tpl.toml rendered by make llm-update into a cliproxy-deepseek-flash provider (__DEEPSEEK_FLASH__ via https://cliproxy.shunkakinoki.com/v1, api_key_env = "CLIPROXY_API_KEY").
  • Activation hydrate (hydrate.sh):
    • Upserts the managed provider and default_model into ~/.reasonix/config.toml, keeping other providers and settings.
    • Writes only on drift, because the rewrite drops Reasonix's inline comments.
    • Seeds the file when it is missing.
  • Mirrors CLIPROXY_API_KEY into ~/.reasonix/.env. Reasonix resolves api_key_env only from its own .env, not the process environment.
  • Add a row to MODELS.md, spec/reasonix_config_spec.sh (static + behavioral), and a coverage list entry.

Test plan

  • shellspec spec/reasonix_config_spec.sh (7 examples, 0 failures)
  • shellspec spec/coverage_spec.sh
  • shellcheck, shfmt, nixfmt
  • make nix-build and make nix-switch on galactica
  • reasonix -p "Reply with exactly: pong" returns pong through CLIProxy

Open question

  • The Reasonix desktop app rewrites ~/.reasonix/config.toml while it is running. After the hydrate ran, it dropped a desktop-added OpenRouter provider.
  • The merge itself keeps that provider (checked against Reasonix's repair/config.toml.last-known-good), so this is a race with the running app.
  • Hydrate while the app is closed, or move the managed provider somewhere the app does not own.

šŸ¤– Generated with Claude Code


Summary by cubic

Adds a reasonix CLI with CLIProxy-backed DeepSeek Flash defaults and a hydration script that merges the managed provider into the user's config instead of replacing it.

  • make llm-update renders the template, and activation upserts the cliproxy-deepseek-flash provider into ~/.reasonix/config.toml, preserving user providers and settings.
  • Writes only on drift, since rewriting drops Reasonix's inline comments; seeds the file when missing.
  • Mirrors CLIPROXY_API_KEY into ~/.reasonix/.env, because Reasonix resolves api_key_env only from its own .env.
  • Desktop provider picker entry is merged, so the provider shows up in the desktop app's model list.
  • The desktop app rewrites config.toml while running, so hydrate with the app closed to avoid clobbering desktop-added providers.