Configuring a Dockerfile and commands allow Ellipsis to test it’s own code before submitting it back to a human. This is highly suggested as it greatly increases the quality of generated code.

By default, when Ellipsis writes code in response to comments, messages, and issues, it doesn’t have a way to test the code it generates. As a result, linter errors or failing tests can be common.

To fix this, you can provide a Dockerfile and a list of commands that Ellipsis can use to test the code it generates before submitting that code back to human.

For example, if you notice that Ellipsis constantly suggests code that doesn’t pass your linter, you should configure a Dockerfile and a lint command (e.g., npm run lint). Ellipsis will then attempt to lint it’s own code before opening a pull request. If the lint command fails, Ellipsis will fix the problem before moving on, or at least notify you why it wasn’t able to resolve the lint error.

In that example, your ellipsis.yaml configuration file might look like:

version: 1.3
build:
  file: "development.Dockerfile"
  commands: 
    - command: "npm run lint"
      description: "Ensures that code adheres to our team style guide and linter settings. Ignore warnings, only fix errors. Run this before submitting any code, as the team will not accept code that doesn't pass the linter."

and the Dockerfile might look like:

FROM node:22
COPY ./package.json ./package.json 
RUN npm install
COPY . . 

Instructions

Set up takes 5 minutes using our web UI. Open the console. Click “code” on the sidebar. Select your repository from the drop-down menu.

1

Add environment variables

Only required if your project needs environment variables to run the commands! Be sure to use dev env vars, not prod.

2

Add Commands

Add commands to your config file. Commands are executed from the root of the repository and can lint, build, and even run your tests. Include whichever commands you use while developing.

3

Add a Dockerfile

The file should install the dependencies and copy your code into the container. We build this from the root of the repository.

  • The Dockerfile needs to include the Git CLI.
  • Do not include an ENTRYPOINT or CMD.
  • Update your ellipsis.yaml to point to this file by adding file under build.
4

Test

Click “Test build and commands” and wait. If it fails, inspect the logs and fix the issue.

5

Add files to repository

Once the build passes, use the “Add to repository using PR” button to send the Dockerfile and config file to your repository. Merge the PR, and now, Ellipsis will use these commands to fix its own mistakes before opening a PR!