Project event for file changes


I’ve been playing around in order to find a solution to the following issue.

I would like to keep track within my project of modified, new and deleted files. The behaviour should be the same of git-diff, but:

  1. I don’t need to create an actual diff, I would just work on file level
  2. I don’t want to be forced to use any versioning technology (so, no git involved)

So far, I didn’t find any out-of-the-box solution for this. I realise I should probably create my own package in order to enforce such thing, maybe using the node package suggested in here. Still, it would be quite neat to have some event listener in atom.project that could be use for this purpose.

Any further suggestion? Is there any ootb package I could look into?

Capture diff on save

If you don’t use a versioning tool, then what would modifications relate to? In other words, when will a file be considered new before it will be considered modified? Will it be relative to the state your project was in when you started Atom?


There isn’t a Core API for what you’re asking. The Core team would like to provide something for this eventually, but there isn’t anything on the schedule for it.

There is also the node-pathwatcher module that is used by Atom already that you might want to look at.


You’re right, my idea was to consider the project folder from the moment it is created. I don’t want to use git since this feature should be available no matter what versioning system you’re using (mercurial, svn, git…).

Thank you for the hint, I’ll check it and maybe I will compare the performances against fswatch. My only doubt is, since I’d like also to keep an offline changeset list, I should probably calculate an md5 of the project when Atom closes, and then calculate it again when Atom starts, so I can know if something changed in between.


I just found out that PatWatcher is not recursive, so it does not really solve my issue.

I gave a try to chokidar package, and it works as expected, even if it adds a considerable overhead on my machine (I should probably try different options from the default ones).

I will also give a shot to Gaze, see what the Grunt guys are up to :smile: