cypress-think
v1.19.1
Published
Create Cypress tests using your own AI
Maintainers
Readme
⚠️ Not ready to be used yet.
cypress-think
Create Cypress tests using your own AI
📺 Watch Introducing cypress-think.
Given cy.think(...) command, comes up with accurate Cypress commands line by line

Produces the following test, see line by line generated commands

Input prompt
Can be a single line, multi-line literal, or an array of strings
cy.think('Visit the site')
cy.think(`
visit the site
// comments are ignored
click on the "Sign in" button
`)
cy.think([
'visit the site',
'click on the "Home" thumbnail',
'url should include "/home"',
])Agent instructions
This package automatically discovers your agent instructions and includes them with your prompts, see agent-instructions.mjs
Found agent instructions in: .github/copilot-instructions.mdCaching
Each prompt line is processed separately. Each result is cached to avoid reinventing the same code. If the line changes, it will be re-generated.

The cache is loaded and saved in the local thoughts.json file.
Saving generated code
If the entire prompt finishes successfully, a save icon 💾 appears next to the "thinking" log message
Save replaces the original .think(prompt) with the generated .within(...) commands plus comments
![]()
Here is before and after spec file

Placeholders
You can use dynamic values, while the AI query stays unchanged via placeholders option
const name = 'Ann Marie'
cy.think(
'enter {{name}} into the input with placeholder "Enter name"',
{
placeholders: { name },
},
)The AI query is going to be enter {{name}} into..., while the actual command will enter "Ann Marie"

Debugging
This plugin uses debug to output debug logs to STDERR.
# show debug logs: commands, results
$ DEBUG=cypress-think npx cypress open
# show HTML sent to the model (verbose)
$ DEBUG=cypress-think:html npx cypress openSee LICENSE.md
