After manual site copy `ghost ls` returns same "Name" for second site

After I manually cloned my DB and files to create a second Ghost site, ghost ls is reporting the same Name for both. I gave them each a unique “config” file, and updated the database that all URL references in the new DB are correct.

In the ghost ls output, the “Location” “URL” and “Port” are all correctly unique, but both entries share the same “name”. Where is that value generated from and how I can change It?

I found that that this was due to a file named .ghost-cli which exists at the root of both sites. It appears to be used as a cache file to speed up some lookups. It has a structure like this:

{
  "active-version": "5.2.3",
  "cli-version": "1.21.0",
  "channel": "stable",
  "name": "some-site-com",
  "previous-version": "5.2.2",
  "node-version": "16.15.0",
  "running": "production"
}

I updated the file to correct the “Name” value, although it’s not clear it was causing any serious problem.