Skip to content

Repository files navigation

twapi

Read-only CLI for twitterapi.io generated from OpenAPI.

Quick start

bun install
bun run gen
bun run build:js
node dist/twapi.js auth set --api-key <YOUR_API_KEY>
node dist/twapi.js twitter user info --user-name jack --json

Generate SDK + command registry

bun run gen

This does:

  • Download https://docs.twitterapi.io/api-reference/openapi.json
  • Generate TypeScript SDK into generated/sdk
  • Generate read-only command registry into src/generated/registry.ts
  • Generate command map doc into docs/command-map.md

Output behavior

  • Success -> stdout
  • Error -> stderr with raw API status/body when available
  • Exit code:
    • 0 success
    • 1 API/unknown error
    • 2 config error (missing API key)
    • 10 network error

Build binaries with Bun

bun run build:bin:macos-arm64
bun run build:bin:linux-x64
bun run build:bin:windows-x64

Each target produces one standalone binary in dist/.

Auto release on every commit

This repository includes a GitHub Actions workflow at .github/workflows/release.yml.

  • Trigger: every push to main
  • Output:
    • twapi-darwin-arm64
    • twapi-linux-x64
    • twapi-windows-x64.exe
    • checksums.txt
  • Release tag format: auto-<commit_sha>

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages