The docly CLI Last updated: 23. Oct 2026

docly is the command-line client for Docly. It gives you a local working copy you can diff before anything goes live, and commands that act directly on the server: read, search, write, publish and read the logs. Run docly with no arguments for the complete, always-current list of arguments and flags.

Install and update

docly is a single, self-contained docly.exe for Windows x64 — no .NET or other runtime to install, and no administrator rights. Download it from the Docly cloud portal under Services → Docly CLI (cloud.docly.net/cli). The page is there for accounts with developer access; no menu item means the account lacks that access.

  1. Unblock the ZIP before you extract it — right-click docly-win-x64.zip, Properties, tick Unblock, OK. Windows marks downloaded files, and the mark follows every extracted file; left in place it shows up as a security warning that looks like a broken package.

  2. Extract it and run Installer Docly CLI.cmd. It copies docly.exe to %LOCALAPPDATA%\Programs\Docly and adds that folder to your own PATH. Nothing is written outside your user profile.

  3. Open a new terminal — one that was already open does not see the new PATH — and check with docly --version.

The download page shows a SHA-256 checksum. Compare it with certutil -hashfile docly-win-x64.zip SHA256.

Updating. docly checks for a newer version at most once a day and prints a notice on stderr, after the command you ran. docly update downloads the new version, verifies its size and SHA-256 and replaces docly.exe. It never updates by itself and asks before replacing anything; --yes answers for you. In a script or an agent session, where there is no terminal to ask in, --yes is required — without it the update is refused. Set DOCLY_NO_UPDATE_CHECK=1 to turn the check off.

docly --version
docly update          # asks before replacing docly.exe
docly update --yes    # for scripts

Sign in

docly login opens the browser, where you sign in to the Docly cloud with two-factor authentication. The cloud routes every command to the Docly instance that hosts the folder, so one session reaches all your workspaces and you never switch sessions to reach another site.

docly login                              # through the Docly cloud (the normal case)
docly login https://docly.net --direct   # one instance only
docly login https://docly.net --classic  # e-mail and password instead of the browser
docly logout
  • The session belongs to a directory, like .git. It is stored in .doclycli/credentials.json in the directory you ran docly login from, and login prints where. A command uses the nearest .doclycli above where it runs that has a session. There is no global fallback: your home directory never takes part, so a sibling directory answers «Not logged in».

  • .doclycli/.gitignore is written for you and excludes credentials.json — it is a live session token.

  • --direct (or DOCLY_DIRECT=1) signs in to one instance and reaches only the workspaces hosted there. --classic always signs in directly.

  • The Server line in docly status says where the folder lives, not where you should sign in.

Referring to folders and documents

Every command that takes a <reference> accepts:

  • a path from the instance root, starting with / — the form docly sites and docly find print, for example /example.com/assets/site.css

  • a guid (22 characters), as printed by docly dir, docly find and the other commands

  • an id with an F (folder) or D (document) prefix, as it appears in a Docly URL

  • 0 for your home folder

Numeric ids are not accepted. Git Bash rewrites an argument that starts with / into a Windows path before docly sees it; set MSYS_NO_PATHCONV=1 or leave out the leading slash. Quote paths that contain spaces.

Commands

One line each. docly <command> --help prints the arguments and flags for one command, and a command run without a required argument prints its full signature.

The working copy — local files, nothing is live until push:

Command

What it does

docly clone [folder] [dir]

Download a folder tree into a new working copy. Without a folder you browse the tree interactively. --url gives the instance for a first-time sign-in.

docly status [--remote]

List local changes. --remote also lists changes on the server.

docly diff [file]

Line-level diff between your files and the server.

docly pull

Fetch server changes. A file changed both locally and on the server is skipped and listed; --force overwrites your local change. --prune removes local files whose documents were deleted on the server. --dry-run only previews.

docly push

Upload local changes. --delete also deletes on the server what you deleted locally. --dry-run lists what would happen, and works while writing is locked. --allow-replace allows a write that replaces a document (see below).

Write access:

Command

What it does

docly unlock [folder]

Open one folder, and everything below it, for writing. Without a folder: show what is open, checked against the server.

docly lock

Refuse all writing again, locally and on the server. Needs no sign-in.

Reading on the server — free, never needs an unlock:

Command

What it does

docly dir [reference]

List a folder (blank = home).

docly get <reference>

Print a document's file content, or save it with --out <file> (binary files need --out or a redirect). --raw prints the stored value with its envelope.

docly find <reference>

Server-side search under a folder. --name is a glob on the full file name (*.hash, *report*), --contains an exact, case-insensitive text in the content (code files included, attachments not), --schema a schema name.

docly history <reference>

List the versions of a document; --version <v> reads one, with --diff against the current document, --label names it. Only documents bound to a schema that keeps versions have any — code files have none.

docly shares <reference>

Who a folder or document is shared with, including pending invitations.

docly published <reference>

Publications on a folder (--doc for a document), with the console reference and the ready-made unpublish command for each.

docly sites

Every published site you can see and the folder it comes from. Filter with --domain, --search, --type, --mine.

docly console <reference>

The site console — console.log and errors from the site's server-side code. The reference is the console reference from docly published. --clear empties it.

docly log

The system log: requests, sign-ins, errors. --errors, --class error, --search, --from/--to, --summary, --types. Answers what the console cannot — a request that failed before your code ran.

docly jobs [job]

Background jobs (copying, deleting, unzipping, package installs). With a job id: its status; --output its lines; --follow until it ends; --stop stops it — what it already did is not undone.

Writing on the server — needs an unlock, and is live immediately, with no diff and no staging:

Command

What it does

docly put <reference> [file]

Write one document from a file or from stdin. --create creates it when the path does not exist yet (the reference is then <folder>/<name>); without the flag a wrong path is refused instead of creating a stray file. The server decides the document type from the extension and content, as for the drive; if that changes the type, the document gets a new id and put prints it.

docly edit <reference> <old> <new>

Replace a piece of text in one document, on the server. Every occurrence is replaced and the count is printed; "" as <new> deletes the match. For a .docly document, match the text as docly get shows it (JSON-escaped, \").

docly mkdir <name> [parent]

Create a folder. --schema binds it to a schema.

docly mv <reference> <target>

Move a folder or document into another folder. The target must be inside the open folder too.

docly rename <reference> <name>

Rename a folder or document. On a folder shared directly with you, a rename only sets an alias that you alone see, and the command says so («Alias set — only you see …»). --for-everyone changes the actual name (needs admin on the share); --remove-alias shows the actual name again.

docly rm <reference>

Delete a document. A folder and everything in it needs --recursive. Something already deleted answers «Already deleted».

docly publish <reference>

Publish a folder, or update a publication with --id <guid>. --alias, --domain (picked for you when you have only one), --template (required for a document), --auth.

docly unpublish <guid> <owner>

Remove a publication. Both values come from docly published.

docly clone-workspace <workspace>

Copy a whole workspace on the server as a background job and print its id. The source must be unlocked. --name (default «<workspace> copy»), --subscription, --follow.

The tool itself: docly with no arguments prints the full reference and never waits for input; docly login, docly logout and docly update are described above.

There is no MCP command. An AI assistant connected over MCP gets its access in the browser when it connects, and docly unlock does not apply to it — see MCP - connect an AI assistant.

The working-copy workflow

docly login                       # once, in your project directory
docly clone /example.com site     # local files in ./site
cd site
# ...edit the files...
docly status                      # what changed
docly diff                        # line by line
docly unlock /example.com         # open the folder you cloned
docly push --dry-run
docly push
docly lock
  • Saving is publishing. A pushed change is live on the next request. Documents bound to a schema that keeps versions get a new version (docly history); .hash, .js, .css and .html files have no history.

  • Unlock the folder you cloned. push works on the whole working copy and checks its root once; if the root is outside the open folder, the whole push is refused — including the files that were inside it.

  • Conflicts. Before writing, push compares each document's server timestamp with the one you cloned or pulled. A document changed on the server in the meantime is not pushed; it is listed under «Conflicts», and docly pull brings the server version in first. The check is not atomic — a change in the moment between the check and the write is not caught.

  • A push that would replace a document is refused. When the new content does not fit the document's type (a Code File that becomes binary, an uploaded file that becomes valid JSON), the server would delete it and create a new one with a new id — shares, publications and links to the old id are lost. push asks the server first and stops before writing anything, listing each file as ! file (Old type -> New type). --allow-replace pushes anyway.

  • New documents are just new files. For a .docly document, write the complete envelope with its Schema; the server picks the type from the extension and content, and there is no schema flag. See Creating new docly files.

  • .doclyignore in the working copy's root keeps local files out of status and push (gitignore-style patterns). .doclycli/ is always ignored.

  • A change of upper/lower case in a file name is not pushed as a rename — the content is pushed under the server's name. Use docly rename for a deliberate rename.

Docly has no git service; this is the working copy. See Use a docly CLI working copy instead of git.

Writing is locked until you unlock a folder

Every write is refused until someone opens one folder for writing: put, edit, push, mv, rename, rm, mkdir, publish, unpublish and clone-workspace. Reading is always allowed, and so is push --dry-run.

docly unlock /example.com/assets   # opens assets and everything below it
docly unlock                       # what is open, and does the server agree?
docly lock                         # close it again
  • One folder and everything below it — not a whole workspace unless you open its root. Two sibling folders do not reach each other.

  • It expires. The output shows when (one hour); run docly unlock again to open it anew.

  • It belongs to the session it was made under. It is stored on your sign-in at the Docly cloud and in .doclycli/unlocked.json. A different docly login — another agent session — does not see it, and an unlock made under a --direct session does not apply through the cloud.

  • mv checks the target as well, mkdir and put --create check the parent folder.

  • There is no override flag, by design. A refused write means the folder is not open: open it, or stop and ask the person who decides.

For AI agents: How an AI agent should use the docly CLI — signing in and unlocking belong to the human.

Exit codes and errors worth knowing

Exit code

Meaning

0

Success. Also returned when push skipped conflicting files (they are listed, not pushed), when rm finds the target already deleted, and when you decline docly update. Read the output: 0 does not mean everything was pushed.

1

An error, printed as Error: … on stderr. Also: a push where a file failed or a replacement was refused, jobs --follow and clone-workspace --follow when the job failed or was stopped, and jobs --stop on a job that had already ended.

130

Cancelled with Ctrl+C.

Message

What it means

Not logged in

Usually the wrong directory, not a missing session. Run from the directory you signed in from, or below it.

Refusing to modify … / writing is locked

The target is outside the open folder. The message names the folder to unlock.

No such path, or you have no access to it

Paths start at the instance root: /<top-level folder>/…. The owner shown by docly sites is not part of the path.

'x' is deleted. It was replaced by …

The guid points at a deleted document, typically after a write changed its type. Use the new id.

Timed out …

docly gave up waiting (100 seconds per request). The server may still have completed the write — check with docly log --errors. push stops after the first timeout and lists the files it did not attempt.

A rejection that names a rule, a field and a line

The content scanner refused the content. It is not a permission problem: change the content, do not retry it unchanged.

edit: text not found / would drop fields / would replace the document / would make it invalid JSON

edit refuses rather than damage: nothing was changed. Match the exact text, or use a working copy or put.

find --contains asks you to narrow the search

A content search ran out of time. Search a smaller folder or add --name or --schema; the same search scope is refused for ten minutes.

Output, scripts and environment

  • --json on the reading commands gives machine-readable output. Use it whenever a script or an agent acts on the result.

  • Paged output says it is paged and prints the command for the next page. A first page is not the whole answer.

  • Timestamps in text output are UTC with the offset written out (2026-10-15 07:41:02 +00:00); --from/--to in docly log read the same form.

  • DOCLY_INSTANCE=<instance> pins which instance a call goes to — needed for docly log on an account with workspaces on several instances. Cloud administrators read the cloud's own log with docly log --cloud.

  • NO_COLOR or --no-color turns colours off; redirected output is never coloured.

  • DOCLY_NO_UPDATE_CHECK=1 turns off the version check.

Related