Import Rules
Import existing rules from your project into a repository, making them available for sharing across projects and teams.
The import command copies the entry into the repository, commits it, then replaces the original with a symlink.
bash
# Import rule from project to repository
ais cursor rules import my-custom-rule
# With custom commit message
ais cursor rules import my-rule -m "Add custom rule"
# Import and push to remote
ais cursor rules import my-rule --push
# Force overwrite
ais cursor rules import my-rule --force
# Preview
ais cursor rules import my-rule --dry-runWorkflow
- You have a rule file in your project (e.g.,
.cursor/rules/my-custom-rule.mdc) - Run
ais cursor rules import my-custom-rule - AIS copies the file into the current repository
- Creates a git commit in the repository
- Replaces the original file with a symlink pointing to the repository copy
- Saves the dependency to
ai-rules-sync.json
Now the rule lives in the repository and can be shared with other projects via ais cursor add my-custom-rule.