> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tenderly.co/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Cheatsheet

> Web3 Actions को initialize, build, और deploy करने के लिए CLI commands की step-by-step guide और cheat sheet का पालन करें।

यह गाइड आपको Tenderly CLI का उपयोग करके Web3 Action project को initialize, build, और deploy करने के लिए आवश्यक commands दिखाती है।

**चरण 1: Tenderly CLI स्थापित करें**

अपने local machine पर Tenderly CLI binary को download और install करने के लिए `curl` command का उपयोग करें।

macOS पर स्थापित करें:

```bash title="example" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
curl https://raw.githubusercontent.com/Tenderly/tenderly-cli/master/scripts/install-macos.sh | sh
```

Linux पर स्थापित करें:

```bash title="example" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
curl https://raw.githubusercontent.com/Tenderly/tenderly-cli/master/scripts/install-linux.sh | sh
```

**चरण 2: CLI के माध्यम से Tenderly में Log in करें**

इस command को चलाकर अपने credentials के साथ Tenderly CLI में log in करें:

```bash title="example" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
tenderly login
```

**चरण 3: एक Web3 Actions project को Initialize करें**

एक Web3 Action project को initialize करने के लिए, यह command चलाएँ:

```bash title="example" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
tenderly actions init
```

आप दो flags के साथ default initialization settings बदल सकते हैं: root Web3 Actions folder का नाम (default: `actions`) और Action functions लिखने के लिए भाषा (default: `typescript` या `javascript`) बदलें।

```bash title="example" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
tenderly actions init --sources=actions --language=typescript
```

आपको अपने Web3 Actions को Tenderly project में जोड़ने के लिए कहा जाएगा। आप या तो एक नया project बना सकते हैं या एक मौजूदा चुन सकते हैं।

**चरण 3**: **आपको जो भी NPM dependency चाहिए वह स्थापित करें**

`tenderly init` चलाने के बाद, आपके पास एक NPM project उपलब्ध है, इसलिए आप किसी भी परिचित तरीके से आपको जो भी NPM library चाहिए उसे स्थापित कर सकते हैं।

```bash title="example" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
cd actions
npm i --save-dev axios ethers
cd ..
```

**चरण 4: Web3 Actions को Build और Deploy करें**

अपना function और trigger configuration **tenderly.yaml** में लिखने के बाद, आप Web3 Action को build और deploy करने के लिए ये commands चला सकते हैं।

```bash title="example" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
# run within the folder containing tenderly.yaml

# Build the project (optional)
tenderly actions build

# Publish the project to Tenderly without running it (start manually)
tenderly actions publish

# Deploy the project to Tenderly Runtime (or re-deploy any changes you make)
tenderly actions deploy
```

`publish` चलाने के तुरंत बाद, आपका Web3 Action Dashboard में उपलब्ध है और आपके configuration के अनुसार events के लिए listen कर रहा है।

<Note>
  आप function और trigger configuration को edit करने के बाद `publish` command चलाकर बिना किसी downtime के अपने Web3 Actions को upgrade कर सकते हैं।
</Note>

**वैकल्पिक: अपने tenderly.yaml को Validate करें**

deploy करने से पहले, आप अपने `tenderly.yaml` की संरचना और trigger configuration को locally validate कर सकते हैं। कोई login आवश्यक नहीं है।

```bash title="example" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
# Validate all projects in tenderly.yaml
tenderly actions validate

# Validate a single project only
tenderly actions validate --project username/project-slug

# Machine-readable JSON output (useful in CI pipelines)
tenderly actions validate --json
```

`--json` flag एक structured result emit करता है। जब सब कुछ मान्य होता है:

```json theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
{ "valid": true }
```

जब validation विफल होती है, तो `schema_errors` और/या `trigger_errors` शामिल किए जाते हैं (खाली होने पर omit किए जाते हैं):

```json theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
{
  "valid": false,
  "schema_errors": ["..."],
  "trigger_errors": [
    { "project": "my-org/my-project", "action": "myAction", "errors": ["..."] }
  ]
}
```

**वैकल्पिक: समर्थित features का अन्वेषण करें**

सभी समर्थित trigger types, runtimes, execution types, और intervals का machine-readable manifest देखने के लिए:

```bash title="example" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
# Print the capabilities manifest
tenderly actions capabilities

# Include the full embedded JSON Schema in the output
tenderly actions capabilities --include-schema
```

यह editor integrations और उन tools के लिए उपयोगी है जिन्हें documentation parse किए बिना यह पता लगाने की आवश्यकता है कि CLI क्या समर्थन करता है।

**वैकल्पिक: Tenderly Runtime का locally उपयोग करना**

अपने Web3 Action Functions को locally test करने के लिए [**@tenderly/actions-test**](https://github.com/Tenderly/tenderly-actions/tree/main/packages/actions-test) package स्थापित करें।

यह मानते हुए कि आप पहले से ही npm project में हैं, निम्न चलाएँ:

```bash title="example" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
npm install @tenderly/actions-test
```

<Note>
  web3-actions project के size को बढ़ाने से बचने के लिए, web3-actions के लिए tests और run scripts को actions directory के बाहर रखने की सिफारिश की जाती है।
</Note>

अधिक विवरण और उदाहरणों के लिए [Web3 Actions के local development और परीक्षण पर गाइड](/monitoring/web3-actions/references/local-development) देखें।
