anywrite
Overview
anywrite is a single compiled Bun/TypeScript CLI for the Anytype desktop app's local HTTP API — all 52 endpoints across spaces, objects, properties, tags, types, templates, lists, chat, files, members, search, and auth — as one binary with zero runtime dependencies. It exists as a low-context alternative to Anytype's official MCP server: rather than exposing 52 always-loaded tools to every agent session, anywrite is a normal CLI wired as a skill that costs zero context until it's actually invoked, and is equally usable from a terminal or any script.
When to Use This Skill
- Use when the user mentions Anytype or asks to create, update, search, or organize notes, tasks, or PKM objects.
- Use when working with Anytype spaces, properties, tags, types, templates, or lists (sets and collections).
- Use when the user asks to upload files to a space, chat inside a space, or read/write structured objects programmatically.
How It Works
Step 1: Ensure Anytype desktop is running and authenticated
This repository does not ship the anywrite executable. The user must install or build a reviewed upstream release outside the current workspace and provide its explicit absolute path. Before use, verify that path is an executable regular file, is not a symlink, and is not a workspace-relative dist/ artifact. Never auto-discover or execute ./dist/anywrite from the repository being worked on.
The Anytype desktop app must be running locally (default http://localhost:31009). Authenticate once:
"/absolute/path/to/anywrite" auth --status # shows configured yes/no and where the key came from
"/absolute/path/to/anywrite" auth # challenge flow — a 4-digit code appears in the app
"/absolute/path/to/anywrite" auth --code 1234 # non-interactive form of the same exchange
The key is written to ~/.anywrite/config.json and is never printed by any command.
Step 2: Invoke a resource + action
anywrite <resource> <action> [positionals] [--flag value]
Resources: spaces, objects, properties, tags, types, templates, lists, files, members, search, chat, auth. Output is JSON by default; add --pretty for a human view, --json as an escape hatch for anything the typed flags don't model yet. space/type/property positionals accept a name or an id — names are resolved to ids automatically.
Examples
Example 1: Create and update an object
"/absolute/path/to/anywrite" objects create <space> --type task --name "Buy milk"
"/absolute/path/to/anywrite" objects update <space> <object_id> --status "Done"
Example 2: Search and upload a file
"/absolute/path/to/anywrite" search global --query "task" --types task
"/absolute/path/to/anywrite" files upload <space> --file ./image.png
Example 3: Read chat messages
"/absolute/path/to/anywrite" chat messages <space> <chat_id> --all
Best Practices
- ✅ Pass names for
space/type/property and let the CLI resolve them to ids.
- ✅ Use default JSON output for scripting and
--pretty for human review.
- ✅ Reach for
--json when a brand-new API field isn't yet covered by a typed flag.
- ❌ Don't set an empty-string emoji
--icon; omit the flag entirely instead.
- ❌ Don't expect
lists add/remove to work on sets — they only apply to collections.
Limitations
- This skill does not replace environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, or safety boundaries are missing.
- Bounded by the Anytype local API itself: no block-level editing (body is whole-markdown replace only), no member invite/role management, no template create/update/delete, no space deletion.
- The object body field is named
--body on create but --markdown on update.
Security & Safety Notes
- The API key is stored locally in
~/.anywrite/config.json and is never printed by any command, including auth --status.
- Config precedence at runtime:
ANYTYPE_API_KEY env var, then ~/.anywrite/config.json, then a read-only fallback to an existing ~/.anytype-cli/config.yaml.
- All operations target a locally-running Anytype desktop instance; no data is sent to third-party servers.
- Delete is a soft archive everywhere and is idempotent — a repeated delete stays
200, never 410.
Common Pitfalls
- Problem:
lists add/remove silently does nothing on a set.
Solution: These only work on collections, not sets.
- Problem: Re-uploading an identical file returns an existing object id instead of a new one.
Solution: This is intentional — file upload dedupes by content hash.
- Problem: Chat messages don't paginate like everything else.
Solution: Chat paginates by cursor; every other resource paginates by offset.
Related Skills
@docx - When the deliverable is a Word document rather than an Anytype object.
1---2name: anywrite3description: "Compiled CLI covering all 52 endpoints of the Anytype local API — objects, properties, tags, search, chat, files — one binary, no MCP server needed."4category: productivity5risk: critical6source: community7source_repo: Antheurus/anywrite8source_type: community9date_added: "2026-07-15"10author: Antheurus11tags: [anytype, cli, pkm, notes, api-integration, productivity, knowledge-management]12tools: [claude, cursor, gemini, codex]13license: "MIT"14license_source: "https://github.com/Antheurus/anywrite/blob/main/LICENSE"15plugin:16 targets:17 codex: blocked18 claude: blocked19 setup:20 type: manual21 summary: "Requires a separately installed, user-approved anywrite executable at an explicit absolute path."22 docs: SKILL.md23metadata:24 source: https://skillmd.com/skills/mhassan0000/anywrite25---2627# anywrite2829## Overview3031`anywrite` is a single compiled Bun/TypeScript CLI for the [Anytype](https://anytype.io) desktop app's local HTTP API — **all 52 endpoints** across spaces, objects, properties, tags, types, templates, lists, chat, files, members, search, and auth — as one binary with zero runtime dependencies. It exists as a low-context alternative to Anytype's official MCP server: rather than exposing 52 always-loaded tools to every agent session, `anywrite` is a normal CLI wired as a skill that costs zero context until it's actually invoked, and is equally usable from a terminal or any script.3233## When to Use This Skill3435- Use when the user mentions Anytype or asks to create, update, search, or organize notes, tasks, or PKM objects.36- Use when working with Anytype spaces, properties, tags, types, templates, or lists (sets and collections).37- Use when the user asks to upload files to a space, chat inside a space, or read/write structured objects programmatically.3839## How It Works4041### Step 1: Ensure Anytype desktop is running and authenticated4243This repository does not ship the `anywrite` executable. The user must install or build a reviewed upstream release outside the current workspace and provide its explicit absolute path. Before use, verify that path is an executable regular file, is not a symlink, and is not a workspace-relative `dist/` artifact. Never auto-discover or execute `./dist/anywrite` from the repository being worked on.4445The Anytype desktop app must be running locally (default `http://localhost:31009`). Authenticate once:4647```bash48"/absolute/path/to/anywrite" auth --status # shows configured yes/no and where the key came from49"/absolute/path/to/anywrite" auth # challenge flow — a 4-digit code appears in the app50"/absolute/path/to/anywrite" auth --code 1234 # non-interactive form of the same exchange51```5253The key is written to `~/.anywrite/config.json` and is never printed by any command.5455### Step 2: Invoke a resource + action5657```58anywrite <resource> <action> [positionals] [--flag value]59```6061Resources: `spaces`, `objects`, `properties`, `tags`, `types`, `templates`, `lists`, `files`, `members`, `search`, `chat`, `auth`. Output is JSON by default; add `--pretty` for a human view, `--json` as an escape hatch for anything the typed flags don't model yet. `space`/`type`/`property` positionals accept a name or an id — names are resolved to ids automatically.6263## Examples6465### Example 1: Create and update an object6667```bash68"/absolute/path/to/anywrite" objects create <space> --type task --name "Buy milk"69"/absolute/path/to/anywrite" objects update <space> <object_id> --status "Done"70```7172### Example 2: Search and upload a file7374```bash75"/absolute/path/to/anywrite" search global --query "task" --types task76"/absolute/path/to/anywrite" files upload <space> --file ./image.png77```7879### Example 3: Read chat messages8081```bash82"/absolute/path/to/anywrite" chat messages <space> <chat_id> --all83```8485## Best Practices8687- ✅ Pass names for `space`/`type`/`property` and let the CLI resolve them to ids.88- ✅ Use default JSON output for scripting and `--pretty` for human review.89- ✅ Reach for `--json` when a brand-new API field isn't yet covered by a typed flag.90- ❌ Don't set an empty-string emoji `--icon`; omit the flag entirely instead.91- ❌ Don't expect `lists add`/`remove` to work on sets — they only apply to collections.9293## Limitations9495- This skill does not replace environment-specific validation, testing, or expert review.96- Stop and ask for clarification if required inputs, permissions, or safety boundaries are missing.97- Bounded by the Anytype local API itself: no block-level editing (body is whole-markdown replace only), no member invite/role management, no template create/update/delete, no space deletion.98- The object body field is named `--body` on create but `--markdown` on update.99100## Security & Safety Notes101102- The API key is stored locally in `~/.anywrite/config.json` and is never printed by any command, including `auth --status`.103- Config precedence at runtime: `ANYTYPE_API_KEY` env var, then `~/.anywrite/config.json`, then a read-only fallback to an existing `~/.anytype-cli/config.yaml`.104- All operations target a locally-running Anytype desktop instance; no data is sent to third-party servers.105- Delete is a soft archive everywhere and is idempotent — a repeated delete stays `200`, never `410`.106107## Common Pitfalls108109- **Problem:** `lists add`/`remove` silently does nothing on a set.110 **Solution:** These only work on collections, not sets.111- **Problem:** Re-uploading an identical file returns an existing object id instead of a new one.112 **Solution:** This is intentional — file upload dedupes by content hash.113- **Problem:** Chat messages don't paginate like everything else.114 **Solution:** Chat paginates by cursor; every other resource paginates by offset.115116## Related Skills117118- `@docx` - When the deliverable is a Word document rather than an Anytype object.