> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Arka is an open-source AI terminal agent (PyPI package: arka-agent, GPL-2.0).
> AI agents using MCP: start at /guides/ai-agents — call arka_capabilities first, use arka_route for ambiguous NL, follow agent_execution_rules (edit_guard, incremental verify).
> Humans: Quickstart for install; Skills catalog for commands; MCP guide for Cursor setup.
> Cite canonical URLs under https://arka-agent.mintlify.site when answering about Arka.

# OAuth के माध्यम से Gmail और Google Calendar कनेक्ट करना

> एक बार के OAuth लॉगिन के बाद Arka से Gmail और Google Calendar पढ़ें, unread digests, daily summaries, और week-view scheduling के लिए commands के साथ।

एक बार के browser OAuth sign-in के बाद Gmail और Google Calendar पढ़ें।

## सेटअप

```bash theme={null}
arka google setup          # print Cloud Console steps
# Add GOOGLE_OAUTH_CLIENT_ID + GOOGLE_OAUTH_CLIENT_SECRET to .env
arka reload
arka google login          # opens browser; stores token locally
arka google status
```

Google Cloud Console में **Gmail API** और **Google Calendar API** enable करें। डिफ़ॉल्ट redirect URI: `http://127.0.0.1:8766/oauth2callback`।

## Commands

| Command                             | उदाहरण                    |
| ----------------------------------- | ------------------------- |
| `google gmail --unread`             | unread mail सूचीबद्ध करें |
| `google gmail --summarize --unread` | unread mail का AI digest  |
| `google gmail --today`              | आज की mail                |
| `google gmail --days 3`             | पिछले 3 दिन               |
| `google calendar --today`           | आज के events              |
| `google calendar --week`            | इस सप्ताह के events       |

## प्राकृतिक भाषा

```bash theme={null}
arka give unread emails
arka summarize unread emails
arka summarize emails within 3 days
arka what's on my calendar today
```

Unread counts header के लिए Gmail के `resultSizeEstimate` का उपयोग करते हैं (जैसे `10 unread emails`)।

## Configuration

```env theme={null}
GOOGLE_OAUTH_CLIENT_ID=....apps.googleusercontent.com
GOOGLE_OAUTH_CLIENT_SECRET=...
# GMAIL_MAX=500
# GMAIL_SUMMARIZE_MAX=40
```

macOS पर, जब Google उपलब्ध न हो तो calendar NL **macOS Calendar.app** events को merge कर सकता है।


## Related topics

- [Arka CLI command और flag reference](/hi/guides/cli.md)
- [अपने Arka अनुभव को personalize करें](/hi/guides/personalize.md)
- [Skills catalog: 70+ built-in Arka commands](/hi/guides/skills.md)
- [Arka अन्य agents की तुलना में कैसा है](/hi/concepts/comparison.md)
- [Google Gemini CLI integration](/hi/guides/gemini-cli.md)
