confluence-cf 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.4
2
+ Name: confluence-cf
3
+ Version: 0.2.0
4
+ Summary: Agent-friendly Confluence CLI with structured JSON output and jq filtering
5
+ License-Expression: Apache-2.0
6
+ Project-URL: Homepage, https://sofq.github.io/confluence-cli/
7
+ Project-URL: Documentation, https://sofq.github.io/confluence-cli/
8
+ Project-URL: Repository, https://github.com/sofq/confluence-cli
9
+ Project-URL: Issues, https://github.com/sofq/confluence-cli/issues
10
+ Keywords: confluence,cli,ai,agent,json
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development :: Libraries
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+
19
+ # confluence-cf
20
+
21
+ **Confluence CLI built for AI agents** — pure JSON output, semantic exit codes, 200+ auto-generated commands, and built-in jq filtering.
22
+
23
+ Give your AI agent (Claude Code, Cursor, Copilot, or custom bots) reliable, token-efficient access to Confluence Cloud.
24
+
25
+ ## Install
26
+
27
+ ```bash
28
+ pip install confluence-cf
29
+ # or
30
+ uv tool install confluence-cf
31
+ ```
32
+
33
+ ## Why cf?
34
+
35
+ ```bash
36
+ # Full Confluence response: ~8,000 tokens
37
+ cf pages get --id 12345
38
+
39
+ # With cf's filtering: ~50 tokens
40
+ cf pages get --id 12345 --fields id,title --jq '{id: .id, title: .title}'
41
+ ```
42
+
43
+ - **All output is JSON** — stdout for data, stderr for errors, always
44
+ - **Semantic exit codes** — 0=ok, 2=auth, 3=not_found, 5=rate_limited — agents can branch without parsing
45
+ - **200+ commands** from the official Confluence OpenAPI spec, synced daily
46
+ - **Batch operations** — N API calls in one process via `cf batch`
47
+ - **Self-describing** — `cf schema` lets agents discover commands at runtime
48
+ - **Workflow helpers** — `cf workflow move`, `cf workflow copy`, `cf workflow archive`
49
+
50
+ ## Quick start
51
+
52
+ ```bash
53
+ # Configure
54
+ cf configure --base-url https://yoursite.atlassian.net --token YOUR_API_TOKEN
55
+
56
+ # Search pages
57
+ cf search search-content --cql "space = DEV AND type = page" \
58
+ --jq '.results[] | {id, title}'
59
+
60
+ # Export a page tree
61
+ cf export --id 12345 --tree
62
+
63
+ # Batch operations
64
+ echo '[
65
+ {"command":"pages get","args":{"id":"12345"},"jq":".title"},
66
+ {"command":"pages get","args":{"id":"67890"},"jq":".title"}
67
+ ]' | cf batch
68
+ ```
69
+
70
+ ## Also available via
71
+
72
+ - **Homebrew**: `brew install sofq/tap/cf`
73
+ - **npm**: `npm install -g confluence-cf`
74
+ - **Scoop**: `scoop bucket add sofq https://github.com/sofq/scoop-bucket && scoop install cf`
75
+ - **Docker**: `docker run --rm ghcr.io/sofq/cf version`
76
+ - **Go**: `go install github.com/sofq/confluence-cli@latest`
77
+
78
+ ## Documentation
79
+
80
+ Full docs, Claude Code skill, and source at [github.com/sofq/confluence-cli](https://github.com/sofq/confluence-cli).
@@ -0,0 +1,62 @@
1
+ # confluence-cf
2
+
3
+ **Confluence CLI built for AI agents** — pure JSON output, semantic exit codes, 200+ auto-generated commands, and built-in jq filtering.
4
+
5
+ Give your AI agent (Claude Code, Cursor, Copilot, or custom bots) reliable, token-efficient access to Confluence Cloud.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pip install confluence-cf
11
+ # or
12
+ uv tool install confluence-cf
13
+ ```
14
+
15
+ ## Why cf?
16
+
17
+ ```bash
18
+ # Full Confluence response: ~8,000 tokens
19
+ cf pages get --id 12345
20
+
21
+ # With cf's filtering: ~50 tokens
22
+ cf pages get --id 12345 --fields id,title --jq '{id: .id, title: .title}'
23
+ ```
24
+
25
+ - **All output is JSON** — stdout for data, stderr for errors, always
26
+ - **Semantic exit codes** — 0=ok, 2=auth, 3=not_found, 5=rate_limited — agents can branch without parsing
27
+ - **200+ commands** from the official Confluence OpenAPI spec, synced daily
28
+ - **Batch operations** — N API calls in one process via `cf batch`
29
+ - **Self-describing** — `cf schema` lets agents discover commands at runtime
30
+ - **Workflow helpers** — `cf workflow move`, `cf workflow copy`, `cf workflow archive`
31
+
32
+ ## Quick start
33
+
34
+ ```bash
35
+ # Configure
36
+ cf configure --base-url https://yoursite.atlassian.net --token YOUR_API_TOKEN
37
+
38
+ # Search pages
39
+ cf search search-content --cql "space = DEV AND type = page" \
40
+ --jq '.results[] | {id, title}'
41
+
42
+ # Export a page tree
43
+ cf export --id 12345 --tree
44
+
45
+ # Batch operations
46
+ echo '[
47
+ {"command":"pages get","args":{"id":"12345"},"jq":".title"},
48
+ {"command":"pages get","args":{"id":"67890"},"jq":".title"}
49
+ ]' | cf batch
50
+ ```
51
+
52
+ ## Also available via
53
+
54
+ - **Homebrew**: `brew install sofq/tap/cf`
55
+ - **npm**: `npm install -g confluence-cf`
56
+ - **Scoop**: `scoop bucket add sofq https://github.com/sofq/scoop-bucket && scoop install cf`
57
+ - **Docker**: `docker run --rm ghcr.io/sofq/cf version`
58
+ - **Go**: `go install github.com/sofq/confluence-cli@latest`
59
+
60
+ ## Documentation
61
+
62
+ Full docs, Claude Code skill, and source at [github.com/sofq/confluence-cli](https://github.com/sofq/confluence-cli).
@@ -0,0 +1,100 @@
1
+ """confluence-cf: Agent-friendly Confluence CLI binary installer."""
2
+
3
+ import os
4
+ import platform
5
+ import subprocess
6
+ import sys
7
+ import tarfile
8
+ import urllib.request
9
+ import zipfile
10
+ from io import BytesIO
11
+ from pathlib import Path
12
+
13
+ REPO = "sofq/confluence-cli"
14
+
15
+ PLATFORM_MAP = {
16
+ "Darwin": "darwin",
17
+ "Linux": "linux",
18
+ "Windows": "windows",
19
+ }
20
+
21
+ ARCH_MAP = {
22
+ "x86_64": "amd64",
23
+ "AMD64": "amd64",
24
+ "aarch64": "arm64",
25
+ "arm64": "arm64",
26
+ }
27
+
28
+
29
+ def _get_version():
30
+ from importlib.metadata import version
31
+ return version("confluence-cf")
32
+
33
+
34
+ def _get_binary_dir():
35
+ return Path(__file__).parent / "bin"
36
+
37
+
38
+ def _get_binary_path():
39
+ binary = "cf.exe" if platform.system() == "Windows" else "cf"
40
+ return _get_binary_dir() / binary
41
+
42
+
43
+ def _download_url(version, plat, arch):
44
+ ext = "zip" if plat == "windows" else "tar.gz"
45
+ name = f"confluence-cli_{version}_{plat}_{arch}.{ext}"
46
+ return f"https://github.com/{REPO}/releases/download/v{version}/{name}"
47
+
48
+
49
+ def _install_binary():
50
+ binary_path = _get_binary_path()
51
+ if binary_path.exists():
52
+ return binary_path
53
+
54
+ version = _get_version()
55
+ system = PLATFORM_MAP.get(platform.system())
56
+ arch = ARCH_MAP.get(platform.machine())
57
+
58
+ if not system or not arch:
59
+ print(
60
+ f"Unsupported platform: {platform.system()}/{platform.machine()}",
61
+ file=sys.stderr,
62
+ )
63
+ sys.exit(1)
64
+
65
+ url = _download_url(version, system, arch)
66
+ binary_name = "cf.exe" if system == "windows" else "cf"
67
+
68
+ print(f"Downloading cf v{version} for {system}/{arch}...", file=sys.stderr)
69
+
70
+ response = urllib.request.urlopen(url)
71
+ data = response.read()
72
+
73
+ bin_dir = _get_binary_dir()
74
+ bin_dir.mkdir(parents=True, exist_ok=True)
75
+
76
+ if system == "windows":
77
+ with zipfile.ZipFile(BytesIO(data)) as zf:
78
+ for name in zf.namelist():
79
+ if name == binary_name or name.endswith(f"/{binary_name}"):
80
+ with zf.open(name) as src, open(binary_path, "wb") as dst:
81
+ dst.write(src.read())
82
+ break
83
+ else:
84
+ with tarfile.open(fileobj=BytesIO(data), mode="r:gz") as tf:
85
+ for member in tf.getmembers():
86
+ if member.name == binary_name or member.name.endswith(f"/{binary_name}"):
87
+ f = tf.extractfile(member)
88
+ if f:
89
+ binary_path.write_bytes(f.read())
90
+ break
91
+
92
+ binary_path.chmod(0o755)
93
+ print(f"Installed cf to {binary_path}", file=sys.stderr)
94
+ return binary_path
95
+
96
+
97
+ def main():
98
+ binary = _install_binary()
99
+ result = subprocess.run([str(binary)] + sys.argv[1:])
100
+ sys.exit(result.returncode)
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.4
2
+ Name: confluence-cf
3
+ Version: 0.2.0
4
+ Summary: Agent-friendly Confluence CLI with structured JSON output and jq filtering
5
+ License-Expression: Apache-2.0
6
+ Project-URL: Homepage, https://sofq.github.io/confluence-cli/
7
+ Project-URL: Documentation, https://sofq.github.io/confluence-cli/
8
+ Project-URL: Repository, https://github.com/sofq/confluence-cli
9
+ Project-URL: Issues, https://github.com/sofq/confluence-cli/issues
10
+ Keywords: confluence,cli,ai,agent,json
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development :: Libraries
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+
19
+ # confluence-cf
20
+
21
+ **Confluence CLI built for AI agents** — pure JSON output, semantic exit codes, 200+ auto-generated commands, and built-in jq filtering.
22
+
23
+ Give your AI agent (Claude Code, Cursor, Copilot, or custom bots) reliable, token-efficient access to Confluence Cloud.
24
+
25
+ ## Install
26
+
27
+ ```bash
28
+ pip install confluence-cf
29
+ # or
30
+ uv tool install confluence-cf
31
+ ```
32
+
33
+ ## Why cf?
34
+
35
+ ```bash
36
+ # Full Confluence response: ~8,000 tokens
37
+ cf pages get --id 12345
38
+
39
+ # With cf's filtering: ~50 tokens
40
+ cf pages get --id 12345 --fields id,title --jq '{id: .id, title: .title}'
41
+ ```
42
+
43
+ - **All output is JSON** — stdout for data, stderr for errors, always
44
+ - **Semantic exit codes** — 0=ok, 2=auth, 3=not_found, 5=rate_limited — agents can branch without parsing
45
+ - **200+ commands** from the official Confluence OpenAPI spec, synced daily
46
+ - **Batch operations** — N API calls in one process via `cf batch`
47
+ - **Self-describing** — `cf schema` lets agents discover commands at runtime
48
+ - **Workflow helpers** — `cf workflow move`, `cf workflow copy`, `cf workflow archive`
49
+
50
+ ## Quick start
51
+
52
+ ```bash
53
+ # Configure
54
+ cf configure --base-url https://yoursite.atlassian.net --token YOUR_API_TOKEN
55
+
56
+ # Search pages
57
+ cf search search-content --cql "space = DEV AND type = page" \
58
+ --jq '.results[] | {id, title}'
59
+
60
+ # Export a page tree
61
+ cf export --id 12345 --tree
62
+
63
+ # Batch operations
64
+ echo '[
65
+ {"command":"pages get","args":{"id":"12345"},"jq":".title"},
66
+ {"command":"pages get","args":{"id":"67890"},"jq":".title"}
67
+ ]' | cf batch
68
+ ```
69
+
70
+ ## Also available via
71
+
72
+ - **Homebrew**: `brew install sofq/tap/cf`
73
+ - **npm**: `npm install -g confluence-cf`
74
+ - **Scoop**: `scoop bucket add sofq https://github.com/sofq/scoop-bucket && scoop install cf`
75
+ - **Docker**: `docker run --rm ghcr.io/sofq/cf version`
76
+ - **Go**: `go install github.com/sofq/confluence-cli@latest`
77
+
78
+ ## Documentation
79
+
80
+ Full docs, Claude Code skill, and source at [github.com/sofq/confluence-cli](https://github.com/sofq/confluence-cli).
@@ -0,0 +1,8 @@
1
+ README.md
2
+ pyproject.toml
3
+ confluence_cf/__init__.py
4
+ confluence_cf.egg-info/PKG-INFO
5
+ confluence_cf.egg-info/SOURCES.txt
6
+ confluence_cf.egg-info/dependency_links.txt
7
+ confluence_cf.egg-info/entry_points.txt
8
+ confluence_cf.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ cf = confluence_cf:main
@@ -0,0 +1,2 @@
1
+ confluence_cf
2
+ dist
@@ -0,0 +1,31 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "confluence-cf"
7
+ version = "0.2.0"
8
+ description = "Agent-friendly Confluence CLI with structured JSON output and jq filtering"
9
+ readme = "README.md"
10
+ license = "Apache-2.0"
11
+ requires-python = ">=3.8"
12
+ keywords = ["confluence", "cli", "ai", "agent", "json"]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Environment :: Console",
16
+ "Intended Audience :: Developers",
17
+ "Programming Language :: Python :: 3",
18
+ "Topic :: Software Development :: Libraries",
19
+ ]
20
+
21
+ [project.urls]
22
+ Homepage = "https://sofq.github.io/confluence-cli/"
23
+ Documentation = "https://sofq.github.io/confluence-cli/"
24
+ Repository = "https://github.com/sofq/confluence-cli"
25
+ Issues = "https://github.com/sofq/confluence-cli/issues"
26
+
27
+ [project.scripts]
28
+ cf = "confluence_cf:main"
29
+
30
+ [tool.setuptools.packages.find]
31
+ where = ["."]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+