> ## Documentation Index
> Fetch the complete documentation index at: https://exosphere-auto-translate-docs-20260623-1106.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# शुरुआत करें

> failproofai इंस्टॉल करें, policies सक्षम करें, और अपने agents को विश्वसनीयता से चलाएं

## आवश्यकताएं

* **Node.js** >= 20.9.0
* **Bun** >= 1.3.0 (वैकल्पिक - केवल source से build करने के लिए आवश्यक)

***

## इंस्टॉलेशन

<CodeGroup>
  ```bash npm theme={null}
  npm install -g failproofai
  ```

  ```bash bun theme={null}
  bun add -g failproofai
  ```
</CodeGroup>

***

## त्वरित शुरुआत

<Steps>
  <Step title="Policies सक्षम करें">
    Policies वे नियम हैं जो प्रत्येक agent tool call से पहले और बाद में चलते हैं। वे destructive commands, secret leakage, और अन्य failure modes को नुकसान पहुंचाने से पहले रोक देते हैं।

    ```bash theme={null}
    failproofai policies --install
    ```

    यह आपके installed agent CLIs में hook entries लिखता है (Claude Code का `~/.claude/settings.json`, OpenAI Codex का `~/.codex/hooks.json`, GitHub Copilot CLI का `~/.copilot/hooks/failproofai.json`, Cursor Agent का `~/.cursor/hooks.json`, OpenCode का generated plugin shim `~/.config/opencode/plugins/failproofai.mjs` और `~/.config/opencode/opencode.json` के `plugin` array में एक registration entry, Pi का `~/.pi/agent/settings.json`, या Gemini CLI का `~/.gemini/settings.json`)। जब एक से अधिक मौजूद हों तो आपसे पूछा जाएगा; prompt को छोड़ने के लिए `--cli claude codex copilot cursor opencode pi gemini` (किसी भी subset) पास करें।

    GitHub Copilot CLI, Cursor Agent, OpenCode, Pi, और Gemini CLI support **beta** में हैं — `--cli copilot`, `--cli cursor`, `--cli opencode`, `--cli pi`, या `--cli gemini` के साथ इंस्टॉल करें।

    ```bash theme={null}
    failproofai policies --install --scope project
    failproofai policies --install --cli codex --scope project
    failproofai policies --install --cli copilot --scope project
    failproofai policies --install --cli cursor --scope project
    failproofai policies --install --cli opencode --scope project
    failproofai policies --install --cli pi --scope project
    failproofai policies --install --cli gemini --scope project
    failproofai policies --install block-sudo block-rm-rf sanitize-api-keys
    ```
  </Step>

  <Step title="सत्यापित करें">
    ```bash theme={null}
    failproofai policies
    ```

    हर policy, चाहे वह सक्षम है या नहीं, और किसी भी configured parameters को दिखाता है।
  </Step>

  <Step title="Dashboard लॉन्च करें">
    ```bash theme={null}
    failproofai
    ```

    `http://localhost:8020` पर एक local dashboard खोलता है जहां आप sessions browse कर सकते हैं, tool calls inspect कर सकते हैं, और policies manage कर सकते हैं।
  </Step>

  <Step title="अपने agent को चलाएं">
    Claude Code को सामान्य रूप से शुरू करें। अगर agent कुछ risky करने की कोशिश करता है, तो failproofai इसे स्वचालित रूप से intercept करता है। इसे unattended चलाएं और dashboard में समीक्षा करें कि क्या हुआ।
  </Step>
</Steps>

***

## Policies कैसे काम करती हैं

जब भी एक agent एक tool चलाता है, Claude Code failproofai को एक subprocess के रूप में कॉल करता है:

```text theme={null}
Claude Code  →  failproofai --hook PreToolUse  →  stdin JSON पढ़ता है
                                                 policies का मूल्यांकन करता है
                                                 stdout को decision लिखता है
```

प्रत्येक policy तीन decisions में से एक लौटाता है:

* **allow** - agent सामान्य रूप से आगे बढ़ता है
* **deny** - action को block किया जाता है, agent को बताया जाता है कि क्यों
* **instruct** - extra context agent के prompt में जोड़ा जाता है

<Note>
  Policies आपकी local process में चलती हैं। कुछ भी किसी remote service को नहीं भेजा जाता है।
</Note>

***

## Convention-based policies के साथ team policies सेट अप करें

अपनी team में quality standards स्थापित करने का सबसे तेज़ तरीका `.failproofai/policies/` convention है। इस directory में policy files डालें और वे स्वचालित रूप से load हो जाते हैं — कोई flags नहीं, कोई config changes नहीं, कोई install commands नहीं।

<Steps>
  <Step title="Policies directory बनाएं">
    ```bash theme={null}
    mkdir -p .failproofai/policies
    ```
  </Step>

  <Step title="Policy files जोड़ें">
    Starter examples copy करें या अपने स्वयं के बनाएं:

    ```bash theme={null}
    cp node_modules/failproofai/examples/convention-policies/*.mjs .failproofai/policies/
    ```

    या एक नया बनाएं:

    ```js theme={null}
    // .failproofai/policies/team-policies.mjs
    import { customPolicies, allow, deny, instruct } from "failproofai";

    customPolicies.add({
      name: "test-before-commit",
      match: { events: ["PreToolUse"] },
      fn: async (ctx) => {
        if (ctx.toolName !== "Bash") return allow();
        if (/git\s+commit/.test(ctx.toolInput?.command ?? "")) {
          return instruct("Commit से पहले tests चलाएं।");
        }
        return allow();
      },
    });
    ```
  </Step>

  <Step title="Git को commit करें">
    ```bash theme={null}
    git add .failproofai/policies/
    git commit -m "Team quality policies जोड़ें"
    ```

    हर team member जिसके पास failproofai इंस्टॉल है ये policies स्वचालित रूप से उठाता है। कोई per-developer setup की आवश्यकता नहीं है।
  </Step>
</Steps>

<Tip>
  अपने repo में `.failproofai/policies/` commit करें ताकि पूरी team एक ही standards share करे। जैसे-जैसे आपकी team नए failure modes की खोज करती है, policies जोड़ें और push करें — हर किसी को अपने अगले `git pull` पर update मिल जाता है। समय के साथ ये policies एक living quality standard बन जाती हैं जो likepostulate में सुधार होता रहता है।
</Tip>

***

## Data storage

सभी configuration और logs आपकी machine पर रहते हैं:

| Path                                      | क्या store किया जाता है             |
| ----------------------------------------- | ----------------------------------- |
| `~/.failproofai/policies-config.json`     | Global policy config                |
| `~/.failproofai/hook-activity.jsonl`      | Hook execution history              |
| `~/.failproofai/hook.log`                 | Custom hook errors के लिए debug log |
| `.failproofai/policies-config.json`       | Per-project config (committed)      |
| `.failproofai/policies-config.local.json` | Personal overrides (gitignored)     |

***

## Uninstalling

```bash theme={null}
failproofai policies --uninstall
```

`~/.claude/settings.json` से hook entries को remove करता है। `~/.failproofai/` में config files को रखा जाता है।

***

## अगले कदम

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/hi/configuration">
    Scopes और config file format
  </Card>

  <Card title="Built-in policies" icon="shield" href="/hi/built-in-policies">
    सभी 26 policies with parameters
  </Card>

  <Card title="Custom policies" icon="code" href="/hi/custom-policies">
    JavaScript में अपनी स्वयं की policies लिखें
  </Card>

  <Card title="Agent monitor" icon="chart-line" href="/hi/dashboard">
    Sessions को monitor करें और policy activity की समीक्षा करें
  </Card>
</CardGroup>
