cli_kit 1.0.0 copy "cli_kit: ^1.0.0" to clipboard
cli_kit: ^1.0.0 copied to clipboard

Shared CLI utilities — logging/spinners, process runners, downloads, and host privilege helpers.

cli_kit #

Shared CLI utilities used by xcross and related tools: status-line logging, process runners, downloads with progress, and host privilege helpers.

Install #

dart pub add cli_kit

Usage #

import 'package:cli_kit/cli_kit.dart';

Log.logInfo('Device', 'iPhone 15 Pro');
await Log.logStep('Building', () async {
  await ProcessRunner.runChecked('echo', ['ok']);
});

await Downloader.downloadToFile(
  'https://example.com/file.bin',
  File('file.bin'),
  label: 'file.bin',
);

// POSIX: cache a sudo ticket. Windows: require an elevated shell.
await HostPrivileges.ensureDeviceToolAccess();

API surface #

Type Role
Log / Step / Glyph Status lines, spinners, verbose traces
ProcessRunner UTF-8 process run/capture, which, polling
Downloader HTTP download to file/string with retries
HostPrivileges / Sudo Device-tool elevation on POSIX and Windows
CliError User-facing error (message only, no stack)

Part of the xcross monorepo.

0
likes
145
points
30
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Shared CLI utilities — logging/spinners, process runners, downloads, and host privilege helpers.

Repository (GitHub)
View/report issues

Topics

#cli #logging #process

License

MIT (license)

Dependencies

cli_util, meta, path, posix, pure

More

Packages that depend on cli_kit