Rename twitter-cli to bird

- Rename package from twitter-cli to bird
- Update all CLI references and documentation
- Add read command to README
This commit is contained in:
Peter Steinberger
2025-11-28 06:35:17 +00:00
parent 90d22df717
commit b2dc418860
5 changed files with 29 additions and 24 deletions
+1
View File
@@ -3,3 +3,4 @@ dist/
*.log *.log
.DS_Store .DS_Store
twitter-cli.bin twitter-cli.bin
bird
+18 -9
View File
@@ -1,12 +1,13 @@
# twitter-cli # bird
A command-line tool for posting tweets and replies via Twitter's GraphQL API. A command-line tool for posting tweets and replies via Twitter/X's GraphQL API.
## Installation ## Installation
```bash ```bash
cd ~/Projects/twitter-cli cd ~/Projects/bird
pnpm install pnpm install
pnpm run binary # Creates the 'bird' executable
``` ```
## Usage ## Usage
@@ -14,23 +15,31 @@ pnpm install
### Post a tweet ### Post a tweet
```bash ```bash
./twitter-cli tweet "Hello from twitter-cli!" bird tweet "Hello from bird!"
``` ```
### Reply to a tweet ### Reply to a tweet
```bash ```bash
# Using tweet URL # Using tweet URL
./twitter-cli reply "https://x.com/user/status/1234567890" "This is my reply" bird reply "https://x.com/user/status/1234567890" "This is my reply"
# Using tweet ID directly # Using tweet ID directly
./twitter-cli reply 1234567890 "This is my reply" bird reply 1234567890 "This is my reply"
```
### Read a tweet
```bash
# Get tweet content by URL or ID
bird read "https://x.com/user/status/1234567890"
bird read 1234567890 --json
``` ```
### Check credentials ### Check credentials
```bash ```bash
./twitter-cli check bird check
``` ```
## Authentication ## Authentication
@@ -39,14 +48,14 @@ The tool resolves credentials in the following order of priority:
1. **CLI arguments** (highest priority) 1. **CLI arguments** (highest priority)
```bash ```bash
./twitter-cli --auth-token "xxx" --ct0 "yyy" tweet "Hello" bird --auth-token "xxx" --ct0 "yyy" tweet "Hello"
``` ```
2. **Environment variables** 2. **Environment variables**
```bash ```bash
export AUTH_TOKEN="xxx" export AUTH_TOKEN="xxx"
export CT0="yyy" export CT0="yyy"
./twitter-cli tweet "Hello" bird tweet "Hello"
``` ```
Alternative env var names: `TWITTER_AUTH_TOKEN`, `TWITTER_CT0` Alternative env var names: `TWITTER_AUTH_TOKEN`, `TWITTER_CT0`
+4 -4
View File
@@ -1,11 +1,11 @@
{ {
"name": "twitter-cli", "name": "bird",
"version": "0.1.0", "version": "0.1.0",
"description": "CLI tool for tweeting and replying via Twitter GraphQL API", "description": "CLI tool for tweeting and replying via Twitter/X GraphQL API",
"type": "module", "type": "module",
"main": "dist/index.js", "main": "dist/index.js",
"bin": { "bin": {
"twitter-cli": "dist/index.js" "bird": "dist/index.js"
}, },
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
@@ -15,7 +15,7 @@
"lint": "biome check .", "lint": "biome check .",
"lint:fix": "biome check --write .", "lint:fix": "biome check --write .",
"format": "biome format --write .", "format": "biome format --write .",
"binary": "bun build --compile --minify src/index.ts --outfile twitter-cli" "binary": "bun build --compile --minify src/index.ts --outfile bird"
}, },
"dependencies": { "dependencies": {
"commander": "^12.1.0" "commander": "^12.1.0"
+6 -5
View File
@@ -1,11 +1,12 @@
#!/usr/bin/env node #!/usr/bin/env node
/** /**
* twitter-cli - CLI tool for posting tweets and replies * bird - CLI tool for posting tweets and replies
* *
* Usage: * Usage:
* twitter-cli tweet "Hello world!" * bird tweet "Hello world!"
* twitter-cli reply <tweet-id> "This is a reply" * bird reply <tweet-id> "This is a reply"
* twitter-cli reply <tweet-url> "This is a reply" * bird reply <tweet-url> "This is a reply"
* bird read <tweet-id-or-url>
*/ */
import { Command } from 'commander'; import { Command } from 'commander';
@@ -14,7 +15,7 @@ import { TwitterClient } from './lib/twitter-client.js';
const program = new Command(); const program = new Command();
program.name('twitter-cli').description('Post tweets and replies via Twitter GraphQL API').version('0.1.0'); program.name('bird').description('Post tweets and replies via Twitter/X GraphQL API').version('0.1.0');
// Global options for authentication // Global options for authentication
program program
-6
View File
@@ -1,6 +0,0 @@
#!/usr/bin/env bash
# twitter-cli - CLI tool for posting tweets and replies
# Requires Node.js 20+ and pnpm
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR" && exec pnpm exec tsx src/index.ts "$@"