When to use this skill
ALWAYS use this skill when the user mentions:
- CLI arguments for a Tauri app / CLI arguments for a Tauri app
- Schema-based argument parsing / Schema-based argument parsing
- Triggering app behaviors from CLI / Triggering app behaviors from CLI
Trigger phrases include:
- "cli", "arguments", "schema", "command routing"
- "command line", "arguments", "schema", "command routing"
How to use this skill
- Define the CLI argument schema and command map
- Configure CLI plugin capabilities and parsing
- Route startup and second-launch arguments to the app
- Validate CLI behaviors with single-instance mode
Outputs
- CLI schema and routing plan / CLI schema and routing plan
- Second-launch integration checklist / Second-launch integration checklist
Scope
- Boundary: CLI plugin usage only
- Key points: Schema definition and argument routing
References
- https://v2.tauri.app/llms.txt
- https://v2.tauri.app/plugin/cli/
- https://v2.tauri.app/zh-cn/plugin/cli/
Keywords
tauri cli, arguments, schema, command routing
Common Gotchas (Gotchas)
- Version compatibility: Pay attention to compatibility between the framework version and dependency libraries; APIs may differ across versions
- Configuration file format: Configuration file format errors are the most common issue; it is recommended to use the editor's syntax checking
- Environment variables: Ensure all necessary environment variables are set correctly, and do not hardcode sensitive information
- Dependency conflicts: When multiple versions coexist, watch out for dependency conflicts; use a lock file to pin versions
- Performance pitfalls: Pay attention to performance optimization in large-data scenarios, and avoid common issues such as N+1 queries
Usage workflow
Step 1: Environment preparation
Ensure the necessary dependencies and tools are installed in the development environment.
Step 2: Configuration initialization
Perform basic configuration according to project requirements.
Step 3: Core functionality usage
Implement the core functionality according to the example code.
Step 4: Test verification
Run tests to ensure the functionality works properly.
Step 5: Deployment and release
After development is complete, proceed with deployment and monitoring.