webiny-cli-extensions
यह क्या करती है
यह स्किल आपके AI को Webiny कमांड-लाइन टूल के लिए नए कमांड बनाने में मदद करती है। यह उन डेवलपर्स के लिए है जो अपनी स्क्रिप्ट प्रोजेक्ट के CLI के ज़रिए चलाना चाहते हैं।
कब इस्तेमाल करें
- ✓जब आपको डेटा माइग्रेशन या कंटेंट एक्सपोर्ट के लिए कस्टम कमांड चाहिए।
- ✓जब आपको Webiny CLI के अंदर कोड जेनरेटर या deployment सहायक चाहिए।
- ✓जब आप ऐसा हेल्थ चेक कमांड चाहते हों जो टर्मिनल पर साफ़ आउटपुट दे।
Skill का लिंक
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/cli-extensions/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“एक Webiny CLI कमांड जोड़िए जो सभी ब्लॉग एंट्री को एक JSON फ़ाइल में एक्सपोर्ट करे।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल एक कमांड क्लास समझाती है, जिसमें नाम, विवरण, टाइप्ड पैरामीटर और एक handler होता है। handler एक टर्मिनल helper से संदेश छापता है, और कमांड कॉन्फ़िगरेशन फ़ाइल में रजिस्टर होता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
CLI Extensions
TL;DR
Add custom commands to the Webiny CLI using the CliCommandFactory pattern. Define a class implementing CliCommandFactory.Interface<TParams>, specify command name, description, params, and handler, then export with CliCommandFactory.createImplementation(). Register in webiny.config.tsx via <Cli.Command>.
The CliCommandFactory Pattern
// extensions/MyCustomCommand.ts
import { Ui } from "webiny/cli";
import { CliCommandFactory } from "webiny/cli/command";
export interface IMyCustomCommandParams {
name: string;
}
class MyCustomCommandImpl implements CliCommandFactory.Interface<IMyCustomCommandParams> {
constructor(private ui: Ui.Interface) {}
execute(): CliCommandFactory.CommandDefinition<IMyCustomCommandParams> {
return {
name: "my-custom-command",
description: "This is my custom command",
examples: ["$0 my-custom-command test1", "$0 my-custom-command test2"],
params: [
{
name: "name",
description: "Your name",
type: "string"
}
],
handler: async params => {
this.ui.info("Starting my custom command...");
this.ui.emptyLine();
this.ui.success(`Hello, ${params.name}! This is my custom command.`);
}
};
}
}
export default CliCommandFactory.createImplementation({
implementation: MyCustomCommandImpl,
dependencies: [Ui]
});
Register in webiny.config.tsx (YOU MUST include the .ts file extension in the src prop — omitting it will cause a build failure):
<Cli.Command src={"/extensions/MyCustomCommand.ts"} />
Run it:
yarn webiny my-custom-command "World"
Command Definition Properties
| Property | Type | Description |
|---|---|---|
name |
string |
The command name used on the CLI (e.g., "my-custom-command") |
description |
string |
Help text shown when listing commands |
examples |
string[] |
Usage examples ($0 is replaced with the CLI binary name) |
params |
ParamDefinition[] |
Positional parameters and options |
handler |
(params: TParams) => Promise<void> |
The function that executes the command |
Parameter Definition
Each param in the params array:
| Property | Type | Description |
|---|---|---|
name |
string |
Parameter name (matches the key in your TParams interface) |
description |
string |
Help text for this parameter |
type |
"string" | "number" | "boolean" |
Parameter value type |
The Ui Service
Inject Ui for formatted terminal output:
import { Ui } from "webiny/cli";
| Method | Description |
|---|---|
this.ui.info("message") |
Print an info message (blue) |
this.ui.success("message") |
Print a success message (green) |
this.ui.warning("message") |
Print a warning message (yellow) |
this.ui.error("message") |
Print an error message (red) |
this.ui.emptyLine() |
Print a blank line for spacing |
Use Cases
- Data migrations -- Scripts to migrate or seed CMS data
- Code generators -- Generate boilerplate extension files
- Deployment scripts -- Custom deployment workflows
- Data exports -- Export CMS content to files
- Health checks -- Verify infrastructure or API status
Quick Reference
Import: import { CliCommandFactory } from "webiny/cli/command";
Ui import: import { Ui } from "webiny/cli";
Interface: CliCommandFactory.Interface<TParams>
Definition: CliCommandFactory.CommandDefinition<TParams>
Export: CliCommandFactory.createImplementation({ implementation, dependencies })
Registe
अक्सर पूछे जाने वाले सवाल
कमांड कैसे रजिस्टर होता है?
webiny कॉन्फ़िगरेशन फ़ाइल में एक command सेटिंग से।
पैरामीटर कैसे परिभाषित होते हैं?
हर पैरामीटर का एक नाम, विवरण और टाइप होता है।
कमांड आउटपुट कैसे दिखाता है?
एक टर्मिनल helper के ज़रिए, जो जानकारी, सफलता संदेश और खाली लाइनें छापता है।
जानकारी
लेखक का मूल विवरण
Adding custom commands to the Webiny CLI using CliCommandFactory. Use this skill when the developer wants to create a custom CLI command, add a data migration script, build a code generator, create deployment scripts, export CMS content, or add health check commands. Covers CliCommandFactory.Interface, command definition, typed parameters, the Ui service for terminal output, and registration via <Cli.Command>.
repo: webiny/webiny-js
लोकप्रियता
- GitHub स्टार
- 8.1k
- रैंकिंग में स्थान
- #12593
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
prd-to-plan
8.1kयह आपके एजेंट को प्रोडक्ट आवश्यकताओं के दस्तावेज़ को छोटे, एंड-टू-एंड स्लाइस की चरणबद्ध योजना में बदलने में मदद करती है, जो Markdown फ़ाइल में सहेजी जाती है।
webiny-admin-architect
8.1kयह आपके एजेंट को Webiny प्लेटफ़ॉर्म के लिए एडमिन स्क्रीन बनाना सिखाती है, उसकी बिज़नेस लॉजिक परतों और presenter पैटर्न का उपयोग करके।
webiny-admin-permissions
8.1kयह आपके एजेंट को Webiny एडमिन स्क्रीन में अनुमति नियंत्रण जोड़ना सिखाती है, जिसमें अपने-आप बनने वाले अनुमति फ़ॉर्म और दिखाने-छिपाने की जाँच शामिल हैं।
webiny-form-model
8.1kयह आपके एजेंट को Webiny में declarative field builder, layouts, validation और शर्त वाले नियमों से फ़ॉर्म बनाना सिखाती है।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।