Skip to content

Add authenticated writing workflow for Stack Overflow posts #1

Description

@josiah14

Goal

Add authenticated Stack Overflow writing functionality so this CLI can reduce the friction of turning hard-won technical solutions into public Stack Overflow posts.

The motivating use case is preserving useful solutions discovered through local experimentation and AI-assisted debugging in a public, searchable knowledge base instead of leaving that knowledge trapped in private AI-agent chat logs or vendor servers.

Desired workflow

Support a markdown-first workflow along these lines:

stack draft validate ./question.md
stack draft render ./question.md
stack auth login
stack ask ./question.md
stack answer QUESTION_ID ./answer.md

The first version does not need to be fancy. A pragmatic MVP should make it easy to prepare, validate, preview, and deliberately submit posts.

Functional requirements

  • Add Stack Exchange OAuth support.
  • Request only the minimum needed scopes, especially write_access.
  • Store credentials/tokens safely using an OS-appropriate credential store where possible.
  • Support posting a question through the official Stack Exchange API /questions/add.
  • Support posting an answer through /questions/{id}/answers/add.
  • Support dry-run/render modes that do not mutate Stack Overflow.
  • Prefer explicit confirmation before any write operation.
  • Keep markdown drafts as the source of truth.

Draft format idea

Question draft:

---
title: How do I preserve nix develop PATH precedence when launching zsh?
tags:
  - nix
  - zsh
site: stackoverflow
---

Question body here.

Answer draft:

---
question_id: 12345678
site: stackoverflow
---

Answer body here.

Non-goals for the first pass

  • Automated mass posting.
  • AI-generated unsupervised posting.
  • Vote/comment/moderation features.
  • Replacing the Stack Overflow web UI entirely.

Notes

This should be conservative by design. The CLI should help a human publish carefully reviewed solutions, not automate low-quality content. The point is to move useful debugging and systems knowledge into the public commons with less friction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions