Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Pythagora-io/gpt-pilot
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 19989fbd5b6750ab3246b18cc4802025e758b97e
Choose a base ref
..
head repository: Pythagora-io/gpt-pilot
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a5d3231c6e0c08627e61f6652de830b38bea0e6c
Choose a head ref
Showing with 9,991 additions and 963 deletions.
  1. +1 −0 .gitignore
  2. +168 −0 Dockerfile
  3. +13 −35 README.md
  4. +136 −0 config-docker.json
  5. +24 −25 core/agents/architect.py
  6. +20 −3 core/agents/base.py
  7. +60 −47 core/agents/bug_hunter.py
  8. +15 −38 core/agents/code_monkey.py
  9. +46 −11 core/agents/developer.py
  10. +7 −2 core/agents/executor.py
  11. +297 −0 core/agents/frontend.py
  12. +165 −0 core/agents/git.py
  13. +1 −1 core/agents/human_input.py
  14. +1 −1 core/agents/legacy_handler.py
  15. +102 −3 core/agents/mixins.py
  16. +56 −24 core/agents/orchestrator.py
  17. +52 −55 core/agents/spec_writer.py
  18. +5 −1 core/agents/task_completer.py
  19. +113 −68 core/agents/tech_lead.py
  20. +75 −35 core/agents/troubleshooter.py
  21. +2 −0 core/cli/helpers.py
  22. +85 −7 core/cli/main.py
  23. +27 −9 core/config/__init__.py
  24. +32 −0 core/config/magic_words.py
  25. +1 −1 core/db/alembic.ini
  26. +34 −0 core/db/migrations/versions/f708791b9270_adding_knowledge_base_field_to_.py
  27. +54 −4 core/db/models/project_state.py
  28. +0 −13 core/db/session.py
  29. +61 −46 core/llm/anthropic_client.py
  30. +1 −1 core/llm/base.py
  31. +52 −1 core/llm/parser.py
  32. +4 −2 core/proc/process_manager.py
  33. +7 −3 core/prompts/bug-hunter/iteration.prompt
  34. +10 −4 core/prompts/bug-hunter/log_data.prompt
  35. +13 −12 core/prompts/code-monkey/implement_changes.prompt
  36. +22 −3 core/prompts/developer/breakdown.prompt
  37. +2 −0 core/prompts/developer/filter_files.prompt
  38. +31 −7 core/prompts/developer/parse_task.prompt
  39. +3 −17 core/prompts/executor/ran_command.prompt
  40. +40 −0 core/prompts/frontend/build_frontend.prompt
  41. +115 −0 core/prompts/frontend/system.prompt
  42. +1 −0 core/prompts/partials/breakdown_code_instructions.prompt
  43. +6 −2 core/prompts/partials/coding_rules.prompt
  44. +3 −3 core/prompts/partials/features_list.prompt
  45. +35 −1 core/prompts/partials/file_naming.prompt
  46. +7 −2 core/prompts/partials/files_descriptions.prompt
  47. +17 −4 core/prompts/partials/files_list.prompt
  48. +24 −3 core/prompts/partials/files_list_relevant.prompt
  49. +12 −6 core/prompts/partials/filter_files_actions.prompt
  50. +4 −15 core/prompts/partials/project_details.prompt
  51. +18 −9 core/prompts/partials/project_tasks.prompt
  52. +1 −1 core/prompts/partials/relative_paths.prompt
  53. +7 −0 core/prompts/pythagora/commit.prompt
  54. +1 −1 core/prompts/spec-writer/ask_questions.prompt
  55. +8 −1 core/prompts/spec-writer/prompt_complexity.prompt
  56. +19 −1 core/prompts/tech-lead/epic_breakdown.prompt
  57. +2 −0 core/prompts/tech-lead/filter_files.prompt
  58. +2 −0 core/prompts/tech-lead/filter_files_loop.prompt
  59. +7 −2 core/prompts/tech-lead/plan.prompt
  60. +0 −61 core/prompts/tech-lead/update_plan.prompt
  61. +52 −23 core/prompts/troubleshooter/define_user_review_goal.prompt
  62. +1 −1 core/prompts/troubleshooter/filter_files.prompt
  63. +1 −1 core/prompts/troubleshooter/filter_files_loop.prompt
  64. +6 −3 core/prompts/troubleshooter/iteration.prompt
  65. +159 −6 core/state/state_manager.py
  66. +7 −7 core/telemetry/__init__.py
  67. +4 −0 core/templates/base.py
  68. +91 −0 core/templates/info/vite_react/summary.tpl
  69. +2 −2 core/templates/javascript_react.py
  70. +9 −6 core/templates/registry.py
  71. +21 −3 core/templates/render.py
  72. +56 −0 core/templates/tree/add_raw_tags.py
  73. +57 −61 core/templates/tree/react_express/ui/pages/Login.jsx
  74. +7 −0 core/templates/tree/vite_react/.gitignore
  75. +23 −0 core/templates/tree/vite_react/client/components.json
  76. +31 −0 core/templates/tree/vite_react/client/eslint.config.js
  77. +13 −0 core/templates/tree/vite_react/client/index.html
  78. +81 −0 core/templates/tree/vite_react/client/package.json
  79. +9 −0 core/templates/tree/vite_react/client/postcss.config.js
  80. BIN core/templates/tree/vite_react/client/public/favicon.ico
  81. +45 −0 core/templates/tree/vite_react/client/src/App.css
  82. +26 −0 core/templates/tree/vite_react/client/src/App.tsx
  83. +67 −0 core/templates/tree/vite_react/client/src/api/api.ts
  84. +44 −0 core/templates/tree/vite_react/client/src/api/auth.ts
  85. +13 −0 core/templates/tree/vite_react/client/src/components/Footer.tsx
  86. +35 −0 core/templates/tree/vite_react/client/src/components/Header.tsx
  87. +19 −0 core/templates/tree/vite_react/client/src/components/Layout.tsx
  88. +15 −0 core/templates/tree/vite_react/client/src/components/ProtectedRoute.tsx
  89. +59 −0 core/templates/tree/vite_react/client/src/components/ui/accordion.tsx
  90. +144 −0 core/templates/tree/vite_react/client/src/components/ui/alert-dialog.tsx
  91. +62 −0 core/templates/tree/vite_react/client/src/components/ui/alert.tsx
  92. +8 −0 core/templates/tree/vite_react/client/src/components/ui/aspect-ratio.tsx
  93. +53 −0 core/templates/tree/vite_react/client/src/components/ui/avatar.tsx
  94. +39 −0 core/templates/tree/vite_react/client/src/components/ui/badge.tsx
  95. +118 −0 core/templates/tree/vite_react/client/src/components/ui/breadcrumb.tsx
  96. +59 −0 core/templates/tree/vite_react/client/src/components/ui/button.tsx
  97. +67 −0 core/templates/tree/vite_react/client/src/components/ui/calendar.tsx
  98. +82 −0 core/templates/tree/vite_react/client/src/components/ui/card.tsx
  99. +263 −0 core/templates/tree/vite_react/client/src/components/ui/carousel.tsx
  100. +368 −0 core/templates/tree/vite_react/client/src/components/ui/chart.tsx
  101. +31 −0 core/templates/tree/vite_react/client/src/components/ui/checkbox.tsx
  102. +14 −0 core/templates/tree/vite_react/client/src/components/ui/collapsible.tsx
  103. +154 −0 core/templates/tree/vite_react/client/src/components/ui/command.tsx
  104. +201 −0 core/templates/tree/vite_react/client/src/components/ui/context-menu.tsx
  105. +125 −0 core/templates/tree/vite_react/client/src/components/ui/dialog.tsx
  106. +121 −0 core/templates/tree/vite_react/client/src/components/ui/drawer.tsx
  107. +201 −0 core/templates/tree/vite_react/client/src/components/ui/dropdown-menu.tsx
  108. +181 −0 core/templates/tree/vite_react/client/src/components/ui/form.tsx
  109. +32 −0 core/templates/tree/vite_react/client/src/components/ui/hover-card.tsx
  110. +72 −0 core/templates/tree/vite_react/client/src/components/ui/input-otp.tsx
  111. +25 −0 core/templates/tree/vite_react/client/src/components/ui/input.tsx
  112. +27 −0 core/templates/tree/vite_react/client/src/components/ui/label.tsx
  113. +239 −0 core/templates/tree/vite_react/client/src/components/ui/menubar.tsx
  114. +131 −0 core/templates/tree/vite_react/client/src/components/ui/navigation-menu.tsx
  115. +120 −0 core/templates/tree/vite_react/client/src/components/ui/pagination.tsx
  116. +32 −0 core/templates/tree/vite_react/client/src/components/ui/popover.tsx
  117. +31 −0 core/templates/tree/vite_react/client/src/components/ui/progress.tsx
  118. +45 −0 core/templates/tree/vite_react/client/src/components/ui/radio-group.tsx
  119. +48 −0 core/templates/tree/vite_react/client/src/components/ui/resizable.tsx
  120. +49 −0 core/templates/tree/vite_react/client/src/components/ui/scroll-area.tsx
  121. +163 −0 core/templates/tree/vite_react/client/src/components/ui/select.tsx
  122. +32 −0 core/templates/tree/vite_react/client/src/components/ui/separator.tsx
  123. +143 −0 core/templates/tree/vite_react/client/src/components/ui/sheet.tsx
  124. +764 −0 core/templates/tree/vite_react/client/src/components/ui/sidebar.tsx
  125. +18 −0 core/templates/tree/vite_react/client/src/components/ui/skeleton.tsx
  126. +29 −0 core/templates/tree/vite_react/client/src/components/ui/slider.tsx
  127. +34 −0 core/templates/tree/vite_react/client/src/components/ui/sonner.tsx
  128. +30 −0 core/templates/tree/vite_react/client/src/components/ui/switch.tsx
  129. +120 −0 core/templates/tree/vite_react/client/src/components/ui/table.tsx
  130. +56 −0 core/templates/tree/vite_react/client/src/components/ui/tabs.tsx
  131. +25 −0 core/templates/tree/vite_react/client/src/components/ui/textarea.tsx
  132. +73 −0 core/templates/tree/vite_react/client/src/components/ui/theme-provider.tsx
  133. +40 −0 core/templates/tree/vite_react/client/src/components/ui/theme-toggle.tsx
  134. +130 −0 core/templates/tree/vite_react/client/src/components/ui/toast.tsx
  135. +36 −0 core/templates/tree/vite_react/client/src/components/ui/toaster.tsx
  136. +62 −0 core/templates/tree/vite_react/client/src/components/ui/toggle-group.tsx
  137. +48 −0 core/templates/tree/vite_react/client/src/components/ui/toggle.tsx
  138. +33 −0 core/templates/tree/vite_react/client/src/components/ui/tooltip.tsx
  139. +70 −0 core/templates/tree/vite_react/client/src/contexts/AuthContext.tsx
  140. +19 −0 core/templates/tree/vite_react/client/src/hooks/useMobile.tsx
  141. +192 −0 core/templates/tree/vite_react/client/src/hooks/useToast.ts
  142. +71 −0 core/templates/tree/vite_react/client/src/index.css
  143. +9 −0 core/templates/tree/vite_react/client/src/lib/utils.ts
  144. +13 −0 core/templates/tree/vite_react/client/src/main.tsx
  145. +104 −0 core/templates/tree/vite_react/client/src/pages/Login.tsx
  146. +105 −0 core/templates/tree/vite_react/client/src/pages/Register.tsx
  147. +4 −0 core/templates/tree/vite_react/client/src/vite-env.d.ts
  148. +92 −0 core/templates/tree/vite_react/client/tailwind.config.js
  149. +35 −0 core/templates/tree/vite_react/client/tsconfig.app.json
  150. +16 −0 core/templates/tree/vite_react/client/tsconfig.json
  151. +27 −0 core/templates/tree/vite_react/client/tsconfig.node.json
  152. +20 −0 core/templates/tree/vite_react/client/vite.config.ts
  153. +20 −0 core/templates/tree/vite_react/package.json
  154. +7 −0 core/templates/tree/vite_react/server/.env
  155. +47 −0 core/templates/tree/vite_react/server/config/database.js
  156. +55 −0 core/templates/tree/vite_react/server/models/User.js
  157. +29 −0 core/templates/tree/vite_react/server/models/init.js
  158. +35 −0 core/templates/tree/vite_react/server/package.json
  159. +128 −0 core/templates/tree/vite_react/server/routes/authRoutes.js
  160. +13 −0 core/templates/tree/vite_react/server/routes/index.js
  161. +21 −0 core/templates/tree/vite_react/server/routes/middleware/auth.js
  162. +64 −0 core/templates/tree/vite_react/server/server.js
  163. +72 −0 core/templates/tree/vite_react/server/services/llmService.js
  164. +108 −0 core/templates/tree/vite_react/server/services/userService.js
  165. +16 −0 core/templates/tree/vite_react/server/utils/auth.js
  166. +46 −0 core/templates/tree/vite_react/server/utils/password.js
  167. +136 −0 core/templates/vite_react.py
  168. +67 −9 core/ui/base.py
  169. +30 −6 core/ui/console.py
  170. +101 −15 core/ui/ipc_client.py
  171. +30 −6 core/ui/virtual.py
  172. 0 data/database/.gitkeep
  173. +27 −0 entrypoint.sh
  174. +1 −1 example-config.json
  175. +34 −0 on-event-extension-install.sh
  176. +11 −11 pyproject.toml
  177. +16 −24 requirements.txt
  178. +0 −55 tests/agents/test_architect.py
  179. +8 −1 tests/agents/test_base.py
  180. +0 −65 tests/agents/test_spec_writer.py
  181. +10 −6 tests/agents/test_tech_lead.py
  182. +0 −31 tests/agents/test_troubleshooter.py
  183. +3 −2 tests/cli/test_cli.py
  184. +1 −1 tests/db/test_project_state.py
  185. +1 −1 tests/state/test_state_manager.py
  186. +2 −2 tests/telemetry/test_telemetry.py
  187. +1 −22 tests/templates/test_templates.py
  188. +16 −1 tests/ui/test_ipc_client.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -21,3 +21,4 @@ config.json
poetry.lock
.DS_Store
*.log
pythagora-vs-code.vsix
168 changes: 168 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# Use Ubuntu 22.04 as the base image with multi-arch support
FROM ubuntu:22.04

# Set environment to prevent interactive prompts during builds
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC

# Use buildx args for multi-arch support
ARG TARGETPLATFORM
ARG BUILDPLATFORM

# Update package list and install prerequisites
RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common \
build-essential \
curl \
git \
gnupg \
tzdata \
openssh-server \
inotify-tools \
vim \
nano \
&& rm -rf /var/lib/apt/lists/*

# Add deadsnakes PPA for Python 3.12 and install Python
RUN add-apt-repository ppa:deadsnakes/ppa -y && apt-get update && \
apt-get install -y --no-install-recommends \
python3.12 \
python3.12-venv \
python3.12-dev \
python3-pip \
&& rm -rf /var/lib/apt/lists/*


# Set Python 3.12 as the default python3 and python
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \
python --version

RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nodejs && \
node --version && npm --version

# MongoDB installation with platform-specific approach
RUN case "$TARGETPLATFORM" in \
"linux/amd64") \
curl -fsSL https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-archive-keyring.gpg && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list && \
apt-get update && apt-get install -y mongodb-org \
;; \
"linux/arm64"|"linux/arm64/v8") \
curl -fsSL https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-archive-keyring.gpg && \
echo "deb [arch=arm64 signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list && \
apt-get update && apt-get install -y mongodb-org \
;; \
*) \
echo "Unsupported platform: $TARGETPLATFORM" && exit 1 \
;; \
esac \
&& rm -rf /var/lib/apt/lists/*

# Configure SSH
RUN mkdir -p /run/sshd \
&& sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin no/' /etc/ssh/sshd_config \
&& sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config \
&& sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config \
&& sed -i 's/#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/' /etc/ssh/sshd_config

ENV PYTH_INSTALL_DIR=/pythagora

# Set up work directory
WORKDIR ${PYTH_INSTALL_DIR}/pythagora-core

# Add Python requirements
ADD requirements.txt .

# Create and activate a virtual environment, then install dependencies
RUN python3 -m venv venv && \
. venv/bin/activate && \
pip install -r requirements.txt

# Copy application files
ADD main.py .
ADD core core
ADD config-docker.json config.json

# Set the virtual environment to be automatically activated
ENV VIRTUAL_ENV=${PYTH_INSTALL_DIR}/pythagora-core/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

ENV PYTHAGORA_DATA_DIR=${PYTH_INSTALL_DIR}/pythagora-core/data/
RUN mkdir -p data

# Expose MongoDB and application ports
EXPOSE 27017 8000

# Create a group named "devusergroup" with a specific GID (1000, optional)
RUN groupadd -g 1000 devusergroup

ARG USERNAME=devuser

# Create a user named "devuser" with a specific UID (1000) and assign it to "devusergroup"
RUN useradd -m -u 1000 -g devusergroup -s /bin/bash $USERNAME

# Add the user to sudoers for admin privileges
RUN echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# Create an embedded entrypoint script
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

RUN chown -R $USERNAME:devusergroup /pythagora

# Copy SSH public key from secret
#RUN --mount=type=secret,id=ssh_public_key \
# mkdir -p /home/${USERNAME}/.ssh \
# && cat /run/secrets/ssh_public_key > /home/${USERNAME}/.ssh/authorized_keys \
# && chown -R ${USERNAME}:devusergroup /home/${USERNAME}/.ssh \
# && chmod 700 /home/${USERNAME}/.ssh \
# && chmod 600 /home/${USERNAME}/.ssh/authorized_keys

USER $USERNAME

RUN npx @puppeteer/browsers install chrome@stable

# add this before vscode... better caching of layers
ADD pythagora-vs-code.vsix /var/init_data/pythagora-vs-code.vsix

RUN mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys

# ARG commitHash
# # VS Code server installation with platform-specific handling
# RUN case "$TARGETPLATFORM" in \
# "linux/amd64") \
# mkdir -p ~/.vscode-server/cli/servers/Stable-${commitHash} && \
# curl -fsSL https://update.code.visualstudio.com/commit:${commitHash}/server-linux-x64/stable -o server-linux-x64.tar.gz && \
# tar -xz -f server-linux-x64.tar.gz -C ~/.vscode-server/cli/servers/Stable-${commitHash} && \
# mv ~/.vscode-server/cli/servers/Stable-${commitHash}/vscode-server-linux-x64 ~/.vscode-server/cli/servers/Stable-${commitHash}/server \
# ;; \
# "linux/arm64"|"linux/arm64/v8") \
# mkdir -p ~/.vscode-server/cli/servers/Stable-${commitHash} && \
# curl -fsSL https://update.code.visualstudio.com/commit:${commitHash}/server-linux-arm64/stable -o server-linux-arm64.tar.gz && \
# tar -xz -f server-linux-arm64.tar.gz -C ~/.vscode-server/cli/servers/Stable-${commitHash} && \
# mv ~/.vscode-server/cli/servers/Stable-${commitHash}/vscode-server-linux-arm64 ~/.vscode-server/cli/servers/Stable-${commitHash}/server \
# ;; \
# *) \
# echo "Unsupported platform: $TARGETPLATFORM" && exit 1 \
# ;; \
# esac


# Install VS Code extension (platform-agnostic)
# RUN ~/.vscode-server/cli/servers/Stable-${commitHash}/server/bin/code-server --install-extension pythagora-vs-code.vsix
ADD on-event-extension-install.sh /var/init_data/on-event-extension-install.sh

# Create a workspace directory
RUN mkdir -p ${PYTH_INSTALL_DIR}/pythagora-core/workspace

RUN mkdir -p /home/$USERNAME/.vscode-server/cli/servers

USER root

RUN chmod +x /var/init_data/on-event-extension-install.sh
RUN chown -R devuser: /var/init_data/

# Set the entrypoint to the main application
ENTRYPOINT ["/entrypoint.sh"]
48 changes: 13 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -44,6 +44,16 @@

---

<div align="center">

<a href="vscode:extension/PythagoraTechnologies.gpt-pilot-vs-code" target="_blank"><img src="https://github.com/Pythagora-io/gpt-pilot/assets/10895136/5792143e-77c7-47dd-ad96-6902be1501cd" alt="Pythagora-io%2Fgpt-pilot | Trendshift" style="width: 185px; height: 55px;" width="185" height="55"/></a>

</div>

GPT Pilot is the core technology for the [Pythagora VS Code extension](https://bit.ly/3IeZxp6) that aims to provide **the first real AI developer companion**. Not just an autocomplete or a helper for PR messages but rather a real AI developer that can write full features, debug them, talk to you about issues, ask for review, etc.

---

📫 If you would like to get updates on future releases or just get in touch, join our [Discord server](https://discord.gg/HaqXugmxr9) or you [can add your email here](http://eepurl.com/iD6Mpo). 📬

---
@@ -87,6 +97,9 @@ If you are interested in our learnings during this project, you can check [our l
- **Python 3.9+**

# 🚦How to start using gpt-pilot?
👉 If you are using VS Code as your IDE, the easiest way to start is by downloading [GPT Pilot VS Code extension](https://bit.ly/3IeZxp6). 👈

Otherwise, you can use the CLI tool.

### If you're new to GPT Pilot:

@@ -107,37 +120,10 @@ After you have Python and (optionally) PostgreSQL installed, follow these steps:

All generated code will be stored in the folder `workspace` inside the folder named after the app name you enter upon starting the pilot.

### If you're upgrading from GPT Pilot v0.1

Assuming you already have the git repository with an earlier version:

1. `git pull` (update the repo)
2. `source pilot-env/bin/activate` (or on Windows `pilot-env\Scripts\activate`) (activate the virtual environment)
3. `pip install -r requirements.txt` (install the new dependencies)
4. `python main.py --import-v0 pilot/gpt-pilot` (this should import your settings and existing projects)

This will create a new database `pythagora.db` and import all apps from the old database. For each app,
it will import the start of the latest task you were working on.

To verify that the import was successful, you can run `python main.py --list` to see all the apps you have created,
and check `config.json` to check the settings were correctly converted to the new config file format (and make
any adjustments if needed).

# 🔎 [Examples](https://github.com/Pythagora-io/gpt-pilot/wiki/Apps-created-with-GPT-Pilot)

[Click here](https://github.com/Pythagora-io/gpt-pilot/wiki/Apps-created-with-GPT-Pilot) to see all example apps created with GPT Pilot.

## 🐳 How to start gpt-pilot in docker?
1. `git clone https://github.com/Pythagora-io/gpt-pilot.git` (clone the repo)
2. Update the `docker-compose.yml` environment variables, which can be done via `docker compose config`. If you wish to use a local model, please go to [https://localai.io/basics/getting_started/](https://localai.io/basics/getting_started/).
3. By default, GPT Pilot will read & write to `~/gpt-pilot-workspace` on your machine, you can also edit this in `docker-compose.yml`
4. run `docker compose build`. this will build a gpt-pilot container for you.
5. run `docker compose up`.
6. access the web terminal on `port 7681`
7. `python main.py` (start GPT Pilot)

This will start two containers, one being a new image built by the `Dockerfile` and a Postgres database. The new image also has [ttyd](https://github.com/tsl0922/ttyd) installed so that you can easily interact with gpt-pilot. Node is also installed on the image and port 3000 is exposed.

### PostgreSQL support

GPT Pilot uses built-in SQLite database by default. If you want to use the PostgreSQL database, you need to additional install `asyncpg` and `psycopg2` packages:
@@ -180,14 +166,6 @@ python main.py --delete <app_id>

Delete project with the specified `app_id`. Warning: this cannot be undone!

### Import projects from v0.1

```bash
python main.py --import-v0 <path>
```

This will import projects from the old GPT Pilot v0.1 database. The path should be the path to the old GPT Pilot v0.1 database. For each project, it will import the start of the latest task you were working on. If the project was already imported, the import procedure will skip it (won't overwrite the project in the database).

### Other command-line options

There are several other command-line options that mostly support calling GPT Pilot from our VSCode extension. To see all the available options, use the `--help` flag:
136 changes: 136 additions & 0 deletions config-docker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"llm": {
"openai": {
"base_url": null,
"api_key": null,
"connect_timeout": 60.0,
"read_timeout": 60.0,
"extra": null
},
"anthropic": {
"base_url": null,
"api_key": null,
"connect_timeout": 60.0,
"read_timeout": 60.0,
"extra": null
}
},
"agent": {
"default": {
"provider": "openai",
"model": "gpt-4o-2024-05-13",
"temperature": 0.5
},
"BugHunter.check_logs": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022",
"temperature": 0.5
},
"CodeMonkey": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022",
"temperature": 0.0
},
"CodeMonkey.code_review": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20240620",
"temperature": 0.0
},
"CodeMonkey.describe_files": {
"provider": "openai",
"model": "gpt-4o-mini-2024-07-18",
"temperature": 0.0
},
"Frontend": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022",
"temperature": 0.0
},
"get_relevant_files": {
"provider": "openai",
"model": "gpt-4o-2024-05-13",
"temperature": 0.5
},
"Developer.parse_task": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022",
"temperature": 0.0
},
"SpecWriter": {
"provider": "openai",
"model": "gpt-4-0125-preview",
"temperature": 0.0
},
"Developer.breakdown_current_task": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022",
"temperature": 0.5
},
"TechLead.plan_epic": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20240620",
"temperature": 0.5
},
"TechLead.epic_breakdown": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022",
"temperature": 0.5
},
"Troubleshooter.generate_bug_report": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20240620",
"temperature": 0.5
},
"Troubleshooter.get_run_command": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20240620",
"temperature": 0.0
}
},
"prompt": {
"paths": [
"/pythagora/pythagora-core/core/prompts"
]
},
"log": {
"level": "DEBUG",
"format": "%(asctime)s %(levelname)s [%(name)s] %(message)s",
"output": "pythagora.log"
},
"db": {
"url": "sqlite+aiosqlite:///data/database/pythagora.db",
"debug_sql": false
},
"ui": {
"type": "plain"
},
"fs": {
"type": "local",
"workspace_root": "/pythagora/pythagora-core/workspace",
"ignore_paths": [
".git",
".gpt-pilot",
".idea",
".vscode",
".next",
".DS_Store",
"__pycache__",
"site-packages",
"node_modules",
"package-lock.json",
"venv",
".venv",
"dist",
"build",
"target",
"*.min.js",
"*.min.css",
"*.svg",
"*.csv",
"*.log",
"go.sum",
"migration_lock.toml"
],
"ignore_size_threshold": 50000
}
}
Loading