# tweet-factory > Local Bun CLI that learns from your X likes, bookmarks, and tweets, then drafts tweets in your voice with your own LLM. tweet-factory writes drafts to files on the machine that runs it. Publishing those drafts is a separate step you take in X. Local storage is the default. Optional cloud sync uploads a copy only after `tf login` and `tf sync push`. Agents setting this up should open agent.md first. Steps marked Human required need a person: creating the X developer app, clicking Authorize in the browser, and pasting API keys. Never invent credentials. Run each step’s verification check before the next step. The pages below are markdown. The same text in one file: https://docs.tweetfactory.sh/llms-full.txt ## Start here - [Overview](https://docs.tweetfactory.sh/index.md): What tweet-factory is, what it writes to disk, and where to start. - [Copy-paste setup prompt](https://docs.tweetfactory.sh/agent-prompt.md): The prompt to hand a coding agent so it sets tweet-factory up and stops for the human steps. - [Set this up for me](https://docs.tweetfactory.sh/agent.md): Agent runbook with a verification check on every step, and the steps a human must do. - [Install](https://docs.tweetfactory.sh/install.md): Download the tf release binary, or build from a checkout you already have. - [X app setup](https://docs.tweetfactory.sh/x-app.md): Create the X developer app, callback URL, and OAuth 2.0 client keys. ## Reference - [Configuration](https://docs.tweetfactory.sh/configuration.md): Every environment variable from .env.example, what it does, and which are required. - [Commands](https://docs.tweetfactory.sh/commands.md): Every tf subcommand, flag, and what it reads or writes. - [Cloud sync](https://docs.tweetfactory.sh/cloud-sync.md): Optional copy of tweets.db, persona, drafts, and Notion tags on tweetfactory.sh. Local files stay the default. - [Persona](https://docs.tweetfactory.sh/persona.md): How persona/PERSONA.md is created, what tf onboard writes, and how voice is measured. - [LLM providers](https://docs.tweetfactory.sh/llm.md): Claude Code by default, or Anthropic, OpenRouter, and OpenAI. - [Tavily, Notion, and Slack](https://docs.tweetfactory.sh/integrations.md): Optional timely search, article extract, Notion grounding, and Slack draft delivery. - [Deploy and cron](https://docs.tweetfactory.sh/deploy.md): Run tf refresh or tf cron on one server, with local backups. No LLM in the cron path. - [Security](https://docs.tweetfactory.sh/security.md): Secrets, the single-host token, the loopback OAuth callback, and how scraped text is fenced. - [Troubleshooting](https://docs.tweetfactory.sh/troubleshooting.md): Auth failures, missing keys, cron stopping at enrich, and generation errors. ## Explainers - [How the X (Twitter) algorithm works](https://docs.tweetfactory.sh/how-the-x-algorithm-works.md): How the X algorithm, still called the Twitter algorithm in search, builds a For You page in 2026. From xai-org/x-algorithm commit cb45b55. Last updated 2026-10-11. - [X algorithm changes in 2026](https://docs.tweetfactory.sh/x-algorithm-changes-2026.md): Dated changelog of the open-source X algorithm in 2026, from xai-org/x-algorithm commits and the README. No invented product announcements. - [How to grow on X](https://docs.tweetfactory.sh/x-algorithm-engagement-weights.md): How to grow on X using only the published For You weights from xai-org/x-algorithm commit cb45b55. Coefficients on probabilities, not a guaranteed impression multiplier. - [Best time to post on X](https://docs.tweetfactory.sh/best-time-to-post-on-x.md): The open-source X ranker has a 48-hour age cut and a two-hour cold start. It has no day-of-week or hour-of-day term. Evidence from x-algorithm commit cb45b55. - [Myths about links, hashtags, bookmarks, Premium](https://docs.tweetfactory.sh/x-algorithm-myths.md): What xai-org/x-algorithm commit cb45b55 actually says about links, hashtags, bookmarks, and Premium. No coded link penalty, no hashtag counter, no bookmark or Premium term in the score. - [Shadowban on X](https://docs.tweetfactory.sh/shadowban-on-x.md): The X algorithm repo never says shadowban. It does drop, tombstone, or limit a post in visibility-filtering, and it drops candidates before scoring. Commit cb45b55. - [Tweet reply generator](https://docs.tweetfactory.sh/why-replies-stay-in-network.md): A tweet reply generator only helps people who already follow you. Out-of-network replies are filtered in xai-org/x-algorithm commit cb45b55. In-network replies are also discounted. - [How to reset your X (Twitter) algorithm](https://docs.tweetfactory.sh/how-to-reset-your-x-algorithm.md): The open-source For You code has no reset button. A request is hydrated from recent engagements, follows, blocks, mutes, muted keywords, and posts already seen. Commit cb45b55. - [How tweet-factory scores drafts](https://docs.tweetfactory.sh/how-tweet-factory-scores-drafts.md): tf generate scores each variant after the model returns text. The 0–100 number is an editorial strength times a published For You weight from x-algorithm cb45b55, then a calibration from your own impressions when tweets.db has enough posts. - [What is TweepCred](https://docs.tweetfactory.sh/what-is-tweepcred.md): The string TweepCred does not appear in xai-org/x-algorithm commit cb45b55. The account score in that tree is user-cred-v2, and it is not a For You ranking head. - [Twitter algorithm on GitHub](https://docs.tweetfactory.sh/twitter-algorithm-github.md): Twitter algorithm on GitHub: twitter/the-algorithm (2023) and xai-org/x-algorithm (2026). Where each repo lives and which files actually affect reach. - [Tweet generator in your voice](https://docs.tweetfactory.sh/ai-tweet-writer-your-voice.md): A local private tweet generator and AI tweet generator. tweet-factory runs on your machine and drafts with your LLM, including Claude Code, from your likes, bookmarks, posts, and a persona file. It does not post to X. - [Using tweet-factory with Claude Code](https://docs.tweetfactory.sh/claude-code-twitter.md): How to use Claude Code as the tweet generator for X. tweet-factory runs claude -p with tools disabled, no API key, and writes drafts locally. It does not post. - [Compared with hosted schedulers](https://docs.tweetfactory.sh/compare-typefully-tweet-hunter-hypefury.md): Hub for the Typefully, Tweet Hunter, and Hypefury comparisons. Facts from tweet-factory’s code and their public pages as fetched on 2026-10-10. No invented reach stats. - [Typefully alternative](https://docs.tweetfactory.sh/typefully-alternative.md): tweet-factory compared with Typefully using the CLI source and Typefully’s public pages as fetched on 2026-10-10. Drafts stay local. Typefully says it publishes. - [Tweet Hunter alternative](https://docs.tweetfactory.sh/tweet-hunter-alternative.md): tweet-factory compared with Tweet Hunter using the CLI source and Tweet Hunter’s public pages as fetched on 2026-10-10. Their OAuth URL requests tweet.write. This CLI does not. - [Hypefury alternative](https://docs.tweetfactory.sh/hypefury-alternative.md): tweet-factory compared with Hypefury using the CLI source and Hypefury’s pricing page as fetched on 2026-10-10. Three price sentences, quoted separately. The CLI does not publish. ## Optional - [Tweet score calculator](https://tweetfactory.sh/score/): Free in-browser X algorithm checker. Paste a draft for a per-head heuristic using the published weights. Signed out, the draft stays in the browser. Optional sign-in calibrates four heads and saves drafts. - [Score privacy](https://tweetfactory.sh/privacy/): What sign-in reads from X, what is stored, how cloud sync is optional, and how to delete the account. - [Cloud sync account](https://tweetfactory.sh/account/): Approve a tf login device code, review the synced persona and drafts, export, or delete that copy. - [X algorithm boost playbook](https://raw.githubusercontent.com/abhirupghosh/tweet-factory/main/X_ALGORITHM_BOOST_PLAYBOOK.md): For You notes checked against xai-org/x-algorithm commit cb45b55. `tf generate` scores locally with the published weights in src/rank/weights.ts (same commit), then scales reply, quote, repost, and like strengths when tweets.db has at least 8 own posts with impressions. - [README](https://raw.githubusercontent.com/abhirupghosh/tweet-factory/main/README.md): Repository README. - [Changelog](https://raw.githubusercontent.com/abhirupghosh/tweet-factory/main/CHANGELOG.md): v0.2.0 is the Bun/TypeScript CLI. The Python pipeline and Rust TUI are gone. - [Install script](https://tweetfactory.sh/install.sh): `curl -fsSL https://tweetfactory.sh/install.sh | sh`. The site build serves this file. It downloads a release binary from https://tweetfactory.sh/download/ and checks SHA256SUMS. - [Release downloads](https://tweetfactory.sh/download/latest/VERSION): Current tag. Binaries and SHA256SUMS are `https://tweetfactory.sh/download/vX.Y.Z/tf-linux-x64` (and darwin-arm64, darwin-x64, linux-arm64). These files are on a public Blob store. GitHub Release assets are not the install path.