chirpie 1.0.30 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -0
- package/dist/index.js +14 -5
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# chirpie
|
|
2
|
+
|
|
3
|
+
**Post to X, Bluesky, LinkedIn, Threads, Mastodon, Instagram, Facebook and Telegram from your terminal.** [Chirpie](https://chirpie.ai) handles the OAuth, the token refresh and the media upload, so every platform is the same command.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g chirpie
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or run it without installing: `npx chirpie <command>`.
|
|
12
|
+
|
|
13
|
+
## Authenticate
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
chirpie login # opens a browser and saves a key to ~/.chirpie/config.json
|
|
17
|
+
chirpie whoami # check what you are signed in as
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or set a key from the [dashboard](https://chirpie.ai/dashboard/keys) in the environment:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
export CHIRPIE_API_KEY=chirpie_sk_...
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`CHIRPIE_API_KEY` takes precedence over the config file. `chirpie auth --key ...` stores one non-interactively, and `chirpie logout` removes it.
|
|
27
|
+
|
|
28
|
+
## Commands
|
|
29
|
+
|
|
30
|
+
| Command | What it does |
|
|
31
|
+
|---------|--------------|
|
|
32
|
+
| `chirpie login` / `logout` / `auth` / `whoami` | Manage credentials |
|
|
33
|
+
| `chirpie post <text>` | Create a post. `-a` account, `-m` media URLs, `-s` schedule |
|
|
34
|
+
| `chirpie thread <post> <post> ...` | Create a 2 to 25 post thread. `-f` takes a JSON payload file |
|
|
35
|
+
| `chirpie posts` | List posts. `--status`, `--account`, `--limit` |
|
|
36
|
+
| `chirpie posts get <id>` | Fetch one post |
|
|
37
|
+
| `chirpie posts delete <id>` | Delete a post. Deleting any post of a scheduled thread cancels the thread |
|
|
38
|
+
| `chirpie accounts` | List connected accounts, active and inactive |
|
|
39
|
+
| `chirpie accounts activate <id>` / `deactivate <id>` | Choose which accounts publish. Deactivating cancels that account's scheduled posts |
|
|
40
|
+
| `chirpie accounts connect-x` | Start the X OAuth flow and print the URL |
|
|
41
|
+
| `chirpie accounts connect-bluesky` | Connect Bluesky with an app password |
|
|
42
|
+
| `chirpie accounts connect-linkedin` / `connect-threads` / `connect-mastodon` / `connect-instagram` / `connect-facebook` | Start that platform's OAuth flow |
|
|
43
|
+
| `chirpie accounts connect-telegram` | Connect a Telegram bot to a channel or group |
|
|
44
|
+
| `chirpie accounts x-keys set` / `status` / `remove` | Use your own X developer app |
|
|
45
|
+
| `chirpie analytics <post_id>` | Engagement metrics for a published post |
|
|
46
|
+
| `chirpie keys` / `keys create` / `keys revoke <id>` | Manage API keys |
|
|
47
|
+
|
|
48
|
+
Run `chirpie <command> --help` for the full option list. Pinterest, TikTok, YouTube and Google Business Profile are coming soon.
|
|
49
|
+
|
|
50
|
+
## Examples
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Post now, picking the account interactively
|
|
54
|
+
chirpie post "Shipped a new release."
|
|
55
|
+
|
|
56
|
+
# Post with media to a specific account
|
|
57
|
+
chirpie post "Look at this" -a 550e8400-e29b-41d4-a716-446655440000 -m https://example.com/a.png
|
|
58
|
+
|
|
59
|
+
# Schedule. Any ISO 8601 timestamp that carries a timezone.
|
|
60
|
+
chirpie post "Later" -s 2026-04-01T14:00:00Z
|
|
61
|
+
|
|
62
|
+
# A thread
|
|
63
|
+
chirpie thread "One" "Two" "Three" -a 550e8400-e29b-41d4-a716-446655440000
|
|
64
|
+
|
|
65
|
+
# What is queued
|
|
66
|
+
chirpie posts --status scheduled
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## JSON output
|
|
70
|
+
|
|
71
|
+
Every command accepts `--json` and prints the raw API response, which is what you want in a script:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
chirpie accounts --json | jq -r '.[0].id'
|
|
75
|
+
chirpie posts --status scheduled --json | jq length
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Put `--json` on the command you are actually running. For a subcommand, both placements work: `chirpie accounts deactivate <id> --json` and `chirpie accounts --json deactivate <id>` are equivalent.
|
|
79
|
+
|
|
80
|
+
## Documentation
|
|
81
|
+
|
|
82
|
+
- [CLI reference](https://chirpie.ai/docs/cli)
|
|
83
|
+
- [API reference](https://chirpie.ai/docs/api/posts)
|
|
84
|
+
- [Errors](https://chirpie.ai/docs/errors)
|
|
85
|
+
|
|
86
|
+
Also available: the [TypeScript SDK](https://www.npmjs.com/package/@chirpie/sdk) and the [MCP server](https://www.npmjs.com/package/@chirpie/mcp).
|
|
87
|
+
|
|
88
|
+
MIT
|
package/dist/index.js
CHANGED
|
@@ -157,7 +157,7 @@ function getClient() {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
// src/commands/post.ts
|
|
160
|
-
var postCommand = new Command3("post").description("Create a post").argument("<text>", "Post text").option("-a, --account <id>", "Account ID").option("-m, --media <urls...>", "Media URLs. Per-platform caps: X
|
|
160
|
+
var postCommand = new Command3("post").description("Create a post").argument("<text>", "Post text").option("-a, --account <id>", "Account ID").option("-m, --media <urls...>", "Media URLs. Per-platform caps: X, Bluesky, LinkedIn and Mastodon 4, Threads 1, Instagram, Facebook and Telegram 10.").option("-s, --schedule <datetime>", "Schedule for later. Any ISO 8601 timestamp with a timezone (2026-04-01T14:00:00Z or 2026-04-01T16:00:00+02:00). Posts publish within ~5 minutes of the scheduled time.").option("--json", "Output raw JSON").action(async (text, opts) => {
|
|
161
161
|
const client = getClient();
|
|
162
162
|
let accountId = opts.account;
|
|
163
163
|
if (!accountId) {
|
|
@@ -404,7 +404,7 @@ async function readSecretFromStdin(prompt) {
|
|
|
404
404
|
stdin.on("data", onData);
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
|
-
var accountsCommand = new Command6("accounts").description("List connected social accounts (X, Bluesky, LinkedIn, Threads, Mastodon, Instagram, Facebook,
|
|
407
|
+
var accountsCommand = new Command6("accounts").description("List connected social accounts (X, Bluesky, LinkedIn, Threads, Mastodon, Instagram, Facebook, and Telegram)").option("--json", "Output raw JSON").action(async (opts, cmd) => {
|
|
408
408
|
const client = getClient();
|
|
409
409
|
try {
|
|
410
410
|
const list = await client.listAccountsWithLimits();
|
|
@@ -490,7 +490,10 @@ accountsCommand.command("connect-x").description("Connect a new X/Twitter accoun
|
|
|
490
490
|
process.exit(1);
|
|
491
491
|
}
|
|
492
492
|
});
|
|
493
|
-
accountsCommand.command("connect-bluesky").description("Connect a Bluesky account via app password").requiredOption(
|
|
493
|
+
accountsCommand.command("connect-bluesky").description("Connect a Bluesky account via app password").requiredOption(
|
|
494
|
+
"--handle <handle>",
|
|
495
|
+
"Bluesky handle. The first part alone is enough (user), and user.bsky.social, a handle on your own domain, or the account email also work"
|
|
496
|
+
).option("--app-password <password>", "App password (omit to enter securely via prompt)").option("--json", "Output raw JSON").action(async (opts, cmd) => {
|
|
494
497
|
const client = getClient();
|
|
495
498
|
try {
|
|
496
499
|
let appPassword = opts.appPassword;
|
|
@@ -550,7 +553,10 @@ accountsCommand.command("connect-threads").description("Connect a Threads (Meta)
|
|
|
550
553
|
process.exit(1);
|
|
551
554
|
}
|
|
552
555
|
});
|
|
553
|
-
accountsCommand.command("connect-mastodon").description("Connect a Mastodon account via OAuth").requiredOption(
|
|
556
|
+
accountsCommand.command("connect-mastodon").description("Connect a Mastodon account via OAuth").requiredOption(
|
|
557
|
+
"--instance <instance>",
|
|
558
|
+
"Mastodon instance. A bare host is enough (mastodon.social), and https://mastodon.social or an @you@fosstodon.org address also work"
|
|
559
|
+
).option("--json", "Output raw JSON").action(async (opts, cmd) => {
|
|
554
560
|
const client = getClient();
|
|
555
561
|
try {
|
|
556
562
|
const result = await client.connectMastodonAccount({
|
|
@@ -609,7 +615,10 @@ accountsCommand.command("connect-facebook").description("Connect a Facebook Page
|
|
|
609
615
|
process.exit(1);
|
|
610
616
|
}
|
|
611
617
|
});
|
|
612
|
-
accountsCommand.command("connect-telegram").description("Connect a Telegram bot to a channel or group").option("--bot-token <token>", "Telegram bot token (omit to enter securely via prompt)").option(
|
|
618
|
+
accountsCommand.command("connect-telegram").description("Connect a Telegram bot to a channel or group").option("--bot-token <token>", "Telegram bot token (omit to enter securely via prompt)").option(
|
|
619
|
+
"--chat-id <id>",
|
|
620
|
+
"Telegram channel or group. A bare name is enough (channelname), and @channelname, a t.me link, or a numeric chat ID also work (omit to enter via prompt)"
|
|
621
|
+
).option("--json", "Output raw JSON").action(async (opts, cmd) => {
|
|
613
622
|
const client = getClient();
|
|
614
623
|
try {
|
|
615
624
|
let botToken = opts.botToken;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chirpie",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "Chirpie CLI: post to social media from the command line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
],
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@chirpie/sdk": "^1.0.
|
|
47
|
+
"@chirpie/sdk": "^1.0.29",
|
|
48
48
|
"commander": "^13"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|