zernio-cli 0.4.0

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.
Files changed (63) hide show
  1. package/README.md +145 -0
  2. package/SKILL.md +98 -0
  3. package/claude/plugin.json +23 -0
  4. package/claude/skills/zernio/SKILL.md +83 -0
  5. package/claude/skills/zernio/references/zernio-api-surface.md +48 -0
  6. package/claude/skills/zernio/references/zernio-best-practices.md +33 -0
  7. package/claude/skills/zernio/references/zernio-workflows.md +58 -0
  8. package/dist/client.d.ts +6 -0
  9. package/dist/client.js +14 -0
  10. package/dist/commands/accounts.d.ts +3 -0
  11. package/dist/commands/accounts.js +53 -0
  12. package/dist/commands/analytics.d.ts +3 -0
  13. package/dist/commands/analytics.js +85 -0
  14. package/dist/commands/api.d.ts +2 -0
  15. package/dist/commands/api.js +108 -0
  16. package/dist/commands/auth.d.ts +3 -0
  17. package/dist/commands/auth.js +138 -0
  18. package/dist/commands/automations.d.ts +5 -0
  19. package/dist/commands/automations.js +139 -0
  20. package/dist/commands/broadcasts.d.ts +5 -0
  21. package/dist/commands/broadcasts.js +184 -0
  22. package/dist/commands/contacts.d.ts +6 -0
  23. package/dist/commands/contacts.js +198 -0
  24. package/dist/commands/doctor.d.ts +2 -0
  25. package/dist/commands/doctor.js +51 -0
  26. package/dist/commands/inbox.d.ts +6 -0
  27. package/dist/commands/inbox.js +222 -0
  28. package/dist/commands/media.d.ts +3 -0
  29. package/dist/commands/media.js +76 -0
  30. package/dist/commands/platforms.d.ts +2 -0
  31. package/dist/commands/platforms.js +27 -0
  32. package/dist/commands/posts.d.ts +3 -0
  33. package/dist/commands/posts.js +129 -0
  34. package/dist/commands/profiles.d.ts +3 -0
  35. package/dist/commands/profiles.js +82 -0
  36. package/dist/commands/sequences.d.ts +5 -0
  37. package/dist/commands/sequences.js +178 -0
  38. package/dist/generated/openapi-catalog.d.ts +8961 -0
  39. package/dist/generated/openapi-catalog.js +3 -0
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.js +61 -0
  42. package/dist/utils/api-request.d.ts +31 -0
  43. package/dist/utils/api-request.js +115 -0
  44. package/dist/utils/argument-parsing.d.ts +3 -0
  45. package/dist/utils/argument-parsing.js +27 -0
  46. package/dist/utils/config.d.ts +27 -0
  47. package/dist/utils/config.js +111 -0
  48. package/dist/utils/errors.d.ts +5 -0
  49. package/dist/utils/errors.js +12 -0
  50. package/dist/utils/openapi-catalog.d.ts +16 -0
  51. package/dist/utils/openapi-catalog.js +58 -0
  52. package/dist/utils/output.d.ts +9 -0
  53. package/dist/utils/output.js +24 -0
  54. package/docs/architecture.md +37 -0
  55. package/docs/cli.md +99 -0
  56. package/docs/code-standards.md +11 -0
  57. package/docs/contributing.md +34 -0
  58. package/docs/development-roadmap.md +32 -0
  59. package/docs/openapi/zernio-api-openapi.yaml +30967 -0
  60. package/docs/project-changelog.md +15 -0
  61. package/docs/project-overview-pdr.md +25 -0
  62. package/docs/system-architecture.md +28 -0
  63. package/package.json +82 -0
@@ -0,0 +1,15 @@
1
+ # Project Changelog
2
+
3
+ ## 2026-06-14
4
+
5
+ - Renamed package identity from official-style `@zernio/cli` to unofficial `zernio-cli`.
6
+ - Added deterministic OpenAPI catalog generation from bundled Zernio spec.
7
+ - Added `api:catalog`, `api:describe`, and `api:call`.
8
+ - Added header, raw-body, and safe retry header support for generic `api:call`.
9
+ - Added `doctor` and `platforms:list`.
10
+ - Replaced vulnerable `tsup` build path with plain `tsc`.
11
+ - Added CI, semantic-release, tests, audit gate, and release workflow validation gates.
12
+ - Hardened config handling: cwd dotenv loading is explicit opt-in, saved config files are private, and saved keys are not sent to arbitrary one-off hosts.
13
+ - Fixed `doctor --connection` so failed API checks exit non-zero for CI and scripts.
14
+ - Added coverage-gated tests for critical agent CLI paths: `api:*`, `doctor`, `platforms`, config, request construction, parsing, output, and error handling.
15
+ - Updated docs and skill guidance for media uploads, queue scheduling, errors, rate limits, and platforms.
@@ -0,0 +1,25 @@
1
+ # Project Overview PDR
2
+
3
+ ## Goal
4
+
5
+ Ship an unofficial Zernio CLI that is useful for humans and agents.
6
+
7
+ ## Users
8
+
9
+ - Developers automating social media workflows.
10
+ - Agents that need JSON-first command output.
11
+ - Operators testing Zernio API endpoints from terminal.
12
+
13
+ ## Requirements
14
+
15
+ - Install with `npm install -g zernio-cli`.
16
+ - Keep `zernio` binary and deprecated `late` alias.
17
+ - Support curated workflows and full OpenAPI endpoint access.
18
+ - Release stable from `main`, beta from `dev`.
19
+ - Never expose `NPM_TOKEN` or `ZERNIO_API_KEY`.
20
+
21
+ ## Non-Goals
22
+
23
+ - No MCP server.
24
+ - No replacement for official Zernio docs.
25
+ - No local scheduling engine; Zernio remains source of truth.
@@ -0,0 +1,28 @@
1
+ # System Architecture
2
+
3
+ ```text
4
+ User / Agent
5
+ |
6
+ v
7
+ zernio CLI (yargs)
8
+ |
9
+ +-- curated commands -> @zernio/node SDK -> Zernio API
10
+ |
11
+ +-- api:* commands -> raw fetch helper -> Zernio API
12
+ |
13
+ +-- media:upload -> presign endpoint -> direct PUT upload URL
14
+ ```
15
+
16
+ ## Release Flow
17
+
18
+ ```text
19
+ conventional commit
20
+ |
21
+ push main/dev
22
+ |
23
+ CI: install, generate, typecheck, test, audit
24
+ |
25
+ semantic-release
26
+ |
27
+ npm + GitHub release + changelog
28
+ ```
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "zernio-cli",
3
+ "version": "0.4.0",
4
+ "description": "Unofficial agent-friendly CLI for the Zernio API",
5
+ "type": "module",
6
+ "bin": {
7
+ "late": "./dist/index.js",
8
+ "zernio": "./dist/index.js"
9
+ },
10
+ "main": "./dist/index.js",
11
+ "files": [
12
+ "dist",
13
+ "claude/skills/zernio",
14
+ "claude/plugin.json",
15
+ "docs",
16
+ "SKILL.md",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "generate:openapi": "node scripts/generate-openapi-catalog.mjs",
21
+ "build": "npm run generate:openapi && tsc -p tsconfig.json && node scripts/add-cli-shebang.mjs",
22
+ "dev": "tsx src/index.ts",
23
+ "test": "npm run generate:openapi && vitest run",
24
+ "test:coverage": "npm run generate:openapi && vitest run --coverage",
25
+ "typecheck": "npm run generate:openapi && tsc --noEmit",
26
+ "lint": "npm run typecheck",
27
+ "release": "semantic-release",
28
+ "prepublishOnly": "npm run build && npm run test:coverage"
29
+ },
30
+ "keywords": [
31
+ "social-media",
32
+ "scheduling",
33
+ "cli",
34
+ "ai-agent",
35
+ "instagram",
36
+ "tiktok",
37
+ "twitter",
38
+ "linkedin",
39
+ "facebook",
40
+ "threads",
41
+ "youtube",
42
+ "bluesky",
43
+ "pinterest"
44
+ ],
45
+ "author": "mrgoonie",
46
+ "license": "MIT",
47
+ "homepage": "https://github.com/mrgoonie/zernio-cli#readme",
48
+ "bugs": {
49
+ "url": "https://github.com/mrgoonie/zernio-cli/issues"
50
+ },
51
+ "engines": {
52
+ "node": ">=20"
53
+ },
54
+ "publishConfig": {
55
+ "access": "public",
56
+ "provenance": true
57
+ },
58
+ "repository": {
59
+ "type": "git",
60
+ "url": "git+https://github.com/mrgoonie/zernio-cli.git"
61
+ },
62
+ "dependencies": {
63
+ "@zernio/node": "^0.2.261",
64
+ "dotenv": "^17.4.2",
65
+ "open": "^11.0.0",
66
+ "yargs": "^18.0.0"
67
+ },
68
+ "devDependencies": {
69
+ "@semantic-release/changelog": "^6.0.3",
70
+ "@semantic-release/git": "^10.0.1",
71
+ "@semantic-release/github": "^12.0.8",
72
+ "@semantic-release/npm": "^13.1.5",
73
+ "@types/node": "^20.19.43",
74
+ "@types/yargs": "^17.0.35",
75
+ "@vitest/coverage-v8": "^4.1.8",
76
+ "semantic-release": "^25.0.5",
77
+ "tsx": "^4.22.4",
78
+ "typescript": "^6.0.3",
79
+ "vitest": "^4.1.8",
80
+ "yaml": "^2.9.0"
81
+ }
82
+ }