conpub
conpub is an agent-first CLI for publishing local knowledge files to Confluence Cloud.
The local filesystem is the source of truth. Confluence is the viewing and sharing surface.
Commands
All commands emit JSON by default. Use --pretty to format JSON for humans.
conpub root ~/nv-kb --base-url https://example.atlassian.net
conpub bind projects/cuda-agent --space GPU --parent 123456789
# Install or manage the conpub Agent Skill plugin:
conpub agent doctor
conpub agent install all --from-checkout <checkout-or-unpacked-plugin-archive>
conpub agent update all
conpub agent uninstall all
# Or use CONPUB_* defaults from the shell environment:
conpub root
conpub bind projects/cuda-agent
conpub resolve
conpub index
conpub search "warp occupancy"
conpub search --tag inferlab
conpub search "occupancy" --tag inferlab --tag platform
conpub read projects/cuda-agent/perf/occupancy.md:80
conpub plan
conpub publish --dry-run
conpub publish --yes
conpub sync --dry-run
conpub sync --yes
conpub sync --dry-run perf/occupancy.md
conpub sync --yes perf/occupancy.md docs/
conpub sync --dry-run --archive-deleted
conpub sync --yes --archive-deleted
conpub prune
conpub prune --yes
conpub prune --yes --archive
conpub prune --yes --delete
conpub status
Agent plugin
conpub ships one operator Agent Skill for Codex and Claude. Install the conpub binary first, then use either a source checkout or the matching release's unpacked conpub-plugin.tar.gz:
conpub agent doctor
conpub agent install codex --from-checkout .
conpub agent install claude --from-checkout .
Use all instead of a runtime name to operate on both. The lifecycle commands delegate to each runtime's native plugin manager and emit JSON like every other conpub command:
conpub agent update all
conpub agent uninstall all
The plugin installs only the Agent Skill; it does not install the conpub binary or configure Confluence credentials. Start a new agent thread after installing or updating so the runtime loads the new skill version.
publish --dry-run stages the local publish set and returns the documents that would be published without calling Confluence.
publish --yes performs Confluence writes through the public typub crates from crates.io.
sync --dry-run compares the current local documents with conpub's local publish state and reports create, update, unchanged, and deleted classifications without calling Confluence.
sync --yes publishes only create and update documents, then records successful publishes in the local sync state. It does not read from Confluence and does not delete remote pages for locally deleted files.
sync accepts optional file or directory paths relative to the bound source or configured root. In subset mode it reports only selected documents and does not report global deleted entries.
A deleted entry whose Confluence page id is owned by a live document classifies as superseded: after a local move, provision adopts the remote page by title under the new path, so the old entry points at a page that is still alive. Superseded entries are never archived or deleted remotely — sync and prune drop them from local state without any remote action.
prune reconciles deleted state entries explicitly. Without flags it only drops them from local state, leaving remote pages in place; prune --yes --archive archives the pages first; prune --yes --delete deletes them permanently (a 404 counts as already gone, so reruns are idempotent). --archive and --delete are mutually exclusive. Without --yes, prune reports what it would do and changes nothing.
index writes a persistent local search index. search uses the index only when it is fresh for the current source and document fingerprints; otherwise it falls back to scanning local files. The query string is optional when at least one --tag is present. Repeated --tag filters use AND semantics and match exact tags. A tag-only match has a file-level read_ref; its line and snippet fields are null.
Source metadata and tags
Markdown declares tags in a leading YAML front matter block:
---
tags: [inferlab, platform]
---
# Occupancy Notes
Typst declares the same metadata in one labelled metadata element:
#metadata((
tags: ("inferlab", "platform"),
)) <typub-meta>
= Occupancy Notes
tags is the only source metadata field currently consumed by conpub. Each tag must be lowercase kebab-case, contain only ASCII letters and digits separated by single hyphens, and be at most 255 bytes. conpub sorts and deduplicates tags. Tags are document-local; directory index pages do not pass tags to their children.