@link.me/cli 0.1.0

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.
Files changed (3) hide show
  1. package/README.md +238 -0
  2. package/package.json +29 -0
  3. package/run.js +44 -0
package/README.md ADDED
@@ -0,0 +1,238 @@
1
+ # @link.me/cli
2
+
3
+ Command-line interface for the [Linkme](https://link.me) platform. Manage your profile, links, content, analytics, and multi-platform publishing from the terminal.
4
+
5
+ Built for agents, CI/CD pipelines, scripts, and power users.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @link.me/cli
11
+ ```
12
+
13
+ Pre-compiled binaries are provided for macOS (arm64, x64), Linux (x64, arm64), and Windows (x64). No runtime dependencies required.
14
+
15
+ ## Quick Start
16
+
17
+ ```bash
18
+ # Authenticate
19
+ linkme auth login --email you@example.com --password '***'
20
+
21
+ # View your profile
22
+ linkme profile
23
+
24
+ # List your links
25
+ linkme links list
26
+
27
+ # Post a video to YouTube, Instagram, and TikTok simultaneously
28
+ linkme ap upload ./video.mp4
29
+ linkme ap post create --video u/42/uploaded-key --caption "New video!" --platforms youtube,instagram,tiktok
30
+
31
+ # Check analytics
32
+ linkme analytics overview
33
+ ```
34
+
35
+ ## Output Modes
36
+
37
+ Every command supports three output modes:
38
+
39
+ ```bash
40
+ # Human-readable (default)
41
+ linkme profile
42
+
43
+ # JSON for piping and scripting
44
+ linkme profile --json
45
+
46
+ # Quiet mode - single most useful value
47
+ linkme profile --quiet
48
+ ```
49
+
50
+ ## Commands
51
+
52
+ ### Authentication
53
+
54
+ | Command | Description |
55
+ |---------|-------------|
56
+ | `auth login` | Log in with email and password |
57
+ | `auth logout` | Log out and clear stored tokens |
58
+ | `auth sessions` | List active sessions |
59
+ | `auth switch` | Switch the active profile |
60
+ | `whoami` | Show current identity |
61
+
62
+ ### Profile
63
+
64
+ | Command | Description |
65
+ |---------|-------------|
66
+ | `profile` | View your profile |
67
+ | `profile edit` | Edit profile fields (name, bio, etc.) |
68
+ | `profile theme` | Manage theme colors |
69
+ | `profile linkme-icon` | Toggle Linkme icon visibility |
70
+ | `profile pixels` | Manage tracking pixels |
71
+ | `profile contact list\|set\|delete` | Manage contact info |
72
+ | `profile sections list\|enable\|disable\|move` | Manage section visibility and order |
73
+ | `profile events list\|add\|edit\|delete` | Manage custom events |
74
+ | `profile forms list\|create\|edit\|delete\|submissions\|export` | Manage forms |
75
+ | `profile video show\|set\|remove` | Manage profile video |
76
+ | `profile bands-in-town show\|sync\|events\|colors` | Manage BandsInTown integration |
77
+
78
+ ### Links
79
+
80
+ | Command | Description |
81
+ |---------|-------------|
82
+ | `links list` | List profile links |
83
+ | `links add` | Add a new link |
84
+ | `links edit` | Edit an existing link |
85
+ | `links delete` | Delete a link |
86
+ | `links reorder` | Reorder link groups interactively |
87
+
88
+ ### Featured Links
89
+
90
+ | Command | Description |
91
+ |---------|-------------|
92
+ | `featured list\|add\|edit\|delete` | Manage featured links |
93
+ | `featured headers list\|add\|edit\|delete` | Manage profile headers |
94
+ | `featured multilinks list\|add\|edit\|delete` | Manage music smart links |
95
+
96
+ ### Social
97
+
98
+ | Command | Description |
99
+ |---------|-------------|
100
+ | `social list` | List social network links |
101
+ | `social set` | Set a social network URL |
102
+
103
+ ### AP (Post on All Platforms)
104
+
105
+ | Command | Description |
106
+ |---------|-------------|
107
+ | `ap accounts` | List connected provider accounts |
108
+ | `ap connect <provider>` | Connect YouTube, Instagram, or TikTok |
109
+ | `ap disconnect <provider> <id>` | Disconnect a provider account |
110
+ | `ap upload <file>` | Upload a video file |
111
+ | `ap post create` | Create a new post |
112
+ | `ap post list` | List posts |
113
+ | `ap post status <id>` | Check post status |
114
+ | `ap post watch <id>` | Watch status in real-time |
115
+ | `ap post publish <id>` | Publish a draft |
116
+ | `ap post cancel <id>` | Cancel a pending post |
117
+ | `ap post retry <id>` | Retry a failed post |
118
+ | `ap analytics <id>` | Post analytics |
119
+ | `ap analytics accounts` | Analytics across all accounts |
120
+
121
+ ### Analytics
122
+
123
+ | Command | Description |
124
+ |---------|-------------|
125
+ | `analytics overview` | Aggregated analytics |
126
+ | `analytics visits` | Visit breakdown over time |
127
+ | `analytics links` | Per-link click analytics |
128
+ | `analytics geo` | Geographic breakdown |
129
+ | `analytics realtime` | Real-time visitor count |
130
+
131
+ ### Email
132
+
133
+ | Command | Description |
134
+ |---------|-------------|
135
+ | `email send` | Send a campaign |
136
+ | `email test` | Send a test email |
137
+ | `email history` | View campaign history |
138
+ | `email detail <id>` | Campaign details and metrics |
139
+ | `email cancel <id>` | Cancel a scheduled campaign |
140
+ | `email domains` | List verified sending domains |
141
+ | `email upload-image` | Upload an embedded image |
142
+ | `email templates list\|create\|delete` | Manage templates |
143
+
144
+ ### Contacts
145
+
146
+ | Command | Description |
147
+ |---------|-------------|
148
+ | `contacts list` | List collected contacts |
149
+ | `contacts stats` | Contact analytics |
150
+
151
+ ### Commerce & Shop
152
+
153
+ | Command | Description |
154
+ |---------|-------------|
155
+ | `commerce products list\|create\|delete` | Digital products |
156
+ | `commerce merch list\|categories` | Merch catalog |
157
+ | `shop products list\|add\|edit\|delete` | Shop products |
158
+ | `shop categories list\|add\|edit\|reorder\|delete` | Shop categories |
159
+
160
+ ### Automations
161
+
162
+ | Command | Description |
163
+ |---------|-------------|
164
+ | `automations list` | List automations |
165
+ | `automations get <id>` | View an automation |
166
+ | `automations create` | Create an automation |
167
+ | `automations update <id>` | Update an automation |
168
+ | `automations publish <id>` | Publish an automation |
169
+ | `automations deactivate <id>` | Deactivate an automation |
170
+ | `automations delete <id>` | Delete an automation |
171
+ | `automations duplicate <id>` | Duplicate an automation |
172
+ | `automations metrics <id>` | Automation metrics |
173
+ | `automations analytics <id>` | Automation analytics |
174
+ | `automations monitor <id>` | Monitor performance |
175
+ | `automations connection` | Instagram connection status |
176
+ | `automations authorize` | Get Instagram OAuth URL |
177
+ | `automations disconnect` | Disconnect Instagram |
178
+
179
+ ### Other
180
+
181
+ | Command | Description |
182
+ |---------|-------------|
183
+ | `gallery upload\|list\|delete\|reorder` | Manage gallery media |
184
+ | `courses list\|get\|create\|update\|delete\|restore` | Manage courses |
185
+ | `feeds subscribe\|list\|videos\|poll\|unsubscribe` | Feed subscriptions |
186
+ | `reviews subscribe\|list\|show\|unsubscribe` | Review subscriptions |
187
+ | `agency create\|list\|invite\|users\|remove\|manage\|invitations` | Agency management |
188
+ | `upgrade pro` | Upgrade to Linkme Pro |
189
+ | `config show\|set\|reset` | CLI configuration |
190
+ | `completion <shell>` | Generate shell completions (bash, zsh, fish) |
191
+
192
+ ## Global Flags
193
+
194
+ | Flag | Description |
195
+ |------|-------------|
196
+ | `--json` | Structured JSON output |
197
+ | `--quiet` | Suppress non-essential output |
198
+ | `--verbose` | Diagnostic details |
199
+ | `--no-color` | Disable ANSI colors |
200
+ | `--profile <name>` | Named Linkme profile |
201
+ | `-V, --version` | Version info |
202
+
203
+ ## Environment Variables
204
+
205
+ | Variable | Description |
206
+ |----------|-------------|
207
+ | `LINKME_TOKEN` | Auth token (overrides stored credentials) |
208
+ | `LINKME_API_URL` | Override API base URL |
209
+ | `LINKME_AUTH_URL` | Override auth service URL |
210
+ | `LINKME_AP_URL` | Override AP service URL |
211
+ | `LINKME_NO_UPDATE_CHECK` | Set `1` to disable update checks |
212
+ | `NO_COLOR` | Disable ANSI colors |
213
+
214
+ ## CI/CD Usage
215
+
216
+ ```bash
217
+ # Authenticate with a token
218
+ export LINKME_TOKEN="your-api-token"
219
+
220
+ # All commands work non-interactively with --json
221
+ linkme profile --json | jq '.username'
222
+ linkme links list --json | jq '.[].title'
223
+ linkme ap post list --json | jq '.[0].id'
224
+ ```
225
+
226
+ ## MCP Server
227
+
228
+ An MCP (Model Context Protocol) server is available as a separate package for AI agent integration:
229
+
230
+ ```bash
231
+ npm install -g @link.me/mcp
232
+ ```
233
+
234
+ See [@link.me/mcp](https://www.npmjs.com/package/@link.me/mcp) for setup instructions.
235
+
236
+ ## License
237
+
238
+ UNLICENSED
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@link.me/cli",
3
+ "version": "0.1.0",
4
+ "description": "Linkme platform CLI for agents, scripts, and automation",
5
+ "license": "UNLICENSED",
6
+ "bin": {
7
+ "linkme": "./run.js"
8
+ },
9
+ "files": [
10
+ "run.js"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/LinkMeGlobal/cli.git",
15
+ "directory": "bin/cli"
16
+ },
17
+ "keywords": [
18
+ "linkme",
19
+ "cli",
20
+ "automation"
21
+ ],
22
+ "optionalDependencies": {
23
+ "@link.me/cli-darwin-arm64": "0.1.0",
24
+ "@link.me/cli-darwin-x64": "0.1.0",
25
+ "@link.me/cli-linux-x64": "0.1.0",
26
+ "@link.me/cli-linux-arm64": "0.1.0",
27
+ "@link.me/cli-windows-x64": "0.1.0"
28
+ }
29
+ }
package/run.js ADDED
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { execFileSync } = require("node:child_process");
4
+ const path = require("node:path");
5
+ const os = require("node:os");
6
+
7
+ const PLATFORMS = {
8
+ "darwin-arm64": "@link.me/cli-darwin-arm64",
9
+ "darwin-x64": "@link.me/cli-darwin-x64",
10
+ "linux-x64": "@link.me/cli-linux-x64",
11
+ "linux-arm64": "@link.me/cli-linux-arm64",
12
+ "win32-x64": "@link.me/cli-windows-x64",
13
+ };
14
+
15
+ const key = `${os.platform()}-${os.arch()}`;
16
+ const pkg = PLATFORMS[key];
17
+
18
+ if (!pkg) {
19
+ console.error(
20
+ `@link.me/cli: unsupported platform ${key}. Supported: ${Object.keys(PLATFORMS).join(", ")}`,
21
+ );
22
+ process.exit(1);
23
+ }
24
+
25
+ let binPath;
26
+ try {
27
+ const pkgDir = path.dirname(require.resolve(`${pkg}/package.json`));
28
+ binPath = path.join(
29
+ pkgDir,
30
+ os.platform() === "win32" ? "linkme.exe" : "linkme",
31
+ );
32
+ } catch {
33
+ console.error(
34
+ `@link.me/cli: could not find ${pkg}. Try reinstalling with:\n npm install @link.me/cli`,
35
+ );
36
+ process.exit(1);
37
+ }
38
+
39
+ try {
40
+ execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
41
+ } catch (e) {
42
+ if (e.status !== undefined) process.exit(e.status);
43
+ throw e;
44
+ }