Skip to main content

add-cli-argument

Add or change a ModelExpress client CLI argument or environment variable. Use whenever touching ClientArgs, ClientConfig::load(), the Cli struct, or envs.rs/envs.py.

ソース情報

リポジトリ
ai-dynamo/modelexpress
ソースの最終更新活動
2026年9月4日 20:06
検出された SKILL.md の言語
英語
スター
179
フォーク
92

インストール方法

デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。

ソースファイルを確認

インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。

SKILL.md を表示中

SKILL.md
ソースの指示 · 読み取り専用プレビュー
name
add-cli-argument
description
Add or change a ModelExpress client CLI argument or environment variable. Use whenever touching ClientArgs, ClientConfig::load(), the Cli struct, or envs.rs/envs.py.
# Adding CLI Arguments Client CLI arguments are defined in a shared struct to avoid duplication: 1. **Add to `ClientArgs`** in `modelexpress_common/src/client_config.rs` - Single source of truth for shared arguments - Register the variable name in `modelexpress_common/src/envs.rs` and reference the constant: `#[arg(long, env = crate::envs::MODEL_EXPRESS_...)]` (never a bare string literal, so the CLI and the `envs` getters cannot drift). All env-var names live in `modelexpress_common/src/envs.rs` (Rust) and `modelexpress/envs.py` (Python). - Do NOT use `-v` short flag (reserved for CLI's verbose) 2. **Update `ClientConfig::load()`** in the same file - Add override logic in the "APPLY CLI ARGUMENT OVERRIDES" section 3. **Do NOT duplicate in `Cli`** (`modelexpress_client/src/bin/modules/args.rs`) - `Cli` embeds `ClientArgs` via `#[command(flatten)]` - Only add CLI-specific arguments there (e.g., `--format`, `--verbose`) 4. **Add tests** in the `tests` module of `client_config.rs`
GitHubで見る