-
Notifications
You must be signed in to change notification settings - Fork 662
feat(cli): lingo.dev init cursor Command for .cursorrules Setup (#1101) #1409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hii @sumitsaurabh927 |
|
Hii @sumitsaurabh927 @The-Best-Codes |
The-Best-Codes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your PR is looking awesome @SK8-infi 🔥
I've left a review of a couple things that need fixed below. Also, some general reminders:
- Run
pnpm run formatbefore committing - Run
pnpm newto create a changeset (do this once for your PR)
|
@The-Best-Codes Thanks for reviewing the code. Resolved all the issues. The code looks much cleaner now. Please also do point if anything else is off. |
The-Best-Codes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one change I'd recommend making! I haven't tested locally to make sure everything is working fine, but your PR is looking great 😀
I also have two questions:
- Will this work well on Windows
- Will this work well in productions builds that are deployed to npm (the file tree is different in prod than in dev)
| import updateGitignore from "../utils/update-gitignore"; | ||
| import initCICD from "../utils/init-ci-cd"; | ||
| import open from "open"; | ||
| import cursorInitCmd from "./init/cursor"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be imported in the packages/cli/src/cli/index.ts file! Basically you should be able to revert the changes in this file and import the cursor command there instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hii @The-Best-Codes
I seem to be a little lost here. Won't adding it in index make it a top level command like "lingo.dev cursor". But we need it to be a subcommand of init like "lingo.dev init cursor".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh gosh you might be right on that lol. Let me make sure when I get a chance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SK8-infi I was wrong about this!
The current structure of subcommands in the codebase it to give the command a directory, an index.ts with the main command and then subcommands in the directory which are imported into index.ts.
So you might do something like this:
- Create a
init/directory incmd/ - Create the
cursor.tsin theinit/directory - Create an
index.tsininit/with the current init command logic and import and register the cursor subcommand there - Remove init.ts
...at least, that's what I would do. You can ask a maintainer too if you want more clarification!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be a systematic approach to me too(beneficial for other agent sub commands). But would require directory changes... Maybe I should ask maintainers' views
|
Hii @The-Best-Codes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new lingo.dev init cursor subcommand that automates the creation of a .cursorrules file by copying a template from the package's assets directory. The command supports interactive prompts for overwriting existing files and a --force flag for non-interactive usage.
Key changes:
- New
cursorsubcommand underlingo.dev initfor generating.cursorrulesfiles - Asset template file (
agents.md) added to the CLI package - Dependency updates in the monorepo lockfile (
@types/nodefrom 24.2.0 to 24.9.2)
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/src/cli/cmd/init/cursor.ts | Implements the new cursor subcommand with file copy logic, overwrite prompts, and --force flag support |
| packages/cli/src/cli/cmd/init.ts | Registers the cursor subcommand to the init command; removes extraneous blank line |
| packages/cli/assets/agents.md | Adds template file for .cursorrules content (currently contains placeholder text) |
| .changeset/nasty-nails-repair.md | Documents the feature addition as a minor version bump |
| pnpm-lock.yaml | Updates @types/node from 24.2.0 to 24.9.2 and associated transitive dependencies across the monorepo |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
@maxprilutskiy Resolved all the issues pointed by Copilot. Ready for review. |
|
Hii @sumitsaurabh927 |

Add
lingo.dev init cursorCommand for.cursorrulesSetupCloses #1101
Summary
Adds a new
cursorsubcommand tolingo.dev initthat automates the creation of a.cursorrulesfile in the project root by copying the template fromagents.md.Features & Implementation
New Command:
lingo.dev init cursor.cursorrulesin your repo root by copying the contents ofagents.md(also in the root).File Handling:
.cursorrulesalready exists:--force, which skips prompt and overwrites directly).agents.mddoes not exist.User Feedback:
CLI Structure:
initto support subcommands (projectfor the original logic,cursoras a sibling).Scenarios Tested
.cursorrulescreation when file does not exist..cursorrules(prompt and forced mode).agents.mdis missing.--forcefor scripted/non-interactive use.User Experience
Usage:
lingo.dev init cursor # or, for non-interactive scripting: lingo.dev init cursor --forceOutput:
Ready for review!
This PR brings core parity with expected subcommand conventions and ensures proper rules bootstrapping for the Cursor AI developer workflow.