Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a comprehensive CLI interface to the Dreadnode SDK, enabling authentication, profile management, and repository cloning capabilities. It enhances the API client with improved authentication flows and introduces a flexible configuration management system.
- CLI commands for authentication (
login,refresh), profile management (switch,show,forget), and repository cloning (clone) - Enhanced API client with cookie-based authentication and device flow support
- Configuration system supporting multiple server profiles with automatic credential resolution
Reviewed Changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Adds CLI dependencies (cyclopts, markdown, markdownify) and defines entry points for the CLI |
| dreadnode/main.py | Refactors main SDK class to support profile-based configuration and improved initialization |
| dreadnode/cli/ | New CLI module with main interface, profile management, GitHub integration, and API utilities |
| dreadnode/config.py | New configuration management system for user profiles and server authentication |
| dreadnode/api/client.py | Enhanced API client with cookie support, device flow authentication, and GitHub integration |
| dreadnode/constants.py | Expanded constants with default values, environment variables, and configuration paths |
| dreadnode/util.py | Added utility functions for time formatting and Docker service resolution |
Comments suppressed due to low confidence (2)
pyproject.toml:66
- [nitpick] The entry point name 'dn' might be too generic and could conflict with other packages. Consider using a more specific name like 'dreadnode-cli' or removing this shorter alias.
dreadnode = 'dreadnode.__main__:run'
dreadnode/api/client.py:91
- The header name 'X-Api-Key' is inconsistent with the casing used elsewhere in the codebase. Consider using 'X-API-Key' for consistency.
headers["X-Api-Key"] = api_key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CLI
Key Changes:
Added:
Changed: