Skip to content

feat(cli): ensure safe execution without @latest and omit @latest from marketing #1720

Description

@yamcodes

This was generated by AI during triage.

Problem Summary

Marketing copy and documentation currently specify npx arkenv@latest init (e.g., in the hero and outro install panels on the homepage). Omitting @latest (simplifying to npx arkenv init) looks cleaner and is standard across developer tools (e.g., create-next-app, create-turbo).

However, npx caches packages locally in the user's cache directory without automatically fetching the newest version when @latest is omitted. If a user runs npx arkenv init today and executes it again 6 months later, npx may execute the stale, cached CLI version instead of the latest release.

Current Behavior

  • Documentation and marketing copy use npx arkenv@latest init.
  • The CLI does not perform runtime version freshness checks or detect if it is running from an outdated local npx cache.

Desired Behavior

  1. CLI Version Freshness Check / Update Mechanism:
    • Investigate best practices used by leading CLIs (e.g., Next.js, Turbo, Vite, Astro, shadcn).
    • Implement a safe, lightweight check in the CLI (e.g., background registry ping with timeout, warning prompt when running a stale version, or recommending/spawning the latest version).
  2. Clean Marketing Copy:
    • Safely drop @latest across homepage components (apps/www/components/page/install-panel.tsx), documentation MDX files, and READMEs to standardize on npx arkenv init.

Acceptance Criteria

  • Research competitor/industry standard patterns for npx caching mitigation and document findings.
  • Implement a non-blocking / fail-open version check in the arkenv CLI that informs the user if their executed CLI version is outdated when invoked via npx.
  • Update website hero/outro install pills (apps/www/components/page/install-panel.tsx) and copy to npx arkenv init.
  • Update getting started and reference docs to use npx arkenv init.
  • Unit/integration tests covering the version check / updater logic with offline / network-error fallbacks.

Out of Scope

  • Blocking offline executions if npm registry is unreachable (checks must fail open / gracefully degrade).
  • Modifying how global installations (npm i -g arkenv) are managed beyond standard update notices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @arkenv/cliIssues or Pull Requests involving the ArkEnv CLIarkenvChanges to the `arkenv` npm package.enhancementNew feature or improvementmarketingRelated to marketing, press, advertising, and user acquisitionready for agentFully specified, ready for immediate implementationwwwImprovements or additions to arkenv.js.org

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions