Skip to content

feat(cli): Replace btw info subcommands with btw commands#195

Merged
gadenbuie merged 6 commits into
mainfrom
refactor/cli
May 14, 2026
Merged

feat(cli): Replace btw info subcommands with btw commands#195
gadenbuie merged 6 commits into
mainfrom
refactor/cli

Conversation

@gadenbuie
Copy link
Copy Markdown
Collaborator

  • btw info platformbtw system-info
  • btw info packagesbtw check-installed and btw installed-packages
❯ btw --help
Usage: btw [OPTIONS] <COMMAND>

Describe R objects, documentation, and workspace state in LLM-friendly text.
Wraps btw package tools for docs, pkg, info, and cran operations.

Commands:
  docs                Access R documentation
  pkg                 Work with an R package under development
  info                [Deprecated] Inspect the R session and environment
  system-info         Show platform and R session info
  check-installed     Check if packages are installed
  installed-packages  Show installed package versions
  cran                Query CRAN package metadata
  skills              Manage btw skills
  help                Show btw CLI usage guide for AI agents
  app                 Run btw_app() in the current directory

Options:
  --version / --no-version  Print btw version and exit. [default: false]
                            Enable with `--version`.

For help with a specific command, run: `btw <command> --help`.

gadenbuie added 5 commits May 14, 2026 09:36
…stalled-packages

- btw system-info: replaces btw info platform
- btw check-installed <pkgs>: replaces btw info packages --check; exits 0 by
  default regardless of install status, --fail for non-zero exit on missing
  packages; --json returns array with package/version/installed fields
- btw installed-packages <pkgs>: replaces btw info packages; requires explicit
  package names
- btw info: deprecated stub that prints migration guidance and exits 1
- btw_json_output: add null = "null" to toJSON call
…ackages

- Replace btw info tests with tests for new top-level commands
- Add deprecation test for btw info
- Add btw check-installed exit code tests (0 by default, 1 with --fail)
- Add btw check-installed --json null version for not-installed package
- Update btw --help snapshot
- btw_check_installed: use extra[["installed"]] <- TRUE instead of c() to
  avoid duplication if upstream adds installed to extra
- btw_check_installed: route not-installed messages to stderr for consistency
  and to avoid corrupting stdout when piping --json output
- btw_installed_packages: remove redundant pkgs alias
@gadenbuie gadenbuie merged commit 1a2e187 into main May 14, 2026
9 checks passed
@gadenbuie gadenbuie deleted the refactor/cli branch May 14, 2026 14:47
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.

1 participant