Browse questions from the SegmentFault Q&A community from the command line.
segmentfault is a single pure-Go binary. No API key required.
go install github.com/tamnd/segmentfault-cli/cmd/segmentfault@latestOr grab a prebuilt binary from the releases, or run the container image:
docker run --rm ghcr.io/tamnd/segmentfault:latest --help# List newest questions
segmentfault questions
# List questions sorted by votes, 2 pages (~60 questions)
segmentfault questions --sort votes --pages 2
# Table output with limit
segmentfault questions -n 10 -o table
# Output formats
segmentfault questions -o json
segmentfault questions -o csv -n 50
segmentfault questions -o jsonl| Command | Description |
|---|---|
questions |
List questions from SegmentFault |
version |
Show version information |
-s, --sort string sort order: newest|votes|unanswered (default "newest")
-p, --pages int number of pages to fetch (~30 items per page) (default 1)
-o, --output string output format: table|json|jsonl|csv|tsv|url|raw (default "auto")
-n, --limit int limit number of records (0 = all on fetched pages)
--fields strings comma-separated columns to include
--no-header omit header row
--template string Go text/template per record
--timeout duration per-request timeout (default 30s)
--delay duration minimum spacing between requests
--retries int retry attempts on 429/5xx (default 3)
Apache-2.0. See LICENSE.