Skip to content

feat: polish the install script and the progress spinner - #264

Merged
riglar merged 1 commit into
devfrom
feat/polish-install-and-progress
Oct 26, 2026
Merged

riglar merged 1 commit into
devfrom
feat/polish-install-and-progress

Conversation

@riglar

@riglar riglar commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Closes #90.

install.sh

  • A short banner, then clear stages: Resolving version → Downloading → checksum → install. These use the same ⏺ / ⎿ tree as the CLI.
  • Green ✓ for steps that worked, dim text for secondary details, a yellow ! for the shadowing-install warning, and a red ✗ error: for errors.
  • A separate "next steps" block at the end. It shows the PATH hint (when one is needed), then dcd login and dcd --help.
  • Colours are on only when the stream is a terminal. stdout and stderr are checked separately. Colours are off when NO_COLOR is set or TERM is dumb, and then the text is the same with no escape codes.
  • It stays POSIX sh (dash -n is clean) and is still wrapped in main(). The curl --progress-bar download is unchanged.

Example output (colour removed):

  dcd · DeviceCloud installer

⏺ Resolving version
  ⎿ 5.10.0 (latest stable)

⏺ Downloading dcd 5.10.0 (darwin-arm64)
  ⎿ from  https://get.devicecloud.dev/download/5.10.0/dcd-darwin-arm64
    to    ~/.dcd/bin/dcd
######################################################################## 100.0%
  ✓ Downloaded
  ✓ Checksum verified (SHA-256)
  ✓ Installed to ~/.dcd/bin/dcd

  dcd 5.10.0 is installed.

  Get started:
    dcd login    sign in to DeviceCloud
    dcd --help   see every command

Progress spinner (src/utils/progress.ts)

  • Cyan braille frames (⠋⠙⠹…) instead of clack's magenta ◒◐◓◑. Terminals without Unicode get ASCII frames.
  • No │ guide bar. The CLI is a ⏺/⎿ tree, not a clack session.
  • The spinner's last line now uses the CLI's own ✓ / ✗, not clack's ◇. The new ux.action.fail() marks a failure. The upload, Moropo and results-polling call sites now use it, and no longer put their own ✓ / ✗ in the message.
  • Title and status are joined with a dim · instead of —.
  • The CI fallback still prints one plain line per distinct status. The only change there is the ✓ / ✗ on the final line.

Testing

  • pnpm lint, pnpm typecheck and pnpm test:unit pass. The new test/unit/progress.test.ts covers the non-interactive path.
  • I ran install.sh for real under dash with output piped, under a pseudo-terminal with colour, and with NO_COLOR on a failing download.
  • I ran the spinner in a pseudo-terminal to check the frames and the final lines.

🤖 Generated with Claude Code

install.sh now prints a short banner and groups its output into stages
(resolve, download, verify, install) in the same ⏺/⎿ tree the CLI uses,
with a separate "next steps" block at the end. Colours are only used on a
real terminal, and are off with NO_COLOR or TERM=dumb. It stays POSIX sh
and wrapped in main().

The spinner now uses cyan braille frames instead of clack's magenta ones,
drops the │ guide bar, and ends with the CLI's own ✓ / ✗ symbols. A new
ux.action.fail() marks failures. The CI fallback is unchanged apart from
those symbols.

Closes #90

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Oct 26, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@riglar
riglar merged commit eb7881f into dev Oct 26, 2026
9 checks passed
@riglar
riglar deleted the feat/polish-install-and-progress branch October 26, 2026 08:50
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.

Polish the dcd install script and CLI progress loader

1 participant