RepoSense API : 실제로 작동하는 저장소 인텔리전스

발행: (2025년 12월 15일 오후 05:00 GMT+9)
5 min read
원문: Dev.to

Source: Dev.to

Overview

RepoSense는 개발자를 위해, 개발자가 만든 저장소‑인텔리전스 API입니다. 프로젝트의 실제 코드베이스를 (로컬에서, 회원가입이나 업로드 없이) 분석하고 정확하고 전문적인 문서와 마케팅 카피를 생성합니다. 목표는 READMEs, 랜딩 페이지, 기타 홍보 자료를 작성하는 데 드는 시간을 줄이고 코딩에 더 많은 시간을 할애하도록 돕는 것입니다.

Data Services Provided

  • 🔍 Intelligent Repository Analysis – 코드의 구조와 목적을 이해합니다.
  • 👥 Smart Audience Detection – 프로젝트의 대상자를 식별합니다.
  • 📝 Professional Documentation Generation – 깔끔한 README와 문서를 생성합니다.
  • 🚀 Content Optimization Engine – 랜딩 페이지 카피 및 기타 마케팅 텍스트를 다듬습니다.
  • 💡 Real‑Time Project Intelligence – 기술 스택, 프로젝트 유형, 명료도 점수와 같은 인사이트를 제공합니다.

API Documentation

Base URL

https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ

Available Endpoints

EndpointMethodPurpose
/init_analysis_sessionPOST새로운 분석 세션 초기화
/analyze_filesPOSTAI를 사용해 프로젝트 파일 분석
/get_project_insightsGET분석 결과 조회
/generate_readmePOST전문적인 README 생성
/gemini_generatePOST최적화된 콘텐츠 생성 (Gemini)

Rate Limits

  • General: IP당 분당 50건, 분석 엔드포인트는 하루 1 000건.
  • Gemini AI: 분당 15건, 하루 1 500건 (무료 티어).
  • 인증이 필요하지 않으며, API는 개발자 도구를 위해 공개되어 있습니다.

Usage Guide

Windows (PowerShell)

# 1. Initialize Session
$initResponse = Invoke-RestMethod -Uri "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/init_analysis_session" `
    -Method POST -ContentType "application/json" `
    -Body '{"project_path": ".", "project_name": "My Project"}'
$sessionToken = $initResponse.session_token
Write-Host "Session Token: $sessionToken"

# 2. Analyze Files (example with package.json)
$packageContent = Get-Content "package.json" -Raw -ErrorAction SilentlyContinue
if ($packageContent) {
    $body = @{
        session_token = $sessionToken
        files = @(
            @{
                path    = "package.json"
                content = $packageContent
            }
        )
    } | ConvertTo-Json -Depth 3

    Invoke-RestMethod -Uri "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/analyze_files" `
        -Method POST -ContentType "application/json" -Body $body
}

# 3. Get Project Insights
$insights = Invoke-RestMethod -Uri "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/get_project_insights?session_token=$sessionToken" `
    -Method GET
$insights | ConvertTo-Json -Depth 3

# 4. Generate README
$readme = Invoke-RestMethod -Uri "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/generate_readme" `
    -Method POST -ContentType "application/json" `
    -Body (@{session_token = $sessionToken; template_style = "professional"} | ConvertTo-Json)
Write-Host $readme.readme_content

# 5. Generate Optimized Content (Gemini)
$optimized = Invoke-RestMethod -Uri "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/gemini_generate" `
    -Method POST -ContentType "application/json" `
    -Body (@{
        content_type   = "landing"
        project_context = "My awesome project"
        current_content = "Welcome to my project"
    } | ConvertTo-Json)
Write-Host $optimized

Linux/macOS (Bash)

# 1. Initialize Session
SESSION_RESPONSE=$(curl -s -X POST "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/init_analysis_session" \
  -H "Content-Type: application/json" \
  -d '{"project_path": ".", "project_name": "My Project"}')
SESSION_TOKEN=$(echo $SESSION_RESPONSE | grep -o '"session_token":"[^"]*' | cut -d'"' -f4)
echo "Session Token: $SESSION_TOKEN"

# 2. Analyze Files (example with package.json)
if [ -f "package.json" ]; then
  PACKAGE_CONTENT=$(cat package.json | tr -d '\n' | sed 's/"/\\"/g')
  curl -s -X POST "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/analyze_files" \
    -H "Content-Type: application/json" \
    -d "{
      \"session_token\": \"$SESSION_TOKEN\",
      \"files\": [{
        \"path\": \"package.json\",
        \"content\": \"$PACKAGE_CONTENT\"
      }]
    }"
fi

# 3. Get Project Insights
curl -s -X GET "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/get_project_insights?session_token=$SESSION_TOKEN" | jq '.'

# 4. Generate README
curl -s -X POST "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/generate_readme" \
  -H "Content-Type: application/json" \
  -d "{\"session_token\": \"$SESSION_TOKEN\", \"template_style\": \"professional\"}" | jq -r '.readme_content'

# 5. Generate Optimized Content (Gemini)
curl -s -X POST "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/gemini_generate" \
  -H "Content-Type: application/json" \
  -d '{"content_type": "landing", "project_context": "My awesome project", "current_content": "Welcome to my project"}'

Complete Workflow Script

Windows PowerShell (Full Script)

# RepoSense API Complete Workflow
Write-Host "🚀 Starting RepoSense API Analysis..." -ForegroundColor Green

# 1. Initialize Session
$projectName = Split-Path -Leaf (Get-Location)
$initResponse = Invoke-RestMethod -Uri "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/init_analysis_session" `
    -Method POST -ContentType "application/json" `
    -Body (@{project_path = "."; project_name = $projectName} | ConvertTo-Json)
$sessionToken = $initResponse.session_token
Write-Host "✅ Session created: $sessionToken" -ForegroundColor Yellow

# 2. Analyze Files
$files = @()
if (Test-Path "package.json") {
    $files += @{path = "package.json"; content = Get-Content "package.json" -Raw}
}
if (Test-Path "README.md") {
    $files += @{path = "README.md"; content = Get-Content "README.md" -Raw}
}
if ($files.Count -gt 0) {
    Write-Host "📁 Analyzing $($files.Count) files..." -ForegroundColor Blue
    Invoke-RestMethod -Uri "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/analyze_files" `
        -Method POST -ContentType "application/json" `
        -Body (@{session_token = $sessionToken; files = $files} | ConvertTo-Json -Depth 3)
}

# 3. Get Insights
Write-Host "💡 Getting project insights..." -ForegroundColor Blue
$insights = Invoke-RestMethod -Uri "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/get_project_insights?session_token=$sessionToken" `
    -Method GET
Write-Host "Project Type: $($insights.project_type)" -ForegroundColor Cyan
Write-Host "Tech Stack: $($insights.tech_stack -join ', ')" -ForegroundColor Cyan
Write-Host "Clarity Score: $($insights.clarity_score)/100" -ForegroundColor Cyan

# 4. Generate README
Write-Host "📝 Generating README..." -ForegroundColor Blue
$readme = Invoke-RestMethod -Uri "https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ/generate_readme" `
    -Method POST -ContentType "application/json" `
    -Body (@{session_token = $sessionToken; template_style = "professional"} | ConvertTo-Json)
$readme.readme_content | Out-File -FilePath "README_generated.md" -Encoding UTF8
Write-Host "✅ README saved to README_generated.md" -ForegroundColor Green

Write-Host "🎉 Analysis complete!" -ForegroundColor Green
Back to Blog

관련 글

더 보기 »

Figma 액세스 토큰 만들기

Forem 개요 !Forem 로고 https://media2.dev.to/dynamic/image/width=65,height=,fit=scale-down,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws...