Skip to content
cosmodev ~/tools/code-explainer

AI 코드 설명 도구

AI & Agents

코드 조각을 붙여넣으면 LLM이 쉬운 언어로 설명해 드립니다 — 초보자, 개발자, 전문가 수준 중 선택 — 무료 Groq 키를 직접 사용해 브라우저에서 바로.

Detected: text · input capped at 12000 characters

예:

이 도구는 여러분의 무료 API 키로 Groq를 호출합니다 — 이 브라우저에 한 번만 저장하면 됩니다:

Your key stays in this browser (localStorage) and is sent only to api.groq.com — never to CosmoDev servers. Get a free Groq key

코드를 붙여넣고 설명을 누르면 해설이 표시돼요.

(문서는 영어)

AI Code Explainer

What it does

Explains a pasted code snippet in plain language, at the depth you pick: Beginner (no jargon, one analogy, step by step), Developer (what it does, the flow, the patterns, the pitfalls), or Expert (invariants, complexity, edge cases — the things a reviewer would flag). The tool detects the language first (Go, Rust, Python, SQL, TypeScript, JavaScript, CSS, HTML) and tells the model, so the explanation starts from the right place.

This is an AI Studio tool: it calls the model directly from your browser with your own free Groq API key. Nothing passes through CosmoDev servers, and we store nothing.

How to use

  1. Save your free Groq API key once — the panel keeps it in this browser’s localStorage. Get a key at console.groq.com/keys.
  2. Paste a snippet (up to 12,000 characters — longer inputs are truncated).
  3. Pick a depth: Beginner, Developer, or Expert.
  4. Press Explain code, then copy the result.

The hint under the input shows the detected language as you paste.

Examples

Input with depth = Developer:

msgs := []string{"a", "b"}
for i, m := range msgs {
    fmt.Println(i, m)
}

Output (abridged): creates a slice of two strings, iterates with range which yields index and value per iteration, prints each pair — the idiomatic Go replacement for a C-style loop.

With depth = Beginner the same snippet is explained without words like “slice” or “range” being assumed — what they mean comes first.

Good to know

  • Key custody: your key lives only in this browser (localStorage, namespaced cosmodev:aistudio.groq) and is sent only to api.groq.com as a request header — never to CosmoDev, never in a URL. The key panel has a Remove key button that wipes it.
  • Free tier: Groq’s free tier makes this genuinely free — see /ai-studio for every BYO-key tool and your key status.
  • Rate limits: if Groq rate-limits the call (HTTP 429), the tool stops and shows the error with a manual Retry button — it never retries automatically.
  • Detection is cheap: language detection is keyword heuristics, not a parser — it only steers the prompt. If it says the wrong language, the model usually recovers; you can also just trust the explanation.
  • Privacy: your code goes only from your browser to Groq. CosmoDev has no backend in the path — the same egress model as every AI Studio tool. Still, don’t paste secrets.
소스 코드14개 언어

Runs in your browser · your snippet goes straight to api.groq.com using YOUR key (BYO). CosmoDev has no backend in the path and stores nothing. 도움이 되었나요? 팀원에게 공유해 보세요.