Manage docsfy from the CLI
Use the CLI when you want to manage docsfy from a shell, script, or remote session instead of the browser. A saved server profile makes health checks, generations, status lookups, downloads, and admin tasks faster and easier to repeat.
Prerequisites
- A running docsfy server you can reach
- The
docsfycommand available on your machine - An API key for that server
- For the built-in admin account, the username is
admin - For generation, a server that already has a working AI provider configured
Quick Example
docsfy config init
docsfy health
docsfy generate https://github.com/org/my-repo.git --watch
docsfy status my-repo
docsfy download my-repo
In this flow, my-repo is the project name derived from the Git URL. download fetches the newest ready variant you can access.
Step-by-Step
- Save a reusable server profile.
docsfy config init
docsfy config show
When docsfy config init asks for Password, enter your API key.
A saved profile looks like this:
[default]
server = "dev"
[servers.dev]
url = "http://localhost:8000"
username = "admin"
password = "<your-dev-key>"
The first profile you create becomes the default server. Later profiles are added without changing the existing default.
Note: The CLI stores profiles in
~/.config/docsfy/config.toml, masks saved passwords indocsfy config show, and writes the file with owner-only permissions.
- Confirm that the CLI can reach the right server.
docsfy health
A healthy server returns a short result like this:
Server: http://localhost:8000
Status: ok
Run this first whenever you switch profiles or change environments.
- Start a generation from a Git remote.
docsfy generate https://github.com/org/my-repo.git --watch
Use a normal HTTPS or SSH Git URL. If you omit --branch, docsfy uses main. If you omit --provider and --model, the server uses its current defaults.
Later CLI commands use the repository name, so https://github.com/org/my-repo.git becomes my-repo.
Warning:
docsfy generatetakes a Git URL, not a local filesystem path.Warning: Branch names cannot contain
/. Use names likerelease-1.x, notrelease/1.x.
If you want to generate another branch or model on purpose, see Regenerate for New Branches and Models.
- Check what is running and inspect the result.
docsfy list
docsfy status my-repo
list gives you a table of accessible variants. Each row is one variant, so the same project can appear more than once.
status shows the details for one project, including the owner, current status, page count, last update time, short commit, current stage, and any error message.
If you want one exact variant instead of every variant for the project, pass all three selectors together:
docsfy status my-repo --branch main --provider cursor --model gpt-5.4-xhigh-fast
For the full meaning of statuses and stages, see Track Generation Progress.
- Download the finished site.
docsfy download my-repo
This saves the newest ready variant you can access as a .tar.gz file in your current directory.
If you want to unpack it immediately instead:
docsfy download my-repo --output ./site
Tip: Use exact selectors when you need one specific variant instead of the latest ready one.
See CLI Command Reference for the full syntax and every flag.
Advanced Usage
### Switch servers or override a saved profiledocsfy config set default.server prod
docsfy --host myhost --port 9000 -u admin -p <your-api-key> health
docsfy models
docsfy models --provider cursor
docsfy models --json
docsfy abort my-repo
docsfy abort my-repo --branch main --provider cursor --model gpt-5.4-xhigh-fast
docsfy delete my-repo --branch main --provider cursor --model gpt-5.4-xhigh-fast --yes
docsfy delete my-repo --all --yes
docsfy download my-repo --branch main --provider cursor --model gpt-5.4-xhigh-fast --output ./site
docsfy status shared-name --branch main --provider claude --model opus --owner alice
docsfy download shared-name --branch main --provider claude --model opus --owner alice
docsfy admin users list
docsfy admin users create newuser --role user
docsfy admin users rotate-key newuser
docsfy admin access grant my-repo --username newuser --owner admin
docsfy admin access list my-repo --owner admin
docsfy admin access revoke my-repo --username newuser --owner admin
docsfy config set servers.dev.password <new-api-key>
docsfy list --json
docsfy status my-repo --json
docsfy admin users list --json
Troubleshooting
No server configured: rundocsfy config init, or pass--host,--username, and--passwordbefore the subcommand.Server unreachableor a redirect error: check the saved URL, host, and port withdocsfy config showanddocsfy health.Write access required: you authenticated as aviewer; use auseroradminaccount forgenerate,abort, anddelete.Variant not ready: wait untildocsfy status my-reposhows a ready variant, then download again.Multiple active variants foundorMultiple owners found: rerun the command with--branch,--provider, and--model; if you are an admin and need one owner's copy, add--owner.Invalid branch name: rename the branch argument to something likerelease-1.x.- A Git URL to
localhostor another private network host is rejected: use a remote the server can reach.