- API, Mac client

This commit is contained in:
Ty Clifford
2026-07-05 15:58:51 -04:00
parent 9dbd29d8aa
commit 729b29276f
14 changed files with 1682 additions and 1 deletions
+25
View File
@@ -42,6 +42,31 @@ php cli/blog.php delete old-slug
php cli/blog.php rebuild
```
## Mac Client and API
The native macOS 12+ client lives in `macclient/`.
```bash
cd macclient
swift run TCMSMacClient
```
Point the client at any TCMS site URL. It will call `api.php` at that site for posts, pages, media, comments, local autosave restore, and optional remote draft autosave.
For remote servers, set an API token in `config/site.json` or through the `TCMS_API_TOKEN` environment variable:
```json
{
"api": {
"enabled": true,
"token": "replace-with-a-long-random-token",
"allow_local_without_token": true
}
}
```
Send the token as a Bearer token or `X-TCMS-Token`. Localhost requests may use the tokenless development fallback while `allow_local_without_token` is enabled.
## Comments
Comments are moderated by default and protected by captcha plus a honeypot field.