Skip to content

Conversation

@joryeugene
Copy link

Overview

This PR enhances the usability of the SWE-bench agent by implementing a proper Python package structure and adding the ability to install the agent CLI globally. These changes make the tool more accessible and align with standard Python project practices.

Changes

  1. Package Structure Improvements:

    • Created a proper swebench_system package with __init__.py
    • Moved CLI functionality into the package structure
    • Added explicit package declarations in pyproject.toml
  2. Global CLI Installation:

    • Added entry point in pyproject.toml for the agent-cli command
    • Created an install_globally.sh script that:
      • Sets up a wrapper script that activates the virtual environment
      • Installs the wrapper to /usr/local/bin to make it available in PATH
      • Handles permissions and environment activation automatically
  3. Import Path Handling:

    • Added proper import path resolution in the CLI module
    • Ensured compatibility with the existing codebase structure

Motivation

As a new user of the SWE-bench agent, I found myself wanting to use the CLI from different directories without having to navigate to the project folder each time. The standard approach for Python tools is to make them globally accessible via CLI commands, which this PR implements.

This change improves developer experience by:

  1. Following Python packaging best practices
  2. Reducing friction when using the agent in different projects
  3. Making the tool more accessible to new users
  4. Providing a clear installation path for global usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant