My boss had been muddling through Salesforce by creating custom objects and triggers using the Lightning Web Interface. I want to pull all his work down in VS Code, commit it to git, and continue development on it. How do I do that? Each sfdx command I run says it requires a project or a manifest.xml file. But I don't know how to create one for code that was created in Salesforce.
First, create a new project (View > Command Palette > SFDX: Create Project With Manifest), enter the project name and the folder name to save it in.
Next, authenticate, if necessary, with (View > Command Palette > SFDX: Authorize an Org), and follow the prompts.
After this, if necessary, set the default user name from the terminal via (Terminal > New Terminal) and entering the command
sfdx force:config:set defaultusername=username-or-alias.
Once you have all that configured, continue to use the terminal to retrieve the metadata:
sfdx force:source:retrieve -x package.xml
You'll find all your source in force-app/main/default.
You can customize all this via package.xml and sfdx-project.json to change the metadata to retrieve and/or path settings.
Have you tried using workbench? Under the "Migration" tab select "Retrieve" and you can pull down metadata based on an xml package.
Then you build out your package.xml file and use that to determine what types of metadata you want to retrieve. Some examples are here: