socialcli 0.3.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.

Potentially problematic release.


This version of socialcli might be problematic. Click here for more details.

Files changed (224) hide show
  1. socialcli-0.3.0/.gitignore +38 -0
  2. socialcli-0.3.0/LICENSE +21 -0
  3. socialcli-0.3.0/PKG-INFO +168 -0
  4. socialcli-0.3.0/README.md +145 -0
  5. socialcli-0.3.0/pyproject.toml +51 -0
  6. socialcli-0.3.0/socialctl/__init__.py +0 -0
  7. socialcli-0.3.0/socialctl/__main__.py +6 -0
  8. socialcli-0.3.0/socialctl/adapters/__init__.py +6 -0
  9. socialcli-0.3.0/socialctl/adapters/base.py +68 -0
  10. socialcli-0.3.0/socialctl/adapters/errores.py +56 -0
  11. socialcli-0.3.0/socialctl/adapters/facebook.py +180 -0
  12. socialcli-0.3.0/socialctl/adapters/instagram.py +442 -0
  13. socialcli-0.3.0/socialctl/adapters/tiktok.py +535 -0
  14. socialcli-0.3.0/socialctl/adapters/youtube.py +331 -0
  15. socialcli-0.3.0/socialctl/agent_errors.py +176 -0
  16. socialcli-0.3.0/socialctl/agent_guide.py +23 -0
  17. socialcli-0.3.0/socialctl/approval_cli.py +27 -0
  18. socialcli-0.3.0/socialctl/auth.py +139 -0
  19. socialcli-0.3.0/socialctl/authflow.py +344 -0
  20. socialcli-0.3.0/socialctl/brands.py +194 -0
  21. socialcli-0.3.0/socialctl/capabilities.py +57 -0
  22. socialcli-0.3.0/socialctl/capabilities.yml +5945 -0
  23. socialcli-0.3.0/socialctl/cli.py +1766 -0
  24. socialcli-0.3.0/socialctl/connection_service/__init__.py +0 -0
  25. socialcli-0.3.0/socialctl/connection_service/__main__.py +33 -0
  26. socialcli-0.3.0/socialctl/connection_service/app.py +496 -0
  27. socialcli-0.3.0/socialctl/connection_service/assets/PLATFORM-LOGOS-LICENSE.txt +50 -0
  28. socialcli-0.3.0/socialctl/connection_service/assets/connection.css +75 -0
  29. socialcli-0.3.0/socialctl/connection_service/assets/facebook.webp +0 -0
  30. socialcli-0.3.0/socialctl/connection_service/assets/instagram.svg +194 -0
  31. socialcli-0.3.0/socialctl/connection_service/assets/socialcli-logo.png +0 -0
  32. socialcli-0.3.0/socialctl/connection_service/assets/tiktok.png +0 -0
  33. socialcli-0.3.0/socialctl/connection_service/assets/youtube.svg +1 -0
  34. socialcli-0.3.0/socialctl/connection_service/landing.py +146 -0
  35. socialcli-0.3.0/socialctl/connection_service/legacy.py +48 -0
  36. socialcli-0.3.0/socialctl/connection_service/peer.py +13 -0
  37. socialcli-0.3.0/socialctl/connection_service/providers.py +324 -0
  38. socialcli-0.3.0/socialctl/connection_service/settings.py +76 -0
  39. socialcli-0.3.0/socialctl/connection_service/store.py +124 -0
  40. socialcli-0.3.0/socialctl/connections/__init__.py +0 -0
  41. socialcli-0.3.0/socialctl/connections/account_cli.py +438 -0
  42. socialcli-0.3.0/socialctl/connections/cli.py +379 -0
  43. socialcli-0.3.0/socialctl/connections/client.py +126 -0
  44. socialcli-0.3.0/socialctl/connections/credential_cli.py +224 -0
  45. socialcli-0.3.0/socialctl/connections/credential_store.py +49 -0
  46. socialcli-0.3.0/socialctl/connections/file_store.py +193 -0
  47. socialcli-0.3.0/socialctl/connections/keychain.py +78 -0
  48. socialcli-0.3.0/socialctl/connections/meta_user.py +81 -0
  49. socialcli-0.3.0/socialctl/connections/rotation_cli.py +116 -0
  50. socialcli-0.3.0/socialctl/connections/saas_client.py +91 -0
  51. socialcli-0.3.0/socialctl/connections/temporary_media.py +62 -0
  52. socialcli-0.3.0/socialctl/delivery_options.py +70 -0
  53. socialcli-0.3.0/socialctl/engagement.py +200 -0
  54. socialcli-0.3.0/socialctl/engagement_cli.py +50 -0
  55. socialcli-0.3.0/socialctl/executor.py +135 -0
  56. socialcli-0.3.0/socialctl/formatter.py +291 -0
  57. socialcli-0.3.0/socialctl/hosted_media.py +152 -0
  58. socialcli-0.3.0/socialctl/identity.py +200 -0
  59. socialcli-0.3.0/socialctl/inbox.py +298 -0
  60. socialcli-0.3.0/socialctl/inbox_cli.py +46 -0
  61. socialcli-0.3.0/socialctl/inventory.py +155 -0
  62. socialcli-0.3.0/socialctl/inventory_cli.py +171 -0
  63. socialcli-0.3.0/socialctl/inventory_sources.py +101 -0
  64. socialcli-0.3.0/socialctl/management/__init__.py +1 -0
  65. socialcli-0.3.0/socialctl/management/batch_cli.py +115 -0
  66. socialcli-0.3.0/socialctl/management/batches.py +325 -0
  67. socialcli-0.3.0/socialctl/management/changes.py +485 -0
  68. socialcli-0.3.0/socialctl/management/cli.py +227 -0
  69. socialcli-0.3.0/socialctl/management/comments_cli.py +352 -0
  70. socialcli-0.3.0/socialctl/management/community_batch_cli.py +63 -0
  71. socialcli-0.3.0/socialctl/management/community_batches.py +294 -0
  72. socialcli-0.3.0/socialctl/management/community_changes.py +370 -0
  73. socialcli-0.3.0/socialctl/management/community_cli.py +142 -0
  74. socialcli-0.3.0/socialctl/management/community_schema.py +119 -0
  75. socialcli-0.3.0/socialctl/management/facebook_groups.py +1118 -0
  76. socialcli-0.3.0/socialctl/management/groups_cli.py +274 -0
  77. socialcli-0.3.0/socialctl/management/inbox_readers.py +87 -0
  78. socialcli-0.3.0/socialctl/management/meta_changes.py +197 -0
  79. socialcli-0.3.0/socialctl/management/meta_cli.py +342 -0
  80. socialcli-0.3.0/socialctl/management/meta_client.py +631 -0
  81. socialcli-0.3.0/socialctl/management/meta_comment_inbox.py +565 -0
  82. socialcli-0.3.0/socialctl/management/meta_comments.py +587 -0
  83. socialcli-0.3.0/socialctl/management/meta_errors.py +59 -0
  84. socialcli-0.3.0/socialctl/management/meta_pagination.py +52 -0
  85. socialcli-0.3.0/socialctl/management/meta_schema.py +128 -0
  86. socialcli-0.3.0/socialctl/management/meta_webhooks.py +147 -0
  87. socialcli-0.3.0/socialctl/management/metadata_parts.py +144 -0
  88. socialcli-0.3.0/socialctl/management/owned_assets.py +85 -0
  89. socialcli-0.3.0/socialctl/management/owned_changes.py +470 -0
  90. socialcli-0.3.0/socialctl/management/owned_cli.py +128 -0
  91. socialcli-0.3.0/socialctl/management/owned_reorder.py +62 -0
  92. socialcli-0.3.0/socialctl/management/owned_schema.py +368 -0
  93. socialcli-0.3.0/socialctl/management/reply_context.py +24 -0
  94. socialcli-0.3.0/socialctl/management/reply_evidence.py +80 -0
  95. socialcli-0.3.0/socialctl/management/resource_changes.py +407 -0
  96. socialcli-0.3.0/socialctl/management/resource_cli.py +136 -0
  97. socialcli-0.3.0/socialctl/management/snippet_readback.py +26 -0
  98. socialcli-0.3.0/socialctl/management/stories.py +713 -0
  99. socialcli-0.3.0/socialctl/management/stories_cli.py +172 -0
  100. socialcli-0.3.0/socialctl/management/youtube.py +323 -0
  101. socialcli-0.3.0/socialctl/management/youtube_community.py +326 -0
  102. socialcli-0.3.0/socialctl/management/youtube_metadata.py +122 -0
  103. socialcli-0.3.0/socialctl/management/youtube_owned.py +259 -0
  104. socialcli-0.3.0/socialctl/management/youtube_resources.py +305 -0
  105. socialcli-0.3.0/socialctl/media.py +269 -0
  106. socialcli-0.3.0/socialctl/media_cli.py +183 -0
  107. socialcli-0.3.0/socialctl/media_ingress.py +211 -0
  108. socialcli-0.3.0/socialctl/media_preflight.py +114 -0
  109. socialcli-0.3.0/socialctl/media_registry.py +301 -0
  110. socialcli-0.3.0/socialctl/media_requirements.py +52 -0
  111. socialcli-0.3.0/socialctl/metricas/__init__.py +6 -0
  112. socialcli-0.3.0/socialctl/metricas/almacen.py +133 -0
  113. socialcli-0.3.0/socialctl/metricas/analytics_changes.py +295 -0
  114. socialcli-0.3.0/socialctl/metricas/analytics_cli.py +191 -0
  115. socialcli-0.3.0/socialctl/metricas/analytics_client.py +304 -0
  116. socialcli-0.3.0/socialctl/metricas/analytics_ingest.py +260 -0
  117. socialcli-0.3.0/socialctl/metricas/analytics_schema.py +174 -0
  118. socialcli-0.3.0/socialctl/metricas/base.py +147 -0
  119. socialcli-0.3.0/socialctl/metricas/facebook.py +418 -0
  120. socialcli-0.3.0/socialctl/metricas/insights.py +227 -0
  121. socialcli-0.3.0/socialctl/metricas/instagram.py +133 -0
  122. socialcli-0.3.0/socialctl/metricas/modelos.py +87 -0
  123. socialcli-0.3.0/socialctl/metricas/piezas.py +134 -0
  124. socialcli-0.3.0/socialctl/metricas/reach.py +94 -0
  125. socialcli-0.3.0/socialctl/metricas/reporting_client.py +112 -0
  126. socialcli-0.3.0/socialctl/metricas/resumen.py +251 -0
  127. socialcli-0.3.0/socialctl/metricas/slugs.py +89 -0
  128. socialcli-0.3.0/socialctl/metricas/tiktok.py +185 -0
  129. socialcli-0.3.0/socialctl/metricas/youtube.py +403 -0
  130. socialcli-0.3.0/socialctl/migration_cli.py +60 -0
  131. socialcli-0.3.0/socialctl/migration_files.py +68 -0
  132. socialcli-0.3.0/socialctl/models.py +150 -0
  133. socialcli-0.3.0/socialctl/native_schedule/__init__.py +13 -0
  134. socialcli-0.3.0/socialctl/native_schedule/api_delivery.py +15 -0
  135. socialcli-0.3.0/socialctl/native_schedule/api_reconcile.py +40 -0
  136. socialcli-0.3.0/socialctl/native_schedule/approval.py +160 -0
  137. socialcli-0.3.0/socialctl/native_schedule/cadence.py +73 -0
  138. socialcli-0.3.0/socialctl/native_schedule/cli.py +510 -0
  139. socialcli-0.3.0/socialctl/native_schedule/dispatcher.py +120 -0
  140. socialcli-0.3.0/socialctl/native_schedule/facebook.py +112 -0
  141. socialcli-0.3.0/socialctl/native_schedule/facebook_reels.py +140 -0
  142. socialcli-0.3.0/socialctl/native_schedule/first_comment.py +181 -0
  143. socialcli-0.3.0/socialctl/native_schedule/handoff.py +193 -0
  144. socialcli-0.3.0/socialctl/native_schedule/instagram_delivery.py +224 -0
  145. socialcli-0.3.0/socialctl/native_schedule/instagram_runtime.py +66 -0
  146. socialcli-0.3.0/socialctl/native_schedule/inventory.py +70 -0
  147. socialcli-0.3.0/socialctl/native_schedule/migration.py +310 -0
  148. socialcli-0.3.0/socialctl/native_schedule/models.py +103 -0
  149. socialcli-0.3.0/socialctl/native_schedule/reconcile.py +83 -0
  150. socialcli-0.3.0/socialctl/native_schedule/remote_data.py +177 -0
  151. socialcli-0.3.0/socialctl/native_schedule/report.py +151 -0
  152. socialcli-0.3.0/socialctl/native_schedule/store.py +560 -0
  153. socialcli-0.3.0/socialctl/native_schedule/verification.py +32 -0
  154. socialcli-0.3.0/socialctl/native_schedule/youtube.py +339 -0
  155. socialcli-0.3.0/socialctl/operation_output.py +87 -0
  156. socialcli-0.3.0/socialctl/plantillas/accounts.yml +33 -0
  157. socialcli-0.3.0/socialctl/plantillas/brand.md +95 -0
  158. socialcli-0.3.0/socialctl/plantillas/estrategia.md +64 -0
  159. socialcli-0.3.0/socialctl/postfile.py +240 -0
  160. socialcli-0.3.0/socialctl/preflight.py +73 -0
  161. socialcli-0.3.0/socialctl/publication_policy.py +34 -0
  162. socialcli-0.3.0/socialctl/publication_status.py +75 -0
  163. socialcli-0.3.0/socialctl/publication_steps.py +398 -0
  164. socialcli-0.3.0/socialctl/publish_output.py +96 -0
  165. socialcli-0.3.0/socialctl/publisher.py +445 -0
  166. socialcli-0.3.0/socialctl/queue_migration.py +302 -0
  167. socialcli-0.3.0/socialctl/read_budget.py +224 -0
  168. socialcli-0.3.0/socialctl/read_reports.py +91 -0
  169. socialcli-0.3.0/socialctl/rutas.py +103 -0
  170. socialcli-0.3.0/socialctl/saas/__init__.py +1 -0
  171. socialcli-0.3.0/socialctl/saas/access.py +75 -0
  172. socialcli-0.3.0/socialctl/saas/auth.py +213 -0
  173. socialcli-0.3.0/socialctl/saas/backup.py +124 -0
  174. socialcli-0.3.0/socialctl/saas/billing.py +327 -0
  175. socialcli-0.3.0/socialctl/saas/billing_enrollment.py +1237 -0
  176. socialcli-0.3.0/socialctl/saas/billing_enrollment_schema.py +519 -0
  177. socialcli-0.3.0/socialctl/saas/billing_inventory.py +775 -0
  178. socialcli-0.3.0/socialctl/saas/billing_reconcile.py +127 -0
  179. socialcli-0.3.0/socialctl/saas/billing_routes.py +27 -0
  180. socialcli-0.3.0/socialctl/saas/budget.py +66 -0
  181. socialcli-0.3.0/socialctl/saas/connections.py +374 -0
  182. socialcli-0.3.0/socialctl/saas/consent.py +52 -0
  183. socialcli-0.3.0/socialctl/saas/lifecycle.py +341 -0
  184. socialcli-0.3.0/socialctl/saas/mail.py +89 -0
  185. socialcli-0.3.0/socialctl/saas/maintenance.py +68 -0
  186. socialcli-0.3.0/socialctl/saas/meta_user.py +298 -0
  187. socialcli-0.3.0/socialctl/saas/meta_webhooks.py +358 -0
  188. socialcli-0.3.0/socialctl/saas/migration.py +107 -0
  189. socialcli-0.3.0/socialctl/saas/models.py +8 -0
  190. socialcli-0.3.0/socialctl/saas/operations.py +102 -0
  191. socialcli-0.3.0/socialctl/saas/pages.py +126 -0
  192. socialcli-0.3.0/socialctl/saas/pairing.py +158 -0
  193. socialcli-0.3.0/socialctl/saas/permissions.py +57 -0
  194. socialcli-0.3.0/socialctl/saas/reminders.py +128 -0
  195. socialcli-0.3.0/socialctl/saas/renewal.py +74 -0
  196. socialcli-0.3.0/socialctl/saas/restore_guard.py +229 -0
  197. socialcli-0.3.0/socialctl/saas/revocation.py +97 -0
  198. socialcli-0.3.0/socialctl/saas/rotation.py +114 -0
  199. socialcli-0.3.0/socialctl/saas/routes.py +221 -0
  200. socialcli-0.3.0/socialctl/saas/settings.py +34 -0
  201. socialcli-0.3.0/socialctl/saas/store.py +106 -0
  202. socialcli-0.3.0/socialctl/saas/temporary_media.py +245 -0
  203. socialcli-0.3.0/socialctl/saas/webhooks.py +76 -0
  204. socialcli-0.3.0/socialctl/schedule_remote.py +262 -0
  205. socialcli-0.3.0/socialctl/schedule_sqlite.py +44 -0
  206. socialcli-0.3.0/socialctl/scheduler.py +581 -0
  207. socialcli-0.3.0/socialctl/scheduler_launchd.py +319 -0
  208. socialcli-0.3.0/socialctl/scheduler_systemd.py +167 -0
  209. socialcli-0.3.0/socialctl/source_links.py +119 -0
  210. socialcli-0.3.0/socialctl/ui/__init__.py +1 -0
  211. socialcli-0.3.0/socialctl/ui/assets/agent-manual.md +850 -0
  212. socialcli-0.3.0/socialctl/ui/assets/agents.md +27 -0
  213. socialcli-0.3.0/socialctl/ui/assets/components.css +20 -0
  214. socialcli-0.3.0/socialctl/ui/assets/connection-layout.css +53 -0
  215. socialcli-0.3.0/socialctl/ui/assets/otp.template.html +10 -0
  216. socialcli-0.3.0/socialctl/ui/assets/tokens.css +1 -0
  217. socialcli-0.3.0/socialctl/ui/assets/trial.template.html +11 -0
  218. socialcli-0.3.0/socialctl/ui/assets/web-layout.css +38 -0
  219. socialcli-0.3.0/socialctl/ui/email/otp.html +10 -0
  220. socialcli-0.3.0/socialctl/ui/email/trial.html +11 -0
  221. socialcli-0.3.0/socialctl/upload_consent.py +13 -0
  222. socialcli-0.3.0/socialctl/workspace.py +8 -0
  223. socialcli-0.3.0/socialctl/youtube_data.py +471 -0
  224. socialcli-0.3.0/socialctl/youtube_data_service.py +225 -0
@@ -0,0 +1,38 @@
1
+ # Never publish credentials, machine state or creator workspaces.
2
+ .env
3
+ .env.*
4
+ **/.secrets/
5
+ **/.secrets*
6
+ **/.socialctl/
7
+ **/accounts.yml
8
+ !socialctl/plantillas/accounts.yml
9
+ **/resultado.json*
10
+ **/historial.md
11
+ **/metricas/
12
+ !socialctl/metricas/
13
+ !socialctl/metricas/**
14
+ **/media/
15
+ **/posts/
16
+ .cache/
17
+ .venv/
18
+ .pytest_cache/
19
+ __pycache__/
20
+ *.py[cod]
21
+ *.egg-info/
22
+ dist/
23
+ build/
24
+ .DS_Store
25
+ *.pem
26
+ *.key
27
+ *.sqlite3*
28
+ *.mp4
29
+ *.mov
30
+ *.wav
31
+ *.mp3
32
+
33
+ .worktrees/
34
+ .superpowers/
35
+
36
+ **/service.env
37
+ **/auth.env
38
+ **/database.env
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Engels Florentino
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,168 @@
1
+ Metadata-Version: 2.5
2
+ Name: socialcli
3
+ Version: 0.3.0
4
+ Summary: SocialCli: publish and manage creator-owned social content from the terminal.
5
+ Project-URL: Homepage, https://socialcli.app
6
+ Project-URL: Repository, https://github.com/engels-florentino/SocialCli
7
+ Project-URL: Issues, https://github.com/engels-florentino/SocialCli/issues
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Requires-Python: >=3.11
11
+ Requires-Dist: httpx>=0.28.1
12
+ Requires-Dist: keyring>=25.0
13
+ Requires-Dist: pydantic>=2.13.5
14
+ Requires-Dist: pyyaml>=6.0.3
15
+ Requires-Dist: typer>=0.27.2
16
+ Provides-Extra: connection-server
17
+ Requires-Dist: cryptography>=43; extra == 'connection-server'
18
+ Requires-Dist: fastapi>=0.115; extra == 'connection-server'
19
+ Requires-Dist: uvicorn>=0.30; extra == 'connection-server'
20
+ Provides-Extra: headless-credentials
21
+ Requires-Dist: cryptography>=43; extra == 'headless-credentials'
22
+ Description-Content-Type: text/markdown
23
+
24
+ <p align="center"><img src="docs/assets/socialcli-logo.png" width="128" height="128" alt="SocialCli logo: S and terminal prompt &gt;_"></p>
25
+
26
+ # SocialCli
27
+
28
+ **Current source version: 0.3.0.** SocialCli SaaS is the current SocialCli
29
+ product. The repository root on `main` is its single development workspace;
30
+ the CLI, hosted connection service and account/billing components live together
31
+ here. Earlier versions remain in Git history for reference and migration.
32
+
33
+ **A social media CLI for AI agents and the people who supervise them.** Use a terminal-enabled assistant to inspect your accounts, draft posts and prepare user-approved actions on YouTube, Facebook, Instagram and TikTok. SocialCli provides concrete commands, validation, previews and local records for creators and teams.
34
+
35
+ [Website and documentation](https://socialcli.app/) · [AI agent guide](docs/ai-agents.md) · [Setup](SETUP.md) · [Security](SECURITY.md) · [TikTok limitations](docs/tiktok-review.md)
36
+
37
+ ## Work with your AI agent
38
+
39
+ Install SocialCli where your agent can run shell commands, point it at your creator workspace and name the brand explicitly. Try:
40
+
41
+ > Check MyBrand's TikTok connection and available capabilities. Summarize missing permissions without publishing.
42
+
43
+ > Use MyBrand/media/my-video.mp4, draft a caption in our brand voice and show the complete TikTok dry-run preview. Wait for my approval before sending it.
44
+
45
+ > Inspect my YouTube video and propose a description change. Show the proposal and fingerprint before applying anything.
46
+
47
+ [The AI agent guide](docs/ai-agents.md) includes the commands behind these prompts, workspace instructions and the approval workflow. JSON is available on supported diagnostics and inventory commands. SocialCli runs through the agent's shell; it does not include an AI model or an MCP server. Your agent must keep credentials private and preserve the distinction between confirmed, pending and uncertain results.
48
+
49
+ ## Public SaaS pilot
50
+
51
+ Copy this line into your terminal-enabled AI assistant:
52
+
53
+ > Install SocialCli: https://socialcli.app/agents
54
+
55
+ The installation guide verifies the selected release download and uses
56
+ https://pilot.socialcli.app for email sign-in, assistant approval and account
57
+ connections. The pilot supports eligible YouTube, Facebook, Instagram and TikTok
58
+ test accounts. Provider verification is separate from the OAuth publishing
59
+ toggle; Meta development access and TikTok sandbox restrictions still apply.
60
+ Stripe uses test mode. Planned access costs
61
+ USD 10/month after 14 free days from the first successful connection. No real
62
+ subscriptions are collected in this pilot.
63
+
64
+ The current client release target is **0.3.0** (published first to TestPyPI and
65
+ then to PyPI through the reviewed release workflow). The compatible hosted
66
+ runtime is `socialcli-saas-candidate:45fda63`. The client's wheel and
67
+ source archive are verified against the
68
+ reviewed build hashes before publication. Provider commercial approvals and live
69
+ billing cutover remain separate from package publication. See the
70
+ [release record](deploy/saas/release.md).
71
+ The [stable release scope](docs/stable-scope.md) excludes unsupported automatic
72
+ operations; disabled research catalogue entries are not offered features.
73
+
74
+ ## Install and connect
75
+
76
+ Use the short installation prompt above. Your assistant needs a persistent shell,
77
+ Python 3.11+, macOS or Linux and protected credential storage. The bootstrap
78
+ verifies the exact wheel before installation and resolves dependencies from normal
79
+ PyPI. Video validation also requires ffprobe from FFmpeg.
80
+
81
+ The setup order is **brand → credentials → account login → connect**. Ask for the
82
+ brand name explicitly, preserve its workspace outside the application repository,
83
+ and read socialcli agent-guide setup. The account step uses
84
+ https://pilot.socialcli.app. Give each printed link directly to the user without
85
+ opening it; the user signs in and approves the assistant and provider account in
86
+ their browser. Never request OTPs or provider tokens in chat.
87
+
88
+ ```bash
89
+ socialcli account login --brand MyBrand --service https://pilot.socialcli.app --no-browser
90
+ socialcli connect youtube --brand MyBrand --management --analytics --no-browser
91
+ socialcli connections --brand MyBrand --json
92
+ ```
93
+
94
+ Run these after creating the brand and configuring protected credentials as shown
95
+ in the [connection guide](docs/connections.md). OS keyring and explicit encrypted
96
+ file storage are supported; there is no silent fallback. Use the same workspace,
97
+ store and key in later conversations. Connecting never authorizes publication.
98
+
99
+ For source development use uv sync --group dev, uv run pytest and
100
+ uv run socialcli --help in the repository. [SETUP.md](SETUP.md) covers independent
101
+ operator apps; customers of the hosted SaaS do not need developer credentials.
102
+
103
+ ## Review and publish
104
+
105
+ Create `MyBrand/posts/my-video/post.yml` and place your produced file in `MyBrand/media/`. [Example](examples/post.yml):
106
+
107
+ ```yaml
108
+ slug: my-video
109
+ campaign: clip-vertical
110
+ platforms:
111
+ tiktok:
112
+ body: "A story worth telling."
113
+ hashtags: []
114
+ media: ["my-video.mp4"]
115
+ ```
116
+
117
+ ```bash
118
+ socialcli publish my-video --brand MyBrand --only tiktok --dry-run
119
+ socialcli publish my-video --brand MyBrand --only tiktok
120
+ ```
121
+
122
+ The first command displays a preview without publishing. The second displays it again and requests confirmation. TikTok defaults to **inbox**: the video reaches your inbox and you complete publication in TikTok. A pending confirmation status does not mean the video is published.
123
+
124
+ ## Features
125
+
126
+ - Separate brands, local credentials and token renewal where supported by the provider.
127
+ - File validation, previews and confirmation before publication.
128
+ - Publishing, inventory, metrics and content management, subject to each platform's permissions and capabilities.
129
+ - Scheduling with approval checks and handling of ambiguous results to reduce duplicates.
130
+ - Adapter tests with simulated responses that do not publish to real accounts.
131
+
132
+ Each command group documents its options with `socialcli <group> --help`. The internal Python package remains `socialctl`; the public command is `socialcli`. `socialctl` remains a compatibility alias.
133
+
134
+ ## Status and limitations
135
+
136
+ Public source code does not grant production API access. Each platform imposes requirements, permissions, quotas and reviews. SocialCli **has no accredited TikTok production approval**. Direct Post is disabled and excluded from the current offer; creator-reviewed inbox upload is supported. Direct Post still lacks the complete user experience controls described in [the technical review](docs/tiktok-review.md). Publishing this repository does not satisfy those requirements.
137
+
138
+ Metrics and management permissions are separate from publishing permissions. A valid connection does not demonstrate authorization for every feature. Check capabilities and verify remote results before retrying an uncertain operation.
139
+
140
+ ## Contributing and support
141
+
142
+ Read [CONTRIBUTING.md](CONTRIBUTING.md). For questions or bugs, open an [issue](https://github.com/engels-florentino/SocialCli/issues) without tokens, keys, `.env` files or private logs. Report vulnerabilities through the private channel described in [SECURITY.md](SECURITY.md).
143
+
144
+ [MIT license](LICENSE). SocialCli is not affiliated with the platforms it integrates.
145
+
146
+ ## Account, media and scheduling
147
+
148
+ [Account](https://socialcli.app/account/) lets you manage your brand, connected
149
+ platforms, approved assistants and billing. The plan covers one brand and one
150
+ account per supported platform. Subscribe during the 14-day trial without losing
151
+ its remaining days; the first USD 10 payment is due at the original trial end.
152
+ The current pilot uses Stripe test mode and collects no live payments.
153
+
154
+ Instagram can use automatic 15-minute temporary staging on florentino.pro for
155
+ supplied originals, up to 512 MiB and subject to quotas. Files are excluded from
156
+ backups and removed after the operation or by expiry cleanup. Local schedules
157
+ keep the original on the customer runner and stage it only at dispatch. Verified
158
+ native scheduling uses provider storage where supported. See
159
+ [media handling](MEDIA-INGESTION.md) and [scheduling](NATIVE-SCHEDULING.md).
160
+
161
+ Read the packaged socialcli agent-guide topic for the operation, the
162
+ [capability matrix](docs/capabilities.md), [security](SECURITY.md),
163
+ [privacy policy](https://socialcli.app/privacy.html) and
164
+ [terms](https://socialcli.app/terms.html). Historical 0.2.6 releases and deploy
165
+ records are migration evidence, not a second current product.
166
+
167
+ SocialCli is operated by **Florentino.pro**. For private account, billing or privacy
168
+ questions, contact [admin@socialcli.app](mailto:admin@socialcli.app).
@@ -0,0 +1,145 @@
1
+ <p align="center"><img src="docs/assets/socialcli-logo.png" width="128" height="128" alt="SocialCli logo: S and terminal prompt &gt;_"></p>
2
+
3
+ # SocialCli
4
+
5
+ **Current source version: 0.3.0.** SocialCli SaaS is the current SocialCli
6
+ product. The repository root on `main` is its single development workspace;
7
+ the CLI, hosted connection service and account/billing components live together
8
+ here. Earlier versions remain in Git history for reference and migration.
9
+
10
+ **A social media CLI for AI agents and the people who supervise them.** Use a terminal-enabled assistant to inspect your accounts, draft posts and prepare user-approved actions on YouTube, Facebook, Instagram and TikTok. SocialCli provides concrete commands, validation, previews and local records for creators and teams.
11
+
12
+ [Website and documentation](https://socialcli.app/) · [AI agent guide](docs/ai-agents.md) · [Setup](SETUP.md) · [Security](SECURITY.md) · [TikTok limitations](docs/tiktok-review.md)
13
+
14
+ ## Work with your AI agent
15
+
16
+ Install SocialCli where your agent can run shell commands, point it at your creator workspace and name the brand explicitly. Try:
17
+
18
+ > Check MyBrand's TikTok connection and available capabilities. Summarize missing permissions without publishing.
19
+
20
+ > Use MyBrand/media/my-video.mp4, draft a caption in our brand voice and show the complete TikTok dry-run preview. Wait for my approval before sending it.
21
+
22
+ > Inspect my YouTube video and propose a description change. Show the proposal and fingerprint before applying anything.
23
+
24
+ [The AI agent guide](docs/ai-agents.md) includes the commands behind these prompts, workspace instructions and the approval workflow. JSON is available on supported diagnostics and inventory commands. SocialCli runs through the agent's shell; it does not include an AI model or an MCP server. Your agent must keep credentials private and preserve the distinction between confirmed, pending and uncertain results.
25
+
26
+ ## Public SaaS pilot
27
+
28
+ Copy this line into your terminal-enabled AI assistant:
29
+
30
+ > Install SocialCli: https://socialcli.app/agents
31
+
32
+ The installation guide verifies the selected release download and uses
33
+ https://pilot.socialcli.app for email sign-in, assistant approval and account
34
+ connections. The pilot supports eligible YouTube, Facebook, Instagram and TikTok
35
+ test accounts. Provider verification is separate from the OAuth publishing
36
+ toggle; Meta development access and TikTok sandbox restrictions still apply.
37
+ Stripe uses test mode. Planned access costs
38
+ USD 10/month after 14 free days from the first successful connection. No real
39
+ subscriptions are collected in this pilot.
40
+
41
+ The current client release target is **0.3.0** (published first to TestPyPI and
42
+ then to PyPI through the reviewed release workflow). The compatible hosted
43
+ runtime is `socialcli-saas-candidate:45fda63`. The client's wheel and
44
+ source archive are verified against the
45
+ reviewed build hashes before publication. Provider commercial approvals and live
46
+ billing cutover remain separate from package publication. See the
47
+ [release record](deploy/saas/release.md).
48
+ The [stable release scope](docs/stable-scope.md) excludes unsupported automatic
49
+ operations; disabled research catalogue entries are not offered features.
50
+
51
+ ## Install and connect
52
+
53
+ Use the short installation prompt above. Your assistant needs a persistent shell,
54
+ Python 3.11+, macOS or Linux and protected credential storage. The bootstrap
55
+ verifies the exact wheel before installation and resolves dependencies from normal
56
+ PyPI. Video validation also requires ffprobe from FFmpeg.
57
+
58
+ The setup order is **brand → credentials → account login → connect**. Ask for the
59
+ brand name explicitly, preserve its workspace outside the application repository,
60
+ and read socialcli agent-guide setup. The account step uses
61
+ https://pilot.socialcli.app. Give each printed link directly to the user without
62
+ opening it; the user signs in and approves the assistant and provider account in
63
+ their browser. Never request OTPs or provider tokens in chat.
64
+
65
+ ```bash
66
+ socialcli account login --brand MyBrand --service https://pilot.socialcli.app --no-browser
67
+ socialcli connect youtube --brand MyBrand --management --analytics --no-browser
68
+ socialcli connections --brand MyBrand --json
69
+ ```
70
+
71
+ Run these after creating the brand and configuring protected credentials as shown
72
+ in the [connection guide](docs/connections.md). OS keyring and explicit encrypted
73
+ file storage are supported; there is no silent fallback. Use the same workspace,
74
+ store and key in later conversations. Connecting never authorizes publication.
75
+
76
+ For source development use uv sync --group dev, uv run pytest and
77
+ uv run socialcli --help in the repository. [SETUP.md](SETUP.md) covers independent
78
+ operator apps; customers of the hosted SaaS do not need developer credentials.
79
+
80
+ ## Review and publish
81
+
82
+ Create `MyBrand/posts/my-video/post.yml` and place your produced file in `MyBrand/media/`. [Example](examples/post.yml):
83
+
84
+ ```yaml
85
+ slug: my-video
86
+ campaign: clip-vertical
87
+ platforms:
88
+ tiktok:
89
+ body: "A story worth telling."
90
+ hashtags: []
91
+ media: ["my-video.mp4"]
92
+ ```
93
+
94
+ ```bash
95
+ socialcli publish my-video --brand MyBrand --only tiktok --dry-run
96
+ socialcli publish my-video --brand MyBrand --only tiktok
97
+ ```
98
+
99
+ The first command displays a preview without publishing. The second displays it again and requests confirmation. TikTok defaults to **inbox**: the video reaches your inbox and you complete publication in TikTok. A pending confirmation status does not mean the video is published.
100
+
101
+ ## Features
102
+
103
+ - Separate brands, local credentials and token renewal where supported by the provider.
104
+ - File validation, previews and confirmation before publication.
105
+ - Publishing, inventory, metrics and content management, subject to each platform's permissions and capabilities.
106
+ - Scheduling with approval checks and handling of ambiguous results to reduce duplicates.
107
+ - Adapter tests with simulated responses that do not publish to real accounts.
108
+
109
+ Each command group documents its options with `socialcli <group> --help`. The internal Python package remains `socialctl`; the public command is `socialcli`. `socialctl` remains a compatibility alias.
110
+
111
+ ## Status and limitations
112
+
113
+ Public source code does not grant production API access. Each platform imposes requirements, permissions, quotas and reviews. SocialCli **has no accredited TikTok production approval**. Direct Post is disabled and excluded from the current offer; creator-reviewed inbox upload is supported. Direct Post still lacks the complete user experience controls described in [the technical review](docs/tiktok-review.md). Publishing this repository does not satisfy those requirements.
114
+
115
+ Metrics and management permissions are separate from publishing permissions. A valid connection does not demonstrate authorization for every feature. Check capabilities and verify remote results before retrying an uncertain operation.
116
+
117
+ ## Contributing and support
118
+
119
+ Read [CONTRIBUTING.md](CONTRIBUTING.md). For questions or bugs, open an [issue](https://github.com/engels-florentino/SocialCli/issues) without tokens, keys, `.env` files or private logs. Report vulnerabilities through the private channel described in [SECURITY.md](SECURITY.md).
120
+
121
+ [MIT license](LICENSE). SocialCli is not affiliated with the platforms it integrates.
122
+
123
+ ## Account, media and scheduling
124
+
125
+ [Account](https://socialcli.app/account/) lets you manage your brand, connected
126
+ platforms, approved assistants and billing. The plan covers one brand and one
127
+ account per supported platform. Subscribe during the 14-day trial without losing
128
+ its remaining days; the first USD 10 payment is due at the original trial end.
129
+ The current pilot uses Stripe test mode and collects no live payments.
130
+
131
+ Instagram can use automatic 15-minute temporary staging on florentino.pro for
132
+ supplied originals, up to 512 MiB and subject to quotas. Files are excluded from
133
+ backups and removed after the operation or by expiry cleanup. Local schedules
134
+ keep the original on the customer runner and stage it only at dispatch. Verified
135
+ native scheduling uses provider storage where supported. See
136
+ [media handling](MEDIA-INGESTION.md) and [scheduling](NATIVE-SCHEDULING.md).
137
+
138
+ Read the packaged socialcli agent-guide topic for the operation, the
139
+ [capability matrix](docs/capabilities.md), [security](SECURITY.md),
140
+ [privacy policy](https://socialcli.app/privacy.html) and
141
+ [terms](https://socialcli.app/terms.html). Historical 0.2.6 releases and deploy
142
+ records are migration evidence, not a second current product.
143
+
144
+ SocialCli is operated by **Florentino.pro**. For private account, billing or privacy
145
+ questions, contact [admin@socialcli.app](mailto:admin@socialcli.app).
@@ -0,0 +1,51 @@
1
+ [project]
2
+ name = "socialcli"
3
+ version = "0.3.0"
4
+ description = "SocialCli: publish and manage creator-owned social content from the terminal."
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ requires-python = ">=3.11"
8
+ dependencies = [
9
+ "httpx>=0.28.1",
10
+ "keyring>=25.0",
11
+ "pydantic>=2.13.5",
12
+ "pyyaml>=6.0.3",
13
+ "typer>=0.27.2",
14
+ ]
15
+
16
+ [project.scripts]
17
+ socialcli = "socialctl.cli:app"
18
+ socialctl = "socialctl.cli:app"
19
+
20
+ [project.urls]
21
+ Homepage = "https://socialcli.app"
22
+ Repository = "https://github.com/engels-florentino/SocialCli"
23
+ Issues = "https://github.com/engels-florentino/SocialCli/issues"
24
+
25
+ [project.optional-dependencies]
26
+ headless-credentials = ["cryptography>=43"]
27
+ connection-server = [
28
+ "cryptography>=43",
29
+ "fastapi>=0.115",
30
+ "uvicorn>=0.30",
31
+ ]
32
+
33
+ [dependency-groups]
34
+ dev = [
35
+ "cryptography>=43",
36
+ "fastapi>=0.115",
37
+ "pytest>=9.1.1",
38
+ "respx>=0.23.1",
39
+ ]
40
+
41
+ [build-system]
42
+ requires = ["hatchling"]
43
+ build-backend = "hatchling.build"
44
+
45
+ [tool.hatch.build.targets.wheel]
46
+ packages = ["socialctl"]
47
+
48
+ # Do not rely on VCS ignore discovery inside a linked worktree for sdist safety.
49
+ [tool.hatch.build.targets.sdist]
50
+ only-include = ["socialctl", "pyproject.toml", "README.md", "LICENSE"]
51
+ exclude = ["**/.env", "**/.env.*", "**/*.env", "**/.secrets/**", "**/__pycache__/**", "**/*.pyc", "**/*.key", "**/*.pem", "**/*.sqlite3*"]
File without changes
@@ -0,0 +1,6 @@
1
+ """Run the installed socialcli interface through its Python package."""
2
+
3
+ from socialctl.cli import app
4
+
5
+ if __name__ == "__main__":
6
+ app()
@@ -0,0 +1,6 @@
1
+ 'Importing this package registers all four adapters in ADAPTADORES.'
2
+
3
+ from __future__ import annotations
4
+
5
+ from socialctl.adapters import facebook, instagram, tiktok, youtube # noqa: F401
6
+ from socialctl.adapters.base import ADAPTADORES, Adapter # noqa: F401
@@ -0,0 +1,68 @@
1
+ 'Common interface for platform adapters.'
2
+
3
+ from __future__ import annotations
4
+
5
+ from abc import ABC, abstractmethod
6
+
7
+ import httpx
8
+
9
+ from socialctl.brands import Brand
10
+ from socialctl.formatter import validar_privacidad, validar_texto
11
+ from socialctl.media import validar_media
12
+ from socialctl.models import Platform, PlatformPost, PostResult, ValidationError
13
+
14
+ _SIN_VALOR = object()
15
+
16
+
17
+ def _sigue_siendo_abstracta(cls: type) -> bool:
18
+ 'Return whether cls still has an unimplemented abstract method.'
19
+ for nombre in dir(cls):
20
+ try:
21
+ miembro = getattr(cls, nombre)
22
+ except AttributeError:
23
+ continue
24
+ if getattr(miembro, "__isabstractmethod__", False):
25
+ return True
26
+ return False
27
+
28
+
29
+ class Adapter(ABC):
30
+ 'Common validation and publication interface for every supported platform.'
31
+
32
+ platform: Platform
33
+
34
+ def __init_subclass__(cls, **kwargs: object) -> None:
35
+ 'Require every concrete adapter to declare a valid Platform value.'
36
+ super().__init_subclass__(**kwargs)
37
+
38
+ if _sigue_siendo_abstracta(cls):
39
+ return
40
+
41
+ valor = getattr(cls, "platform", _SIN_VALOR)
42
+
43
+ if valor is _SIN_VALOR:
44
+ raise TypeError(
45
+ f"{cls.__name__} does not declare 'platform': every concrete "
46
+ 'Adapter must assign a Platform value. The type annotation '
47
+ 'inherited from Adapter is insufficient; assign a value '
48
+ "(for example, 'platform = Platform.TIKTOK')."
49
+ )
50
+
51
+ if not isinstance(valor, Platform):
52
+ raise TypeError(
53
+ f"{cls.__name__} declares 'platform = {valor!r}', which is not a "
54
+ 'Platform member. Use a Platform value '
55
+ '(for example, Platform.TIKTOK).'
56
+ )
57
+
58
+ def validate(self, post: PlatformPost, brand: Brand) -> list[ValidationError]:
59
+ 'Validate platform content limits without network access.'
60
+ return validar_texto(post) + validar_media(post) + validar_privacidad(post)
61
+
62
+ @abstractmethod
63
+ def publish(self, post: PlatformPost, brand: Brand, client: httpx.Client) -> PostResult:
64
+ 'Publish the post only after validate() returns no errors.'
65
+
66
+
67
+ ADAPTADORES: dict[Platform, type[Adapter]] = {}
68
+ 'Registry of adapter classes keyed by Platform. Consumers instantiate ADAPTADORES[platform]() without arguments; concrete adapters must not require constructor parameters.'
@@ -0,0 +1,56 @@
1
+ 'Extract actionable provider error text while redacting known credentials.\n\nPrefer the provider error.message field when it is a nonempty string. Otherwise\nretain a bounded response-body excerpt. Redact literal and URL-encoded known\nsecrets of at least eight characters, including proxy responses that reflect\nrequest URLs or bodies. This keeps diagnostics useful without disclosing tokens.'
2
+
3
+ from __future__ import annotations
4
+
5
+ import urllib.parse
6
+
7
+ import httpx
8
+
9
+ # Recorte razonable para no volcar cuerpos de respuesta gigantes (p. ej. una
10
+ # página de error HTML de un proxy intermedio) en un mensaje de error.
11
+ _LONGITUD_MAXIMA_CUERPO_ERROR = 500
12
+
13
+ _MARCA_REDACCION = '[TOKEN REDACTED]'
14
+
15
+ # Ver docstring del módulo: evita que un "secreto" de relleno (típicamente
16
+ # muy corto en los tests que no versan sobre seguridad, p. ej. la cadena
17
+ # "t") acabe redactando subcadenas normales de un mensaje legítimo. Ningún
18
+ # token real de las cuatro redes que publica este proyecto es tan corto.
19
+ _LONGITUD_MINIMA_SECRETO_REDACTABLE = 8
20
+
21
+
22
+ def _redactar_secretos(texto: str, secretos: tuple[str, ...]) -> str:
23
+ 'Redact literal and URL-encoded occurrences of each sufficiently long secret.'
24
+ for secreto in secretos:
25
+ if not secreto or len(secreto) < _LONGITUD_MINIMA_SECRETO_REDACTABLE:
26
+ continue
27
+ texto = texto.replace(secreto, _MARCA_REDACCION)
28
+ codificado = urllib.parse.quote(secreto, safe="")
29
+ if codificado != secreto:
30
+ texto = texto.replace(codificado, _MARCA_REDACCION)
31
+ return texto
32
+
33
+
34
+ def mensaje_de_error(respuesta: httpx.Response, *secretos: str) -> str:
35
+ 'Return bounded provider error text with known credentials redacted.'
36
+ try:
37
+ mensaje = respuesta.json()["error"]["message"]
38
+ if isinstance(mensaje, str) and mensaje:
39
+ return _redactar_secretos(mensaje, secretos)
40
+ except Exception:
41
+ pass
42
+
43
+ try:
44
+ cuerpo = respuesta.text.strip()
45
+ except Exception:
46
+ cuerpo = ""
47
+
48
+ cuerpo = _redactar_secretos(cuerpo, secretos)
49
+
50
+ if not cuerpo:
51
+ return f"HTTP {respuesta.status_code}"
52
+
53
+ if len(cuerpo) > _LONGITUD_MAXIMA_CUERPO_ERROR:
54
+ cuerpo = cuerpo[:_LONGITUD_MAXIMA_CUERPO_ERROR] + "…"
55
+
56
+ return f"HTTP {respuesta.status_code}: {cuerpo}"