Visual Studio Code
Edit a Docly site in Visual Studio Code from a docly CLI working copy: ordinary local files, a diff before anything goes live, and nothing published until you push.
- Install the tools
Visual Studio Code from code.visualstudio.com.
The docly CLI — download and install it as described on The docly CLI, then check it with
docly --versionin a new terminal.
- Get a working copy
docly login # once, in your project directory
docly clone /example.com site # the folder you will work on
code site # or File → Open Folder in VS Code Clone the folder you will be allowed to write in: docly push works on the whole working copy, and is refused when the copy's root is outside the folder that is unlocked.
- Teach VS Code the Docly file types
.hash files are HTML templates and .docly files are JSON. Open Preferences: Open User Settings (JSON) from the command palette (Ctrl+Shift+P) and add:
{
"files.associations": {
"*.hash": "html",
"*.docly": "json"
},
"files.exclude": {
"**/.doclycli": true
}
} files.exclude hides the CLI's own state folder, which holds your session.
A .vscode folder in the working copy is pushed, but never served. .vscode is one of the tool folders a published site always answers 404 for (with .claude, .git, .vs, .idea, .cursor and a few more), so workspace settings there do not end up live. To keep the folder out of Docly altogether, add .vscode/ to .doclyignore in the working copy's root.
- Edit, review and publish
Use the integrated terminal (Ctrl+`):
docly pull # start from what is on the server
# ...edit in VS Code...
docly status
docly diff
docly unlock /example.com # writing is locked until a folder is opened
docly push
docly lock A pushed change is live on the next request. Code files (
.hash,.js,.css) have no version history, sodocly diffis your review.A
.doclyfile must stay valid JSON with its envelope. VS Code's JSON support shows a syntax error before you push. If a broken file would replace the document with another type,pushrefuses and lists it — fix the JSON rather than adding--allow-replace.A document someone changed on the server since your last pull is not pushed; it is listed under «Conflicts». Run
docly pulland push again.
Command reference and the rules for locking, conflicts and errors: The docly CLI.
Related