# CoreMarketing Social Curator A terminal UI app that monitors open source SaaS applications across X.com, YouTube, and Instagram, then uses Claude AI to generate posts in the voice of a product manager. ## Prerequisites - Go 1.22 or later - A [Claude API key](https://console.anthropic.com) - API credentials for whichever platforms you want to monitor (all are optional except Claude) ## Setup **1. Configure credentials** `./install.sh` copies `config.example.yaml` to `~/.local/state/coremarketing/config.yaml` (the default location the app reads). Fill in your API keys there: > **Never commit real credentials.** `config.yaml` is gitignored; only `config.example.yaml`, with blank credentials, belongs in the repo. ```yaml credentials: claude: api_key: "sk-ant-..." # Required twitter: bearer_token: "" # Required for reading (X Basic plan, $100/mo) client_id: "" # Required for posting (OAuth 2.0 client ID) client_secret: "" # Confidential clients only — leave blank otherwise oauth2_access_token: "" # Set automatically by `coremarketing auth twitter` youtube: api_key: "" # Free — get one at console.cloud.google.com instagram: access_token: "" # Requires Facebook App review business_account_id: "" posting: twitter_handle: "youraccount" # The @handle you post FROM ``` Missing credentials are skipped gracefully — the app works with only Claude plus whichever sources you have set up. **2. Add your applications** In `config.yaml`, list the open source SaaS apps you want to track: ```yaml applications: - name: "Nextcloud" description: "Self-hosted file storage and collaboration platform" twitter_handle: "nextcloud" youtube_channel_id: "UCQGgrx2pSXQ2r0fk2cbQIFQ" instagram_handle: "" hashtags: - "nextcloud" - "selfhosted" ``` **2b. Authorize Twitter/X posting** Once `client_id` is set, run the one-time auth flow to obtain a posting token: ```bash coremarketing auth twitter ``` This opens a browser, handles the OAuth 2.0 PKCE redirect on `localhost:8080`, and writes `oauth2_access_token` directly into `config.yaml`. Re-run it any time the token expires. ## Build & Install To build and install the binary to `~/.local/bin/`: ```bash ./install.sh ``` The script auto-detects your Go installation. If `~/.local/bin` is not in your PATH, it will print a reminder to add it to your shell config. To build locally without installing: ```bash go build -o coremarketing . ``` ## Run ```bash coremarketing ``` Or, if running from the project directory without installing: ```bash ./coremarketing ``` To use a different config file: ```bash coremarketing /path/to/config.yaml ``` ## Usage The app uses a two-stage workflow: first generate posts from curated content, then publish them when ready. ### Stage 1 — Research and generate | Screen | Keys | |---|---| | **App list** — pick which application to research | `↑↓` navigate, `/` filter, `Enter` select, `p` view post queue, `q` quit | | **Fetching** — pulls content from all configured sources since last check | _(automatic)_ | | **Content browser** — review what was found | `↑↓` navigate, `Space` select/deselect, `Enter` generate post, `Esc` back | | **Post preview** — edit the Claude-generated post | `Enter` save to queue, `Ctrl+R` regenerate, `Esc` back | ### Stage 2 — Publish From the app list, press `p` to open the post queue. The home screen shows a badge when posts are ready. | Screen | Keys | |---|---| | **Generated Posts** — all saved posts waiting to be published | `↑↓` navigate, `Space` select/deselect, `Ctrl+P` post selected, `d` delete selected, `Esc` back | | **Result** — shows published URLs and any errors | `Enter` return to home | You can queue posts for multiple applications before publishing them all at once. ## Data files All data files are written next to `config.yaml`, regardless of where you run the binary from. | File | Purpose | |---|---| | `state.json` | Tracks when content was last fetched per application | | `posts.json` | Stores generated posts waiting to be published | ## Lookback window The lookback window always defaults to 7 days. It only advances (per application) when Claude successfully generates a post from that application's content — ensuring you never miss content between runs. To reset the window for all applications: ```bash rm state.json ``` To reset a single application, open `state.json` and delete that app's entry. ## Generated posts Claude writes each post in the voice of a product manager — practical, specific, and helpful rather than promotional. Posts are capped at the `max_length` set in `config.yaml` (default: 280 characters for standard X accounts, up to 25,000 for X Premium). You can edit the generated post in the preview screen before saving it to the queue.