RepoSense API : Repository Intelligence That Actually Works
Source: Dev.to
Overview
RepoSense is a repository‑intelligence API built by developers, for developers. It analyzes the actual codebase in your project (locally, with no sign‑ups or uploads) and generates accurate, professional documentation and marketing copy. The goal is to let you spend more time coding and less time writing READMEs, landing pages, and other promotional material.
Data Services Provided
- 🔍 Intelligent Repository Analysis – Understand the structure and purpose of your code.
- 👥 Smart Audience Detection – Identify who the project is for.
- 📝 Professional Documentation Generation – Create polished READMEs and docs.
- 🚀 Content Optimization Engine – Refine landing‑page copy and other marketing text.
- 💡 Real‑Time Project Intelligence – Get insights such as tech stack, project type, and clarity score.
API Documentation
Base URL
https://x8ki-letl-twmt.n7.xano.io/api:YIi8boXJ
Available Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/init_analysis_session | POST | Initialize a new analysis session |
/analyze_files | POST | Analyze project files with AI |
/get_project_insights | GET | Retrieve analysis results |
/generate_readme | POST | Generate a professional README |
/gemini_generate | POST | Generate optimized content (Gemini) |
Rate Limits
- General: 50 requests per minute per IP, 1 000 requests per day for analysis endpoints.
- Gemini AI: 15 requests per minute, 1 500 requests per day (free tier).
- No authentication required – the API is public for developer tools.
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