Skip to content

feat(cli): devbase scale をトップレベルショートカットとして追加#9

Merged
takemi-ohama merged 1 commit into
mainfrom
feat-devbase-scale-shortcut
May 13, 2026
Merged

feat(cli): devbase scale をトップレベルショートカットとして追加#9
takemi-ohama merged 1 commit into
mainfrom
feat-devbase-scale-shortcut

Conversation

@takemi-ohama
Copy link
Copy Markdown
Contributor

概要

devbase container scale <N> のショートカットとして devbase scale <N> でも同等に動作するようにした。

up / down / login / build / ps と同様、頻繁に使うコンテナサブコマンドをトップレベルから直接呼び出せるようにする。

関連 Issue

  • Closes #

変更点

  • lib/devbase/cli.py
    • SHORTCUTS'scale': ('container', 'scale') を追加
    • トップレベル scale パーサを追加(new_scale positional 引数を受ける)
    • _expand_argv のプレフィックス展開対象コマンド一覧に scale を追加
    • --help の Shortcuts セクションに scale を表示
  • bin/devbase
    • bash ラッパーの resolve_command のコマンド一覧に scale を追加
    • dispatch の case 文に scale を追加して Python 実装へ委譲

動作確認

  • devbase scale --help がヘルプを表示する
  • devbase container scale --help が従来通り動作する
  • devbase scale <N> で実際にスケール変更が動作する(既存の cmd_scale を呼ぶだけなので回帰なし想定)
  • CI が green である

補足

dispatch は既存の SHORTCUTS 機構をそのまま利用しており、args.subcommand = 'scale' をセットして cmd_container に委譲する。new_scale 引数は shortcut パーサ側で定義しているため cmd_scale 側の変更は不要。

devbase container scale だけでなく devbase scale でも同等動作するようにした。

- lib/devbase/cli.py: SHORTCUTS / トップレベルパーサ / プレフィックス展開対象 / ヘルプに scale を追加
- bin/devbase: bash ラッパーの許可コマンド一覧に scale を追加
@takemi-ohama takemi-ohama merged commit e5f3f35 into main May 13, 2026
5 checks passed
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