Skip to content

feat: CLI#117

Merged
monoxgas merged 9 commits into
mainfrom
feat/cli
Jul 24, 2025
Merged

feat: CLI#117
monoxgas merged 9 commits into
mainfrom
feat/cli

Conversation

@monoxgas
Copy link
Copy Markdown
Contributor

@monoxgas monoxgas commented Jul 24, 2025

CLI

Key Changes:

  • CLI interface for Dreadnode SDK with profile management
  • Enhanced API client with improved auth and config handling
  • GitHub integration for repository cloning and analysis
  • Comprehensive configuration management system

Added:

  • CLI module with main interface, API commands, and profiles
  • GitHub integration (dreadnode/cli/github.py)
  • Configuration management (dreadnode/config.py)
  • CLI documentation (docs/usage/cli.mdx)
  • Module entry point (dreadnode/main.py)
  • New dependencies: click, pydantic, GitPython

Changed:

  • API client enhanced with auth flows and error handling
  • Data models expanded with new types and validation
  • Documentation updated across SDK and usage sections
  • Tracing system improvements for CLI operations
  • Utility functions extended for file and config operations

@monoxgas monoxgas requested a review from Copilot July 24, 2025 10:08
@dreadnode-renovate-bot dreadnode-renovate-bot Bot added area/docs Changes to documentation and guides area/python Changes to Python package configuration and dependencies type/docs Documentation updates and improvements labels Jul 24, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread dreadnode/util.py Outdated
Comment thread dreadnode/cli/github.py Outdated
Comment thread dreadnode/cli/github.py
Comment thread dreadnode/config.py
Comment thread dreadnode/config.py
@dreadnode-renovate-bot dreadnode-renovate-bot Bot added the area/github Changes made to GitHub Actions label Jul 24, 2025
@monoxgas monoxgas merged commit 0f24b95 into main Jul 24, 2025
8 checks passed
@monoxgas monoxgas deleted the feat/cli branch July 24, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Changes to documentation and guides area/github Changes made to GitHub Actions area/python Changes to Python package configuration and dependencies type/docs Documentation updates and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants