Skip to content

feat: add direct command activation#632

Draft
risu729 wants to merge 4 commits into
mainfrom
feat/direct-command-activation
Draft

feat: add direct command activation#632
risu729 wants to merge 4 commits into
mainfrom
feat/direct-command-activation

Conversation

@risu729
Copy link
Copy Markdown
Owner

@risu729 risu729 commented May 16, 2026

Fixes #209.

Summary

  • add [direct] config for allowed direct command shims, exact per-command biwa run defaults, install directory, and local-command preference
  • add argv0-based direct command dispatch for configured shim names
  • expose shell activation as biwa activate --shell <bash|zsh|fish>
  • move diagnostics to biwa activate doctor and shim creation to biwa activate install [--force]
  • treat direct.default_args as biwa run options, so commands that do not depend on synced files can default to options such as --skip-sync
  • resolve unset direct.bin_dir from the platform/XDG data directory while preserving explicit config and env overrides
  • regenerate schema, usage, CLI docs, and init snapshots
  • add unit and SSH e2e coverage for direct command activation and default-arg sync behavior

Follow-up

Verification

  • mise run render:schema
  • mise run test:update-snapshot
  • mise run check:oxfmt
  • mise run test
  • LINT=true mise run check

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 16, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
biwa-docs db675f0 Commit Preview URL

Branch Preview URL
May 19 2026, 01:36 AM

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces "Direct Commands," a feature that allows users to execute remote commands via shell shims without explicitly using the biwa run command. It adds a new activate subcommand to manage these shims and generate shell integration scripts for Bash, Zsh, and Fish. The configuration is expanded with a direct section to define allowed commands and shim behavior. Feedback from the review suggests optimizing performance by avoiding redundant configuration loading and regex recompilation. Additionally, a bug was identified in the regex splitting logic used for shim materialization, which fails to correctly handle escaped pipe characters.

Comment thread src/cli/activate.rs Outdated
Comment thread src/cli/activate.rs Outdated
Comment thread src/cli/activate.rs Outdated
@risu729 risu729 force-pushed the feat/direct-command-activation branch 2 times, most recently from 73af993 to 1d8be45 Compare May 16, 2026 20:49
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

❌ Patch coverage is 59.78648% with 113 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.91%. Comparing base (7e848bd) to head (db675f0).
⚠️ Report is 279 commits behind head on main.

Files with missing lines Patch % Lines
src/cli/activate.rs 56.93% 90 Missing ⚠️
src/config/load.rs 55.55% 8 Missing ⚠️
src/cli/mod.rs 53.84% 6 Missing ⚠️
src/cli/run.rs 81.48% 5 Missing ⚠️
src/config/types.rs 71.42% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #632      +/-   ##
==========================================
+ Coverage   41.28%   48.91%   +7.63%     
==========================================
  Files          16       26      +10     
  Lines         671     2349    +1678     
==========================================
+ Hits          277     1149     +872     
- Misses        394     1200     +806     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@risu729 risu729 force-pushed the feat/direct-command-activation branch from bff6997 to db675f0 Compare May 19, 2026 01:36
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.

feat(cli): activation shims for direct remote commands

1 participant