Churrera is a CLI tool designed to orchestrate Cursor Cloud Agents REST API in an easy way.
Cursor Cloud Agents REST API (Beta) allows you to programmatically create and manage AI-powered coding agents that work autonomously on your repositories.
OpenAPI: https://editor-next.swagger.io/?url=https://cursor.com/docs-static/cloud-agents-openapi.yaml
Churrera CLI processes a PML-Workflow file which defines a Job to be processed and it is composed of one or more Prompts which are executed by a Frontier model.
<?xml version="1.0" encoding="UTF-8"?>
<pml-workflow xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://jabrena.github.io/pml/schemas/0.3.0/pml-workflow.xsd">
<sequence
model="default" repository="https://github.com/jabrena/churrera-cli"
timeout="30m" fallback-src="999-fallback.xml">
<prompt src="1-pml-java25-installation.xml" />
<prompt src="2-pml-jbang-sonar-search-cli-installation.xml" />
<prompt src="3-pml-fix-sonar-issues.xml" />
</sequence>
</pml-workflow><?xml version="1.0" encoding="UTF-8"?>
<pml-workflow xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://jabrena.github.io/pml/schemas/0.3.0/pml-workflow.xsd">
<parallel src="euler-problem-extractor-prompt.xml" bindResultType="List_Integer">
<sequence model="default" repository="https://github.com/jabrena/wjax25-demos">
<prompt src="euler-problem-solver-prompt.xml" bindResultExp="$get()"/>
</sequence>
</parallel>
</pml-workflow>Examples using Churrera with PML-Workflow:
Currently, the solution has the following limitations
- Limited Java types to be desearialized data from prompts.
- No capacity to pass parameters from Pipelines to prompts.
- No Directed graph support for complex workflow
- Not released in Maven Central
Visit Integrations in Cursor to generate a new CURSOR_API_KEY and click the button New User API Key to generate it:
Type the name that you want and click the Save button to generate the new CURSOR_API_KEY:
Then a popup window will appear with the CURSOR_API_KEY created:
With the new CURSOR_API_KEY created, you could add it into the .env file with the following format:
CURSOR_API_KEY=key_xxxNote: Remember to add the file .env inside of a .cursorignore file. Further information about it here.
On the other hand, you could use that CURSOR_API_KEY and export it as an environment variable in your system:
export CURSOR_API_KEY=key_xxxNote: Churrera reads CURSOR_API_KEY values from a .env file stored in the same path where you run Churrera or define an environment variable in your terminal.
Configure Github to allow Cursor to interact with the repository that you want Cursor Cloud Agents to interact with, so visit Integrations and click the button Manage in the Github area.
Once you are in Github, you will have to select which Github User you are going to give permissions to and click the Configure link:
Once you have installed Cursor in your Github User, you will need to define which repositories you will give permissions to:
You will indicate in the attribute repository the repository that you defined before in the pml-workflow file.
1. Define a pml-workflow file:
<?xml version="1.0" encoding="UTF-8"?>
<pml-workflow xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://jabrena.github.io/pml/schemas/0.3.0/pml-workflow.xsd">
<sequence model="default" repository="https://github.com/jabrena/wjax25-demos">
<prompt src="pml-hello-world-bash.xml" />
</sequence>
</pml-workflow>2. Define a PML prompt file:
<?xml version="1.0" encoding="UTF-8"?>
<prompt xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://jabrena.github.io/pml/schemas/0.3.0/pml.xsd">
<goal>
Print "Hello World" in the console using a echo command
</goal>
</prompt>Further information about PML here.
3. Launch the tool:
Build & run Churrera:
#JBang
sdk install jbang
jbang trust add https://github.com/jabrena/
jbang cache clear
jbang catalog list jabrena
# Single execution (Designed for Pipelines)
jbang churrera@jabrena run \
--workflow churrera-cli/src/test/resources/examples/hello-world-bash/workflow-hello-world.xml --delete-on-success-completion
jbang churrera@jabrena run --workflow churrera-cli/src/test/resources/examples/hello-world/workflow-hello-world.xml --show-logs --delete-on-success-completion
jbang churrera@jabrena run --retrieve-models
jbang churrera@jabrena run --retrieve-repositories#JBang
sdk install jbang
jbang trust list
jbang trust add https://github.com/jabrena/
jbang cache clear
jbang catalog list jabrena
jbang churrera@jabrena --help
# Single execution (Designed for Pipelines)
jbang churrera@jabrena run --help
jbang churrera@jabrena run --workflow churrera-cli/src/test/resources/examples/hello-world-bash/workflow-hello-world.xml
jbang churrera@jabrena run --workflow churrera-cli/src/test/resources/examples/hello-world/workflow-hello-world.xml --show-logs
jbang churrera@jabrena run --workflow churrera-cli/src/test/resources/examples/euler-problems/workflow-euler.xml./mvnw clean package -DskipTests
java -jar churrera-cli/target/churrera-cli-0.3.0-SNAPSHOT.jar run --help
java -jar churrera-cli/target/churrera-cli-0.3.0-SNAPSHOT.jar run --workflow churrera-cli/src/test/resources/examples/hello-world-bash/workflow-hello-world.xml --delete-on-success-completion --polling-interval 10
java -jar churrera-cli/target/churrera-cli-0.3.0-SNAPSHOT.jar run --workflow churrera-cli/src/test/resources/examples/hello-world-bash/workflow-hello-world.xml --delete-on-completion
java -jar churrera-cli/target/churrera-cli-0.3.0-SNAPSHOT.jar run --workflow churrera-cli/src/test/resources/examples/hello-world/workflow-hello-world.xml --delete-on-success-completion --show-logs
java -jar churrera-cli/target/churrera-cli-0.3.0-SNAPSHOT.jar run --workflow churrera-cli/src/test/resources/examples/euler-problems/workflow-euler.xml --delete-on-success-completion --polling-interval 10 --show-logs
java -jar churrera-cli/target/churrera-cli-0.3.0-SNAPSHOT.jar run --retrieve-models
java -jar churrera-cli/target/churrera-cli-0.3.0-SNAPSHOT.jar run --retrieve-repositories
java -jar churrera-cli/target/churrera-cli-0.3.0-SNAPSHOT.jar run --workflow churrera-cli/src/test/resources/examples/failed-job/workflow.xml --delete-on-completion --show-logs- Review the CHANGELOG for further details
- https://cursor.com/docs/cloud-agent/api/overview
- https://status.cursor.com/
- https://discord.com/channels/1074847526655643750/1074847527708393565
- https://github.com/jabrena/101-cursor
- https://github.com/jabrena/pml
- https://github.com/jabrena/churrera-cli
- https://github.com/jabrena/cursor-cloud-agent-rest-api-status
- https://github.com/jabrena/cursor-rules-agile
- https://github.com/jabrena/cursor-rules-java
- https://github.com/jabrena/cursor-rules-spring-boot
- https://github.com/jabrena/sonar-search-cli
- https://github.com/jabrena/puml-to-png-cli
- https://github.com/jabrena/setup-cli
- https://github.com/jabrena/jbang-catalog






