Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>peach-treeNew to Visual Studio Code? Get it now.
peach-tree

peach-tree

nickpharrison

|
350 installs
| (0) | Free
Extension to allow editing of code on a http based repository
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Peach Tree Documentation

Overview

Peach Tree is a VSCode extension that allows users to interact with HTTP-based code repositories that operate a REST paradigm. Multiple applications/repositories can be configured simultaneously, and code can be handled depending on it's split between different directories (named structures).

Setting up credentials

After installing Peach Tree, run the "Open Peach Tree Profile" command. Store all your credentials and settings in this file. Save and close the file to finalise the changes. Note you can use the string variable "{{tld}}" to switch between different top level domains during requests. Other configurable settings include:

current_network_configuration

Possible values are "normal" (use ".com" in place of "{{tld}}"), "vpn" (use ".local" in place of "{{tld}}") or "proxy" (use ".com" in place of "{{tld}}" and also route all requests via the proxy specified in the "proxy" property)

use_save_function_to_upload

If true, then whenever VSCode saves a file that was opened using Peach Tree, then the file will also be uploaded to the place that it came from. This setting requires VSCode to be rebooted when it is changed.

auto_initialise_peachtree_on_startup

If true, then Peach Tree will automatically initialise when the extension is loaded by VSCode. If false, then you will need to run the "Initialise Peach Tree" command before you can use the extension.

ask_for_extra_confirmation_before_uploading

If true, then an extra confirmation is asked before uploading any code. NOTE: This does not apply when code is uploaded using the use_save_function_to_upload functionality as described above.

verify_code_deletion_with_random_number

If true, you will be asked to type a randomly generated number as confirmation before deleting any code.

Switching Profiles

Once you have added credentials to the file mentioned above, you can switch between different profiles/servers by using the "Switch Peach Tree Credentials" command (by default this is assigned the hotkey "ctrl+shift+L").

Invalid Servername causing ERR_TLS_CERT_ALTNAME_INVALID

If the servers SSL/TLS certificate alt names do not match the host of the request you are making, you will need to specify this manually be adding a property in the affected profile with the key "servername" and value equal to the host you'd expect to fin in the certificate. Most of the time this value is calculated automatically (by using the value of "{{tld}}" in the baseurl) but this extra property provides a way for you to override it.

App Config

Before you can use Peach Tree, you need to define the endpoints for your repository. These are stored in a file similar to your profiles mentioned above. Run the "Open Peach Tree Config" command. You can currently have up to three apps/views, and an unlimited number of codebases in each one. Store the endpoints relating to your repository in here before saving and finalise any changes.

Opening Code

There are two methods for opening code:

  • Firstly, you can select any piece of code from the panel on the left and press the accompanying download icon.
  • Second you can select the structure/codebase you want to search through and run the "Get Code" command (by default assigned the hotkey "ctrl+shift+n"). You can then search this repository by typing the name of the code you want to open.

Uploading code

To upload code you can run the "Upload Code" command while having it open in the current editor. Depending on the type of code, one of three things will happen:

If the code was originally opened by Peach Tree and it comes from a codebase that does not use structures:

You will be prompted to check that you definitely want to update this code. If you select yes then the code will be reuploaded to the codebase and replace the piece of code that has the same name.

If the code was originally opened by Peach Tree and it comes from a codebase that does use structures:

You will be prompted which of the currently active structures you want to upload this code to. The code will then be reuploaded to each structure and replace the code that has the same name in each instance. If no code with that name exists in that structure then it is created with the same name.

If the code was not opened by Peach Tree:

The code will be uploaded as a new piece of code. You will be asked which app/codebase it should be uploaded to, as well as being asked a new for the new piece of code

Active Structures

As mentioned above you will need to mark certain structures as "active", to do this click on the small "toggle" icon that appears when you hover over a structure

Deleting Code

You can delete code from a repository by right-clicking it

Resetting Tress/Codebases

If something goes wrong, most problems can be fixed by clicking the "refresh icon" on a particular codebase or tree. However, if something REALLY goes wrong, you can restart the entire extension by running the "Initialise Peach Tree" command.

Syncing

In codebases that use structures, you can use syncs to bulk-download and re-upload code from one structure to another. To do this:

  • Run the "Set Up Peach Tree Sync" command (by default assigned the hotkey "ctrl+shift+G") to open the SyncFile.
  • Either manually paste a SyncFile that you want to run (if so skip the next step) OR run the "Set Up Peach Tree Sync" command again to be walked through the prompts to generate one.
  • Save the SyncFile to disk
  • Run the "Set Up Peach Tree Sync" command again and a message asking you verify you want to execute the sync will appear. Enter the sync verification code to begin.
  • Peach Tree will then download every piece of code as listed in the SyncFile. During this time it is safe to cancel the Sync with no repercussions.
  • After downloading all the code, it will then run all the creations, updates and deletions that were specified in the SyncFile. During this time it is not safe to cancel, because doing so could leave the code that was going to be uploaded in an unstable state.

Advanced Syncing

Advanced syncing works exactly the same way as above, except when generating the SyncFile you will be asked a few extra questions. You can set up an Advanced Sync by right-clicking on the "Structures" root node in the Peach Tree extension and choosing the correpsonding option.

  • The first extra question will ask you to provide a timestamp to sync the code from the destination structure as it was at a particular point in time. This is called "Retore Syncing" and comes with some very major dangers. Make sure you've read the section on "Restore Syncing" below. It's very important you understand when it will work and when it won't work. If you leave this option empty then a sync will be performed using the current code, this is safe to do without considering "Restore Syncing"
  • The second extra question will ask you for a regular expression. This regular expression is used to match the names of code items in both the source structure and the destination structure. A code item will only be created/updated in the destination structure if it's name in the source structure matches the given regex. Furthermore, a code item will only deleted from the destination structure if it's name matches the given regex. If you leave trhis option empty then a sync will be performed for all code items. FOR THE AVOIDANCE OF DOUBT: The language for executing this regex is Javascript so your regex should match accordingly. It is executed by compiling the regex as a non-global RegExp object and the "test" method is called for each code item name. That code item is only included in the SyncFile if the output of the "test" method is true. It is reccomended that you test your regular expression using exactly this set-up beforehand, since different languages/methods have slightly different behaviour.

Restore Syncing

When performing an Adavnced Sync, you will be prompted to provide a unix timestamp relating to the time to want to download the code from. The sync works in exactly the same way, but when building the SyncFile it will provide instructions for a particular revision of the code to be used, as it appeared at the provided unix timestamp. However note, no code will be restored if it has been deleted after the provided unix timestamp. Therefore, only code that currently exists in the source structure will be uploaded to the destination structure, albeit a previous revision will be used. Do not use the "Restore Sync" feature unless you fully understand the ramifications of this and what problems it may cause.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft