Agent create new files?

Maybe I’ve missed this, but can’t find it in the app or any info on it here yet.

Is there a way to prompt the agent to create new files in a project? Right now, I’m only able to get it to suggest the file contents in the chat. Given how ‘New AI project…’ works it seems like having the agent create and update files should be possible from the chat too, right?


1 Like

Not production support for this at the moment, other than using Cmd+K to generate a file from scratch. Curious to learn more about what you’d use this for. Do you have an example?

Something like: “Generate unit tests for all files in this directory” would be a good example

and for a given directory with:


it would create:


Of course GPT-4 can be a big help in working through ideas outside of / along side code – for example brainstorming and refining specs or thinking through the necessary elements (and related code) for an app.

Chat helps navigate and connect these ideas outside of a single ‘create this’ command.

Similar to how ‘New AI project’ self-queries steps and creates/edits files, I’d like to be able to chat through ideas and then at specific points ask Cursor to create or update specific files based on the current context in the chat.

Does that make sense?

1 Like

I created a basic slots game on the flipper zero and the agent created a new application directory with the fap, art assets and C code and it worked on the flipper flawlessly the first time. Trying to figure out how to re-create this but I happened to stumble on functionality that doesn’t seem prod ready atm.

I run into this use case frequently. Eg create a modal for updating billing information. I don’t want the modal to be in the same file, but rather created in a different file and controlled in the current file. Another example: Callout to this endpoint and make the endpoint do x. Would be very powerful if I didn’t have to create the file for the endpoint in between.

1 Like

At times, I need to break multiple functions (in one file) into separate files. This feature would be very useful to me. Save quite a bit of copypasta.


Exactly, great and unique feature