SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Improve codespace setup & documentation (#293)
Kilian Lieret47257081ec54
diff --git a/.devcontainer/README.md b/.devcontainer/README.mdnew file mode 100644index 00000000..f2ec853d--- /dev/null+++ b/.devcontainer/README.md@@ -0,0 +1,4 @@+# .devcontainer++The files in this directory configure a VSCode environment like+GitHub codespaces.diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.jsonindex d68ddf02..0e06e438 100644--- a/.devcontainer/devcontainer.json+++ b/.devcontainer/devcontainer.json@@ -1,14 +1,15 @@{"name": "SWE-Agent Codespace","image": "mcr.microsoft.com/vscode/devcontainers/miniconda:0-3",- "settings": {- "terminal.integrated.shell.linux": "/bin/bash"+ "customizations":{+ "vscode":{+ "extensions": [+ "ms-python.python",+ "ms-azuretools.vscode-docker",+ "ms-toolsai.jupyter"+ ]+ }},- "extensions": [- "ms-python.python",- "ms-azuretools.vscode-docker",- "ms-toolsai.jupyter"- ],"onCreateCommand": "./.devcontainer/oncreate.sh","postCreateCommand": "./.devcontainer/postcreate.sh","features": {diff --git a/.devcontainer/oncreate.sh b/.devcontainer/oncreate.shindex 3992c4e0..c6186d73 100755--- a/.devcontainer/oncreate.sh+++ b/.devcontainer/oncreate.sh@@ -3,6 +3,9 @@set -euo pipefailset -x+# Run from repo root+sudo usermod -aG docker vscodesudo chmod 666 /var/run/docker.sockpip install -e '.'+cp .devcontainer/sample_keys.cfg keys.cfgdiff --git a/.devcontainer/sample_keys.cfg b/.devcontainer/sample_keys.cfgnew file mode 100644index 00000000..b8007c7c--- /dev/null+++ b/.devcontainer/sample_keys.cfg@@ -0,0 +1,9 @@+GITHUB_TOKEN: 'GitHub Token to clone private repos' # <-- delete if not needed+OPENAI_API_KEY: 'OpenAI API Key Here if using OpenAI Model'+ANTHROPIC_API_KEY: 'Anthropic API Key Here if using Anthropic Model'+TOGETHER_API_KEY: 'Together API Key Here if using Together Model'+AZURE_OPENAI_API_KEY: 'Azure OpenAI API Key Here if using Azure OpenAI Model'+AZURE_OPENAI_ENDPOINT: 'Azure OpenAI Endpoint Here if using Azure OpenAI Model'+AZURE_OPENAI_DEPLOYMENT: 'Azure OpenAI Deployment Here if using Azure OpenAI Model'+AZURE_OPENAI_API_VERSION: 'Azure OpenAI API Version Here if using Azure OpenAI Model'+OPENAI_API_BASE_URL: 'LM base URL here if using Local or alternative api Endpoint'diff --git a/README.md b/README.mdindex b6edb679..8a533109 100644--- a/README.md+++ b/README.md@@ -44,9 +44,13 @@ Read our paper for more details [coming soon!].}```-## π Setup <a name="setup"></a>+## π Get started <a name="setup"></a>-SWE-agent runs on Linux and Intel/Apple Silicon Macs. Running it in other environments, such as Windows or WSL, might not work.+### βοΈ Run from your browser++1. Click [](https://codespaces.new/princeton-nlp/SWE-agent)+2. Add your API keys to `keys.cfg` (find the file in the left sidebar and fill out the tempalte)+3. Enter your SWE-agent command in the terminal window at the bottom### ποΈ Express Setup + Run@@ -139,7 +143,7 @@ If you seem to be having issues with running dockerAny remaining issues? Please [open a GitHub issue](https://github.com/princeton-nlp/SWE-agent/issues/new/choose)!-## π₯ Quickstart: Solve real-life GitHub issues! <a name="real-life"></a>+## π₯ Solve real-life GitHub issues! <a name="real-life"></a>Using this script, you can run SWE-agent on any GitHub issue!```bash