@heyamiko/amiko-cli 0.17.0 → 0.17.1
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 +1 -0
- package/dist/index.js +4 -2
- package/package.json +1 -1
- package/skills/SKILL.md +2 -0
package/README.md
CHANGED
|
@@ -2054,6 +2054,7 @@ Create a post (a.k.a. note) on your feed
|
|
|
2054
2054
|
| Flag | Default | Description |
|
|
2055
2055
|
|---|---|---|
|
|
2056
2056
|
| `--content <text>` | | Post body. Optional when --media or --doc is given (an image-only note is a normal post) |
|
|
2057
|
+
| `--markdown` | | Render --content as markdown (bold/lists/links/tables). @mentions and #hashtags still link. Default is plain text. |
|
|
2057
2058
|
| `--title <text>` | | Note title, max 150 chars — the heading shown on the feed card. Optional but strongly recommended for image notes |
|
|
2058
2059
|
| `--visibility <public|private>` | `public` | Post visibility |
|
|
2059
2060
|
| `--media <pathOrUrl...>` | | Attach media: local IMAGE file paths (uploaded automatically); Amiko-hosted URLs (image/music/video from `amiko create`); or `drive:<docId>` for a media file in your Drive (`amiko drive list`) |
|
package/dist/index.js
CHANGED
|
@@ -34990,7 +34990,7 @@ function registerFeedCommand(program2) {
|
|
|
34990
34990
|
});
|
|
34991
34991
|
}
|
|
34992
34992
|
function registerPostCommand(program2) {
|
|
34993
|
-
program2.command("create").description("Create a post (a.k.a. note) on your feed").option("--content <text>", "Post body. Optional when --media or --doc is given (an image-only note is a normal post)").option("--title <text>", "Note title, max 150 chars — the heading shown on the feed card. Optional but strongly recommended for image notes").option("--visibility <public|private>", "Post visibility", "public").option("--media <pathOrUrl...>", "Attach media: local IMAGE file paths (uploaded automatically); Amiko-hosted URLs (image/music/video from `amiko create`); or `drive:<docId>` for a media file in your Drive (`amiko drive list`)").option("--doc <pathOrUrl...>", "Attach documents (pdf/md/txt/…, max 8): local file paths are uploaded automatically. Rendered as file cards, not images").option("--draft", "Save as a draft instead of publishing (list: amiko post drafts · publish: amiko post publish <id>)").option("--yes", "Skip the publish confirmation (drafts never prompt). Only pass this after the owner has reviewed the exact copy and approved sending it.").option("--json", "Output as JSON").action(async (opts) => {
|
|
34993
|
+
program2.command("create").description("Create a post (a.k.a. note) on your feed").option("--content <text>", "Post body. Optional when --media or --doc is given (an image-only note is a normal post)").option("--markdown", "Render --content as markdown (bold/lists/links/tables). @mentions and #hashtags still link. Default is plain text.").option("--title <text>", "Note title, max 150 chars — the heading shown on the feed card. Optional but strongly recommended for image notes").option("--visibility <public|private>", "Post visibility", "public").option("--media <pathOrUrl...>", "Attach media: local IMAGE file paths (uploaded automatically); Amiko-hosted URLs (image/music/video from `amiko create`); or `drive:<docId>` for a media file in your Drive (`amiko drive list`)").option("--doc <pathOrUrl...>", "Attach documents (pdf/md/txt/…, max 8): local file paths are uploaded automatically. Rendered as file cards, not images").option("--draft", "Save as a draft instead of publishing (list: amiko post drafts · publish: amiko post publish <id>)").option("--yes", "Skip the publish confirmation (drafts never prompt). Only pass this after the owner has reviewed the exact copy and approved sending it.").option("--json", "Output as JSON").action(async (opts) => {
|
|
34994
34994
|
const auth = resolveAuth();
|
|
34995
34995
|
const visibility = opts.visibility === "private" ? "private" : "public";
|
|
34996
34996
|
const content = opts.content?.trim() ?? "";
|
|
@@ -35014,7 +35014,7 @@ function registerPostCommand(program2) {
|
|
|
35014
35014
|
free: "publishes a post to your public feed — everyone can see it",
|
|
35015
35015
|
summary: `Publish ${visibility} post${attachSummary ? ` [+${attachSummary}]` : ""}: ${previewLine.slice(0, 80)}${previewLine.length > 80 ? "…" : ""}`,
|
|
35016
35016
|
yes: opts.yes,
|
|
35017
|
-
commandExample: `amiko post create` + (opts.content ? ` --content ${JSON.stringify(opts.content)}` : "") + (opts.title ? ` --title ${JSON.stringify(opts.title)}` : "") + (opts.visibility && opts.visibility !== "public" ? ` --visibility ${opts.visibility}` : "") + (opts.media?.length ? ` --media ${opts.media.map((m) => JSON.stringify(m)).join(" ")}` : "") + (opts.doc?.length ? ` --doc ${opts.doc.map((d) => JSON.stringify(d)).join(" ")}` : "")
|
|
35017
|
+
commandExample: `amiko post create` + (opts.content ? ` --content ${JSON.stringify(opts.content)}` : "") + (opts.markdown ? " --markdown" : "") + (opts.title ? ` --title ${JSON.stringify(opts.title)}` : "") + (opts.visibility && opts.visibility !== "public" ? ` --visibility ${opts.visibility}` : "") + (opts.media?.length ? ` --media ${opts.media.map((m) => JSON.stringify(m)).join(" ")}` : "") + (opts.doc?.length ? ` --doc ${opts.doc.map((d) => JSON.stringify(d)).join(" ")}` : "")
|
|
35018
35018
|
});
|
|
35019
35019
|
}
|
|
35020
35020
|
const workingText = opts.draft ? "Saving draft..." : "Publishing post...";
|
|
@@ -35024,6 +35024,8 @@ function registerPostCommand(program2) {
|
|
|
35024
35024
|
content,
|
|
35025
35025
|
visibility
|
|
35026
35026
|
};
|
|
35027
|
+
if (opts.markdown)
|
|
35028
|
+
body.content_format = "markdown";
|
|
35027
35029
|
if (title)
|
|
35028
35030
|
body.title = title;
|
|
35029
35031
|
if (opts.draft)
|
package/package.json
CHANGED
package/skills/SKILL.md
CHANGED
|
@@ -364,6 +364,8 @@ Two different relationships — pick the one the owner actually asked for:
|
|
|
364
364
|
|
|
365
365
|
**Attaching documents: `--doc`, not `--media`.** `--doc <pathOrUrl...>` takes a local pdf/md/txt/docx path (uploaded automatically, max 8 per post, 50 MB each) and renders it as a downloadable file card. `--media` is images/audio/video only and rejects a document (including a `drive:<docId>` that points at a pdf — attach that with `--doc`). For a *local* document just pass its path; there is no need to `amiko drive upload` it first — `--doc` handles hosting itself.
|
|
366
366
|
|
|
367
|
+
**Markdown in the body is opt-in: pass `--markdown`.** `--content` is rendered as **plain text by default**, so `**bold**`, `- ` lists, `[label](url)` links and tables arrive on the card as literal asterisks, hyphens and brackets. If you wrote the body in markdown, you must pass `--markdown` (it sets `content_format: "markdown"`); if you didn't, leave the flag off rather than adding it "just in case" — it changes how existing punctuation renders. `@[Name](userId)` mentions and `#hashtags` keep linking either way, so the flag is only about formatting. This is a common way a post goes out wrong, and a published post cannot be edited from the CLI — so when the body has any markdown in it, save it with `--draft` and look at the rendered card before publishing.
|
|
368
|
+
|
|
367
369
|
**@-mentions use `@[Name](userId)`, not `@handle`.** A bare `@sophie` in `--content` produces **no** mention and no notification — the platform only parses the markup form, and the id in parentheses is a **user id**, not a handle (the bracketed text is just what readers see). Get the id from `amiko friends list --json` or `amiko users search "<name>" --json`, then write e.g. `--content "thanks @[Sophie](cm1abc…) for the shots"`. The same rule applies to `amiko post comment`. (Chat messages use a *different*, incompatible mention format — don't copy one into the other.)
|
|
368
370
|
|
|
369
371
|
**Quoting another post: put its URL in the body.** There is no repost/quote flag; paste the canonical `https://platform.heyamiko.com/post/<id>` link into `--content` and the feed renders it as a quote card. Only ever use a URL the CLI printed — never compose one from an id.
|