Stop committing credentials; fix posting length, partial posts, and data safety

- Untrack config.yaml (now gitignored) and add config.example.yaml with
  blank credentials; install.sh copies the example and sets mode 600
- Reserve room for the appended source link when asking Claude for a
  post, count length the way X does, and refuse over-length tweets
  before posting
- Return https://x.com/i/status/<id> for posted tweets
- Track which platforms each queued post reached so a partial failure
  can be retried without double-posting
- Write config, state, posts and dismissed files atomically with 0600
- Keep refreshed Twitter tokens in memory if saving them fails, and log
  the failure instead of writing to the hidden stderr
- Exit with a clear message on corrupt data files instead of panicking
- Surface save errors in the UI; show status/error messages on home
- Add tests for X length counting, the post store, and token updates

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 06:14:40 -07:00
co-authored by Claude Opus 5.5
parent c48ee22f99
commit 4d304cd65b
18 changed files with 391 additions and 96 deletions
+253
View File
@@ -0,0 +1,253 @@
# CoreMarketing Social Curator — Configuration
# Copy this file to config.yaml and fill in your credentials.
applications:
- name: "Discourse"
description: "Open source discussion platform and community forum software"
twitter_handle: "discourse"
youtube_channel_id: "UCAd42MxH-zyjD48QgAmb_dA"
instagram_handle: "discourse"
hashtags:
- "#Discourse"
- "#OpenSource"
- "#Community"
- name: "LibreOffice"
description: "Free and open source office suite compatible with Microsoft Office formats"
twitter_handle: "libreoffice"
youtube_channel_id: "UCQAClQkZEm2rkWvU5bvCAXQ"
instagram_handle: "libreoffice"
hashtags:
- "#LibreOffice"
- "#WordExcelPowerpoint"
- "#FreeOffice"
- name: "Collabora"
description: "Free and open source office suite compatible with Microsoft Office formats in the browser"
twitter_handle: "collabora"
youtube_channel_id: ""
instagram_handle: ""
hashtags:
- "#Collabora"
- "#WordExcelPowerpoint"
- "#FreeOffice"
- name: "Plane App"
description: "Open source project management tool and alternative to Jira"
twitter_handle: "planepowers"
youtube_channel_id: "UC8VJ-7tPdHOf5VK9h_mMRBA"
instagram_handle: ""
hashtags:
- "#NoJira"
- "#ProjectManagement"
- "#Kanban"
- name: "Cal.com"
description: "Open source scheduling infrastructure for everyone"
twitter_handle: "calcom"
youtube_channel_id: "UClEgmwP_8Sejae6KXCzd_bQ"
instagram_handle: "cal.com"
hashtags:
- "#CalCom"
- "#OpenSource"
- "#Scheduling"
- name: "WordPress"
description: "Open source content management system powering millions of websites"
twitter_handle: "wordpress"
youtube_channel_id: "UCiR2d9r3QkBwuNVS8nqGNgg"
instagram_handle: "wordpressdotcom"
hashtags:
- "#WordPress"
- "#CMS"
- "#Publishing"
- name: "Bitwarden"
description: "Open source password manager for individuals and teams"
twitter_handle: "bitwarden"
youtube_channel_id: "UCId9a_jQqvJre0_dE2lE_Rw"
instagram_handle: "bitwarden"
hashtags:
- "#Bitwarden"
- "#PasswordManager"
- "#Passwords"
- name: "Roundcube"
description: "Open source web-based email client with a desktop-like interface"
twitter_handle: "roundcube"
youtube_channel_id: ""
instagram_handle: ""
hashtags:
- "#Roundcube"
- "#Webmail"
- "#Email"
- name: "Kimai"
description: "Open source time-tracking application for freelancers and teams"
twitter_handle: "kimai_org"
youtube_channel_id: "UCARu_H8IW2MkIWYsZVP571g1"
instagram_handle: ""
hashtags:
- "#Kimai"
- "#TimeTracking"
- "#Workforce"
- name: "PowerDNS"
description: "Open source DNS server software suite with advanced features"
twitter_handle: "powerdns"
youtube_channel_id: ""
instagram_handle: ""
hashtags:
- "#PowerDNS"
- "#DNS"
- "#Networking"
- name: "Nextcloud"
description: "Open source cloud platform for file sync, collaboration, and communication"
twitter_handle: "Nextclouders"
youtube_channel_id: "UCQjN5Fs5QSz1loJqLb5bkew"
instagram_handle: ""
hashtags:
- "#Nextcloud"
- "#Groupware"
- "#SelfHosted"
- name: "Jitsi"
description: "Open source video conferencing and communication platform"
twitter_handle: "jitsinews"
youtube_channel_id: ""
instagram_handle: "jitsi"
hashtags:
- "#Jitsi"
- "#VideoConferencing"
- "#VideoCall"
- name: "Gitea"
description: "Lightweight open source self-hosted Git service"
twitter_handle: "giteaio"
youtube_channel_id: ""
instagram_handle: ""
hashtags:
- "#Gitea"
- "#Git"
- "#Code"
- name: "FreeScout"
description: "Open source self-hosted help desk and shared mailbox application"
twitter_handle: "freescoutnews"
youtube_channel_id: ""
instagram_handle: ""
hashtags:
- "#FreeScout"
- "#HelpDesk"
- "#SharedEmail"
- name: "EspoCRM"
description: "Open source CRM platform for managing customer relationships"
twitter_handle: "espocrm"
youtube_channel_id: ""
instagram_handle: ""
hashtags:
- "#EspoCRM"
- "#CRM"
- "#SalesForceAutomation"
- name: "Headscale"
description: "Open source self-hosted implementation of the Tailscale control server"
twitter_handle: ""
youtube_channel_id: ""
instagram_handle: ""
hashtags:
- "#Headscale"
- "#VPN"
- "#SelfHosted"
- name: "Element"
description: "Open source messaging app built on the Matrix protocol"
twitter_handle: "element_hq"
youtube_channel_id: "UCTW5bZLYK97SllqUQDwuxnA"
instagram_handle: ""
hashtags:
- "#Element"
- "#Matrix"
- "#Chat"
- name: "BookStack"
description: "Open source platform for organising and storing information"
twitter_handle: "bookstack_app"
youtube_channel_id: "UCH66RFWfw6CSm2T1EM4ik1g"
instagram_handle: ""
hashtags:
- "#BookStack"
- "#Wiki"
- "#Knowledgebase"
- name: "Matrix"
description: "Open standard and communication protocol for decentralized messaging"
twitter_handle: "matrixdotorg"
youtube_channel_id: ""
instagram_handle: ""
hashtags:
- "#Matrix"
- "#Decentralized Messaging"
- "#Chat"
- name: "Baserow"
description: "Open source no-code database and Airtable alternative"
twitter_handle: "baserow"
youtube_channel_id: "UCPfzyP0FnZNXnqUJKiXZbiA"
instagram_handle: ""
hashtags:
- "#Baserow"
- "#NoCode"
- "#Database"
- name: "Switch and Click"
description: "Helping normal people use open source"
twitter_handle: "switch_click"
youtube_channel_id: "UCT6AJiTYspOILBK3hMWEq2g"
instagram_handle: ""
hashtags:
- "#SwitchAndClick"
- "#OpenSource"
- "#Guides"
credentials:
twitter:
# Requires Twitter/X API Basic tier ($100/mo) or higher for read access.
bearer_token: ""
# OAuth 2.0 credentials — required for posting. Run `coremarketing auth` to
# obtain oauth2_access_token automatically via the PKCE flow.
client_id: ""
client_secret: "" # omit or leave blank for public-client apps
oauth2_access_token: "" # populated automatically by `coremarketing auth twitter`
oauth2_refresh_token: "" #
linkedin:
# OAuth 2.0 credentials for posting. Run `coremarketing auth linkedin` to
# obtain access_token and author_urn automatically.
client_id: ""
client_secret: ""
access_token: "" # populated automatically by `coremarketing auth linkedin`
author_urn: "" # populated automatically by `coremarketing auth linkedin`
youtube:
# Free with quota. Get yours at https://console.cloud.google.com
api_key: ""
claude:
# Get your key at https://console.anthropic.com
api_key: ""
# Model to use for post generation (defaults to claude-sonnet-4-6)
model: "claude-sonnet-4-6"
posting:
# The X.com account handle we post TO (without @)
twitter_handle: "federatedcomp"
# Maximum post length (280 standard, up to 25000 for X Premium)
max_length: 280
settings:
# Where to persist "last checked" timestamps
state_file: "state.json"
# Max results to fetch per source per application
max_results: 20
# Days to look back if no prior state exists
default_lookback_days: 7