Skip to content

Phase 9: Update CLI default API URL and backward compatibility #330

Closed

Description

@neuromechanist

Parent Epic

#314

Goal

Update the CLI to use api.nemar.org as the default API URL, with backward compatibility for existing users.

Current State

  • DEFAULT_API_URL = "https://api.osc.earth/nemar" in src/lib/api.ts and src/lib/config.ts
  • Users have apiUrl stored in ~/.config/nemar/config.json
  • IS_DEV_BUILD flag checks for workers.dev in URL

Tasks

  • Update DEFAULT_API_URL to https://api.nemar.org in src/lib/api.ts
  • Update DEFAULT_API_URL in src/lib/config.ts
  • Update hardcoded URL in src/commands/auth.ts (line 146)
  • Add config migration: detect old api.osc.earth/nemar in stored config and auto-update
  • Update IS_DEV_BUILD detection logic if needed
  • Bump CLI version (minor bump - breaking change)
  • Update CLI update check to strongly recommend upgrade
  • Test fresh install with new URL
  • Test upgrade path from old config

Depends On

Notes

  • This is the breaking change that triggers the minor version bump
  • Fix update check cold-start bug #312 (update check fix) should ship first so users see the upgrade prompt
  • Consider a grace period where both URLs work

Activity

  1. added
    infrastructure
    on Mar 21, 2026
  2. neuromechanist commented on Apr 25, 2026

    @neuromechanist
    ContributorAuthor

    Phase 9 complete (code-side). PR #352 merged as dc42f4d on dev. CLI now defaults to https://api.nemar.org with a silent migration shim for stored configs at the legacy URL. Manual test against the live SCCN backend confirmed: whoami auth + dataset list both succeed, and the migration shim end-to-end test rewrote a hand-flipped legacy URL on the next CLI launch. The release-bump (0.8.0) and PR dev->main for npm 'latest' tag are tracked separately; this issue captures the code work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructure

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions