postcraftin
AI-powered LinkedIn post generator using local LLMs via Ollama. Personalized ghostwriter with 6-module profile system, modular onboarding, and CLI interface. A default profile is auto-created on first use via bootstrap.
Features
- Local LLMs — runs fully on your machine via Ollama, no API costs, no data leaks
- 6-Module Profile System — Identity, Voice, Audience, Content Strategy, Post History, Technical Preferences
- Modular Onboarding — Update individual modules with
--moduleflag - Few-Shot prompting — provide example posts to calibrate the output to your voice
- Post length control — kurz (150–500), mittel (1.200–1.500), lang (1.900–2.500 Zeichen)
- Multiple profiles — manage different personas or clients
- Dynamic Model Selection — List and select from available Ollama models
- Config Management — Global and profile-specific settings
- Folder-Based Profiles — Organized storage with drafts/, published/, brandguide/, templates/, history/
- 10 Storytelling Templates — Verlierer→Gewinner, AHA-Moment, Weg der Veränderung, and more (use
--template <name>in generate, list withprofile templates list) - Brand Guide Generator — Auto-generates voice.md, vocabulary.md, anti-patterns.md
- YAML Frontmatter — Posts include metadata (topics, status, word count, LinkedIn URL)
Requirements
- Python 3.10+ with
pipxorpip - Ollama for generation — optional at start: without a model the app runs, it just cannot generate
- Node.js 18+ only for development (see Development) — the UI ships pre-built in the package
Installation
App and UI in one command — no Node.js, no separate frontend server:
pipx install "postcraftin[ui]"
Without pipx, the same in a virtual environment: pip install "postcraftin[ui]".
CLI only: pip install postcraftin.
Quickstart
postcraftin setup # data directory, port, Ollama, default account
postcraftin-api # UI and API on http://127.0.0.1:8080
setup downloads no model and asks no password. It creates the default account
and prints states, not paths.
Open http://127.0.0.1:8080/ — the landing page leads to the app under /app,
where you sign in with that default account. A password-protected account for
regular use:
postcraftin account create --name <name>
If something is missing, postcraftin doctor checks version, profile schema,
schema stamps, port, Ollama, write permissions and whether the bundled UI build
is present; exit 0 means healthy.
The port is 8080 (POSTCRAFTIN_API_PORT). The server listens on all interfaces
so the calendar feed works in a LAN; bind it to loopback if you do not need that:
POSTCRAFTIN_API_HOST=127.0.0.1 postcraftin-api
Documentation
Full documentation (German; Diátaxis: tutorial · how-to · reference ·
explanation) lives in docs/ in the repository — start at docs/README.md; the
five-minute quickstart is docs/tutorials/quickstart.md. The installed app
serves the same quickstart at http://127.0.0.1:8080/quickstart.
Cloud models (optional)
# Claude, OpenAI and Gemini in addition to local Ollama models
pip install "postcraftin[cloud]"
Trend research: works without any key (DuckDuckGo). With a free Tavily key (
TAVILY_API_KEYorpostcraftin config set search_api_key …) it uses Tavily, which finds clearly better topics.Certificates: Postcraftin trusts your operating system's certificate store, so antivirus HTTPS scanning or a company proxy no longer breaks web requests. Set
POSTCRAFTIN_SYSTEM_CERTS=0to use Python's bundled certificates only.
Usage
# Create a profile (interactive wizard - 6 modules)
postcraftin onboard --name myprofile
# Update specific module only
postcraftin onboard --name myprofile --module voice
# Generate a LinkedIn post with template
postcraftin generate --topic "The future of AI" --template verlierer-gewinner
# List available templates
postcraftin profile templates list
# Initialize templates to profile folder
postcraftin profile templates init --name myprofile
# Manage posts (drafts/published)
postcraftin profile posts list
postcraftin profile posts show <filename>
postcraftin profile posts publish <filename>
postcraftin profile posts set-topics <filename> --topics "AI,Future"
# Generate/regenerate brand guide
postcraftin profile brandguide --name myprofile --regenerate
# List available Ollama models
postcraftin models
# Select model interactively
postcraftin config model --select
# Show global config
postcraftin config
# Set profile-specific model
postcraftin profile set myprofile model gemma4:e2b
# List all profiles
postcraftin list-profiles
Measure post quality
# Generate 12 test cases (3 synthetic profiles, TOFU/MOFU/BOFU) and score them; compare models
postcraftin eval run --model gemma4:e2b --model mimo-v2.6:latest --out my-run
# Blind test "human or AI?": mix the generated posts with human posts (one .txt per post)
postcraftin eval blindtest my-run --human path/to/human-posts
postcraftin eval blindtest-score my-run
Reports and results stay in your data folder (~/.postcraftin/eval/), never in the repository.
Default Model
gemma4:e2b — the default model for LinkedIn post generation.
First time? Pull the model with:
ollama pull gemma4:e2b
Want a different model? Browse all available models at: https://ollama.com/library
Configuration
| Setting | Location | Description |
|---|---|---|
| Global Model | ~/.postcraftin/config.json |
Default model for all profiles |
| Profile Model | ~/.postcraftin/profiles/{name}/config.json |
Profile-specific model (optional) |
| Profiles | ~/.postcraftin/profiles/{name}/ |
Folder-based profile storage |
| Drafts | ~/.postcraftin/profiles/{name}/posts/drafts/ |
Draft posts with frontmatter |
| Published | ~/.postcraftin/profiles/{name}/posts/published/ |
Published posts with LinkedIn URL |
| Templates | ~/.postcraftin/profiles/{name}/templates/ |
Custom storytelling templates |
| Brand Guide | ~/.postcraftin/profiles/{name}/brandguide/ |
voice.md, vocabulary.md, anti-patterns.md |
| History | ~/.postcraftin/profiles/{name}/history/ |
Post statistics and analytics |
Environment Variables
The data directory is resolved at runtime — on every path access, never at import time — using this priority:
| Priority | Variable | Description |
|---|---|---|
| 1 (primary) | POSTCRAFTIN_HOME |
Overrides the whole data directory (tests, CI, portable installs) |
| 2 (alias) | POSTCRAFTIN_DATA_DIR |
Existing alias, kept for e2e tests, scripts and CI |
| 3 (default) | — | ~/.postcraftin — unchanged default, no data migration |
POSTCRAFTIN_HOME=/tmp/postcraftin-data postcraftin generate --topic "Your topic"
Development
pip install -e ".[dev]"
ruff check postcraftin/
pytest tests/ --tb=short
The web UI is a Next.js app in frontend/; Node.js 18+ is needed for it only:
cd frontend
npm install
npm run dev # http://localhost:5173
The API runs separately on :8080 (postcraftin-api). Both ports are
configurable (PORT, NEXT_PUBLIC_API_URL, POSTCRAFTIN_API_PORT,
POSTCRAFTIN_CORS_ORIGINS).
License
MIT
Contributing
Contributions welcome! Open an issue or PR.
Thank you to all contributors!
Built with ❤️ for the LinkedIn community.
Open source forever.
Metadata
Release files for postcraftin 2.131.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| postcraftin-2.131.0.tar.gz | 6.4 MB | With provenance | Details for postcraftin-2.131.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| postcraftin-2.131.0-py3-none-any.whl | Python 3 | none | any | Details for postcraftin-2.131.0-py3-none-any.whl |
Total release size: 13.2 MB
Release files / postcraftin-2.131.0.tar.gz
| Download URL | postcraftin-2.131.0.tar.gz |
|---|---|
| Size | 6.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
651e1f00b280c08b4a77bd0f28b1ac5289ace6cbeb0ecdf76fdf1d8fbd96530c
|
|
BLAKE2b-256 checksum How to use checksums |
4dca8758ff567c8423ba6f731439a44c0af324f6337ba13c6c28fdeb3c88f2b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / postcraftin-2.131.0-py3-none-any.whl
| Download URL | postcraftin-2.131.0-py3-none-any.whl |
|---|---|
| Size | 6.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a900f75aae71f9889f46c0d127990cd56ebe76470d21fcda834aa69b7689984a
|
|
BLAKE2b-256 checksum How to use checksums |
11ca36b7b4c573f082c2b99a3bb9856f0dd61097fe8d82623fefe8aabe1bcf52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for postcraftin 2.131.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for postcraftin-2.131.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.