Opencode Client

C+ 76 completed
Library
cli / python · small
76
Files
10,334
LOC
1
Frameworks
3
Languages

Pipeline State

completed
Run ID
#346390
Phase
done
Progress
1%
Started
Finished
2026-04-13 01:31:02
LLM tokens
0

Pipeline Metadata

Stage
Skipped
Decision
skip_scaffold_dup
Novelty
42.67
Framework unique
Isolation
Last stage change
2026-04-16 18:15:42
Deduplication group #47941
Member of a group with 1 similar repo(s) — canonical #9446 view group →
Top concepts (2)
Project DescriptionTesting
Repobility — the code-quality scanner for AI-generated software · https://repobility.com

AI Prompt

Create a modern, type-safe Python Command Line Interface (CLI) client library to interact with an OpenCode server. The client needs to support both asynchronous and synchronous usage patterns. Key features must include: handling connection to both local and remote servers, supporting Server-Sent Events (SSE) for streaming responses, and providing methods for simple questioning (`ask`), streaming questions (`ask_stream`), and managing sessions. It should utilize Pydantic v2 for data modeling and include built-in CLI tools for quick querying and file operations.
python cli asyncio pydantic sse client-library command-line type-checking
Generated by gemma4:latest

Catalog Information

A modern Python client library that simplifies communication with an OpenCode server.

Description

The library provides a clean, type‑safe interface for interacting with an OpenCode server from Python code. It wraps HTTP requests, automatically serializes and validates responses using Pydantic models, and offers a rich command‑line output via the Rich library. Developers can quickly call API endpoints, handle errors, and display results in a readable format without writing boilerplate code. It targets Python developers who need to integrate OpenCode functionality into scripts, tools, or CI pipelines, solving the pain of manual request handling and data validation.

الوصف

يُقدّم هذا المكتبة واجهة برمجية حديثة بلغة بايثون للتفاعل مع خادم OpenCode. تُسهل المكتبة إرسال الطلبات إلى الخادم واستقبال الردود مع التحقق من صحة البيانات باستخدام نماذج Pydantic. تُدمج مكتبة Rich لتوفير عرض بصري جذاب للنتائج في سطر الأوامر، ما يتيح للمطورين رؤية تقارير مفصلة بسرعة. تُستخدم المكتبة في سيناريوهات تطوير البرمجيات حيث يحتاج المطورون إلى دمج وظائف OpenCode في أدواتهم أو خطوط العمل الخاصة بهم. تحل المشكلة التي يواجهها المطورون في كتابة كود يدوي للتعامل مع API، وتقلل الأخطاء الناتجة عن عدم التحقق من صحة البيانات. تميزها هو الجمع بين سهولة الاستخدام، التحقق القوي للبيانات، والواجهة البصرية المتقدمة، ما يجعلها خياراً مفضلاً للمشاريع التي تتطلب تفاعلاً مستمراً مع OpenCode.

Novelty

5/10

Tags

api-client cli-integration data-validation rich-output python-library opencode-server

Technologies

click pydantic rich

Claude Models

claude-opus-4.6

Quality Score

C+
76.0/100
Structure
71
Code Quality
100
Documentation
80
Testing
40
Practices
65
Security
92
Dependencies
60

Strengths

  • Code linting configured (ruff (possible))
  • Consistent naming conventions (snake_case)
  • Low average code complexity \u2014 well-structured code
  • Good security practices \u2014 no major issues detected

Weaknesses

  • No LICENSE file \u2014 legal ambiguity for contributors
  • No CI/CD configuration \u2014 manual testing and deployment
  • 441 duplicate lines detected \u2014 consider DRY refactoring

Recommendations

  • Set up CI/CD (GitHub Actions recommended) to automate testing and deployment
  • Add a LICENSE file (MIT recommended for open source)

Security & Health

4.1h
Tech Debt (A)
A
OWASP (100%)
PASS
Quality Gate
A
Risk (1)
Repobility · severity-and-effort ranking · https://repobility.com
MIT
License
9.5%
Duplication
Full Security Report AI Fix Prompts SARIF SBOM

Languages

python
88.3%
markdown
7.7%
toml
4.1%

Frameworks

pytest

Concepts (2)

Findings curated by Repobility · https://repobility.com
CategoryNameDescriptionConfidence
Repobility — same analyzer, your code, free for public repos · /scan/
auto_descriptionProject Description![Python](https://www.python.org/) ![Pydantic](https://docs.pydantic.dev/) ![License](LICENSE)80%
auto_categoryTestingtesting70%

Quality Timeline

1 quality score recorded.

View File Metrics

Embed Badge

Add to your README:

![Quality](https://repos.aljefra.com/badge/70462.svg)
Quality BadgeSecurity Badge
Export Quality CSVDownload SBOMExport Findings CSV