Command line switch to start Rack as File|New

Is there a command line switch that would let me start Rack as if I had issued a File|New command from the menu, so that it does not load the last patch used, and does not load the ‘default.vcv’ in a way it can be accidentally saved over?

Hi @technochitlin, just issue a $ Rack mynewpatch.vcv (or whatever filename you want), from the command line, and you’re gone. Look also here for reference: https://vcvrack.com/manual/Installing#command-line-usage

1 Like

That’s not exactly it- that loads Rack with the new, empty patch “mynewpatch.vcv”. That is the same as loading the template as a patch, which you can accidentally save over, losing your template. What I want to do is duplicate the File|New command from the command line, which loads the template but does not have a patch name, which forces you to create one when it saves.

The point is peculiar and I think I dont’t get the right requisite. I just did the following. I made a backup copy of template.vcv, then opened the original template.vcv file, that works as a default template, and deleted its content, so that it’s now flattened as an empty file. Now I can call ./Rack with no arguments or options, and it simply loads the new empty template.vcv as its default. This is only a rudimental, manual workaround, so I can’t understand whether is such a thing you’re going for. I suppose I can’t help more.

EDIT: I should say that the template.vcv should not be really emptied, the minimal content it should contain looks like this:

{
  "version": "1.1.6",
  "modules": [],
  "cables": []
}

That’s just the contents that is written in the background to the autosave-v1.vcv file, in case of an empty patch, and this is the file loaded at subsequent launches, until one deletes it.

I think I understand what you want to do, and a possible workaround would be to

  • delete autosave.vcv
  • set the “patchPath” inside settings.json to “” (an empty string)
  • run Rack

here is a one-liner for a linux terminal that does that, using jq (you need this to read/modify json from the command line)

rm autosave-v1.vcv && echo $(cat settings-v1.json | jq '.patchPath = ""') > settings-v1.json && ./Rack

only run this if you are prepared to delete your autosave file!

OK, it looks like I am asking for something that isn’t possible as Rack is currently written. I can work around it; I’ve been doing so for a while. Thanks to all that tried to help.