@claudein.org/cli 0.1.15 → 0.1.17

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/dist/index.js CHANGED
@@ -25619,7 +25619,10 @@ function positional(schema, index, meta3) {
25619
25619
  // src/index.ts
25620
25620
  import crypto from "crypto";
25621
25621
  import { watch } from "fs";
25622
- import { readFile, writeFile } from "fs/promises";
25622
+ import { cp, mkdir, readdir as readdir2, readFile, writeFile } from "fs/promises";
25623
+ import { createRequire as createRequire2 } from "module";
25624
+ import { homedir } from "os";
25625
+ import { dirname as dirname2, join as join2 } from "path";
25623
25626
 
25624
25627
  // ../node_modules/.bun/nanostores@1.3.0/node_modules/nanostores/clean-stores/index.js
25625
25628
  var clean = Symbol("clean");
@@ -26270,7 +26273,7 @@ var $visit = visit.visit;
26270
26273
  var $visitAsync = visit.visitAsync;
26271
26274
 
26272
26275
  // src/index.ts
26273
- import { createRequire as createRequire2 } from "module";
26276
+ import { fileURLToPath as fileURLToPath2 } from "url";
26274
26277
  var { version: version2 } = createRequire2(import.meta.url)("../package.json");
26275
26278
  var DOMAIN = process.env.CIN_ENV === "dev" ? "localhost:3000" : "claudein.org";
26276
26279
  function hash2(post) {
@@ -26297,10 +26300,15 @@ function p2p(post) {
26297
26300
  function ps2ps(posts) {
26298
26301
  return Promise.all(posts.posts.map((post) => p2p(post)));
26299
26302
  }
26303
+ var formatter = new Intl.DateTimeFormat("en-CA", {
26304
+ year: "numeric",
26305
+ month: "2-digit",
26306
+ day: "2-digit"
26307
+ });
26300
26308
  var posts = {
26301
26309
  posts: [{
26302
26310
  type: "text",
26303
- created: new Date().toISOString(),
26311
+ created: formatter.format(new Date),
26304
26312
  text: "I'm using ClaudeIn to share my thoughts and ideas!"
26305
26313
  }]
26306
26314
  };
@@ -26366,6 +26374,21 @@ var start = command("start").meta({
26366
26374
  var versionCmd = command("version").meta({ description: "Print the version number" }).action(() => {
26367
26375
  console.log(generateVersion("cin", version2));
26368
26376
  });
26377
+ var skillsInstallCmd = command("install").meta({ description: "Install claudein skills into ~/.claude/skills/" }).action(async () => {
26378
+ const pkgRoot = join2(dirname2(fileURLToPath2(import.meta.url)), "..");
26379
+ const skillsDir = join2(pkgRoot, "skills");
26380
+ const targetBase = join2(homedir(), ".claude", "skills");
26381
+ await mkdir(targetBase, { recursive: true });
26382
+ const entries = await readdir2(skillsDir, { withFileTypes: true });
26383
+ for (const entry of entries) {
26384
+ if (!entry.isDirectory())
26385
+ continue;
26386
+ const dst = join2(targetBase, entry.name);
26387
+ await cp(join2(skillsDir, entry.name), dst, { recursive: true });
26388
+ console.log(fmt.success(`Installed ${entry.name} → ${dst}`));
26389
+ }
26390
+ });
26391
+ var skillsCmd = command("skills").meta({ description: "Manage Claude Code skills" }).use(skillsInstallCmd);
26369
26392
  var cinRef;
26370
26393
  var completionCmd = command("completion").meta({
26371
26394
  description: "Generate shell completion script",
@@ -26375,7 +26398,7 @@ var completionCmd = command("completion").meta({
26375
26398
  }).action(({ inputs: { shell } }) => {
26376
26399
  console.log(generateCompletionScript(cinRef._config, shell));
26377
26400
  });
26378
- cinRef = cli("cin", { version: version2 }).use(start).use(versionCmd).use(completionCmd);
26401
+ cinRef = cli("cin", { version: version2 }).use(start).use(skillsCmd).use(versionCmd).use(completionCmd);
26379
26402
  cinRef.run();
26380
26403
  export {
26381
26404
  hash2 as hash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudein.org/cli",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Post to LinkedIn from the command line",
5
5
  "type": "module",
6
6
  "repository": {
@@ -15,7 +15,8 @@
15
15
  "provenance": true
16
16
  },
17
17
  "files": [
18
- "dist"
18
+ "dist",
19
+ "skills"
19
20
  ],
20
21
  "scripts": {
21
22
  "build": "bun build src/index.ts --target=node --outfile=dist/index.js",
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: claudein
3
+ description: Create LinkedIn posts using the claudein CLI. Use when the user wants to write, draft, or schedule LinkedIn posts, or when working with any .yml posts file.
4
+ allowed-tools: Edit, Write, Bash(cin *), Bash(pgrep *)
5
+ ---
6
+
7
+ # claudein — LinkedIn posts from the CLI
8
+
9
+ ## Live schema
10
+
11
+ Read the current schema before writing any posts file — do not rely on memory:
12
+
13
+ !`curl -s https://raw.githubusercontent.com/claudein-org/main/refs/heads/main/claudein.schema.yml`
14
+
15
+ ## Posts file
16
+
17
+ The default file is `posts.yml` but users can use any `.yml` file (pass it to `cin start my-posts.yml`). Write to whichever file the user specifies or is already working with.
18
+
19
+ `cin start` watches the file for changes and updates the browser preview live — always edit the file in place, never delete and recreate it.
20
+
21
+ ## Workflow
22
+
23
+ 1. Write or edit the `.yml` posts file
24
+ 2. Check if `cin start` is already running: `pgrep -fa "cin start"` — if it is, skip step 3
25
+ 3. If not running: `cin start [file]` — opens the live browser preview
26
+ 4. Click "Post" in the browser to publish to LinkedIn
27
+
28
+ ## Media guidelines (LinkedIn)
29
+
30
+ When generating or sourcing images and videos (e.g. with Remotion), target LinkedIn's specs:
31
+
32
+ **Images:** 1200×627 px (1.91:1 landscape) or 1080×1080 px (1:1 square) — PNG or JPG, high resolution
33
+
34
+ **Videos:** MP4, H.264, at least 1280×720 px, 16:9 aspect ratio — up to 4096×2304 supported
35
+
36
+ Low resolution or non-standard aspect ratios may be cropped or rejected by LinkedIn.