Feat/cli - #14
Conversation
New 'djelia' command exposing languages, translate, transcribe, speak, and version. Accepts friendly language names or raw codes, reads text from stdin, and surfaces auth/config errors cleanly instead of raw tracebacks.
Add the console_scripts entry point 'djelia=djelia.cli:app' and a 'cli' extra installing typer and rich.
Rewrite the README in the official-SDK layout and add a command-line interface section covering every command.
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe pull request adds a Typer/Rich CLI for core SDK operations, configures its optional dependencies and console entry point, and replaces the workshop README with concise documentation for SDK usage, streaming, versions, errors, CLI workflows, and contribution guidance. ChangesCLI and documentation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
actor User
participant TyperCLI
participant DjeliaSDK
participant DjeliaAPI
participant RichConsole
User->>TyperCLI: invoke command and options
TyperCLI->>DjeliaSDK: resolve inputs and call SDK operation
DjeliaSDK->>DjeliaAPI: send translation, transcription, or speech request
DjeliaAPI-->>DjeliaSDK: return result or stream
DjeliaSDK-->>TyperCLI: return SDK result or chunks
TyperCLI->>RichConsole: render command output
RichConsole-->>User: display results or progress
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@djelia/cli.py`:
- Around line 309-316: Validate the stream/version combination in the CLI flow
before calling get_client() or _speak_stream: when stream is enabled with
Versions.v1, raise a clear CLI error indicating that streaming is supported only
for v2. Preserve the existing v2 streaming and non-streaming behavior.
- Line 12: Remove the unused List symbol from the typing import in cli.py, while
retaining Optional if it is still used.
In `@README.md`:
- Line 100: Update the README sentence describing synchronous and asynchronous
client equivalence to qualify streaming usage: explain that streaming examples
require async for in addition to await, while preserving the existing claim for
other examples and aligning with the following iteration example.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8a959c27-14ad-4ee7-ac98-4e6eb882606c
📒 Files selected for processing (3)
README.mddjelia/cli.pysetup.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Pull Request
Description
Adds a
djeliacommand-line interface to the SDK, built withtyperandrich, and rewrites the README to document it alongside a restyled, official-SDK-style layout.Related Issue(s)
None
Changes Made
djeliaCLI exposinglanguages,translate,transcribe,speak, andversioncommandsdjelia=djelia.cli:appconsole script entry point and acliextra (typer,rich) insetup.pyREADME.mdin the official-SDK layout, adding a full CLI section covering every commandTesting
python -m cookbook, manually exercised each CLI command against a live/staging API key)./fix-code.sh)Checklist
ruff,isort, and optionallyblack)cookbookmoduleREADME.md)python -m cookbook)ruff check .andisort . --check-only)Additional Notes
None
Tag
@sudoping01for review. Thanks for contributing to Djelia Python SDK! ❤️🇲🇱Summary by CodeRabbit
New Features
Documentation