api2cli 0.3.14 → 0.3.15
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 +9 -11
- package/dist/index.js +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -103,7 +103,7 @@ program.addCommand(draftsResource);
|
|
|
103
103
|
### 3. Build and link
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
|
-
api2cli bundle <app> # Build the CLI
|
|
106
|
+
api2cli bundle <app> # Build the CLI
|
|
107
107
|
api2cli link <app> # Add to PATH (updates .bashrc/.zshrc)
|
|
108
108
|
```
|
|
109
109
|
|
|
@@ -122,18 +122,16 @@ api2cli link <app> # Add to PATH (updates .bashrc/.zshrc)
|
|
|
122
122
|
| Command | Description |
|
|
123
123
|
|---------|-------------|
|
|
124
124
|
| `api2cli create <app>` | Generate a new CLI from API docs |
|
|
125
|
-
| `api2cli bundle <app
|
|
126
|
-
| `api2cli
|
|
127
|
-
| `api2cli link <app>` | Add a CLI to PATH |
|
|
128
|
-
| `api2cli link --all` | Link all CLIs |
|
|
125
|
+
| `api2cli bundle <app> [--compile] [--all]` | Build a CLI from source (`--compile` for standalone binary) |
|
|
126
|
+
| `api2cli link <app> [--all]` | Add a CLI to PATH |
|
|
129
127
|
| `api2cli unlink <app>` | Remove from PATH |
|
|
130
|
-
| `api2cli list` | List all installed CLIs |
|
|
131
|
-
| `api2cli tokens` | List all configured tokens (masked) |
|
|
132
|
-
| `api2cli remove <app
|
|
128
|
+
| `api2cli list [--json]` | List all installed CLIs |
|
|
129
|
+
| `api2cli tokens [--show]` | List all configured tokens (masked) |
|
|
130
|
+
| `api2cli remove <app> [--keep-token]` | Remove a CLI entirely |
|
|
133
131
|
| `api2cli doctor` | Check system requirements |
|
|
134
|
-
| `api2cli install <
|
|
135
|
-
| `api2cli publish <app
|
|
136
|
-
| `api2cli update <app>` | Re-sync with API changes |
|
|
132
|
+
| `api2cli install <source> [--force]` | Install from GitHub repo or registry |
|
|
133
|
+
| `api2cli publish <app> [--github <url>] [--category <cat>]` | Publish to registry |
|
|
134
|
+
| `api2cli update <app>` | Re-sync with API changes (agent-driven) |
|
|
137
135
|
|
|
138
136
|
### Generated CLIs (`<app>-cli`)
|
|
139
137
|
|
package/dist/index.js
CHANGED
|
@@ -2690,7 +2690,7 @@ ${import_picocolors4.default.bold("Installing")} ${import_picocolors4.default.cy
|
|
|
2690
2690
|
console.log(` ${import_picocolors4.default.green("+")} Built`);
|
|
2691
2691
|
addToPath(app, distDir);
|
|
2692
2692
|
symlinkSkill(cliDir, appCli);
|
|
2693
|
-
const trackName = skillName ??
|
|
2693
|
+
const trackName = skillName ?? (repo.endsWith("-cli") ? repo : `${repo}-cli`);
|
|
2694
2694
|
fetch(`${REGISTRY_API}/skills/${trackName}/download`, { method: "POST" }).catch(() => {});
|
|
2695
2695
|
console.log(`
|
|
2696
2696
|
${import_picocolors4.default.green("\u2713")} Installed ${import_picocolors4.default.bold(appCli)}`);
|
|
@@ -2936,7 +2936,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
|
2936
2936
|
import { existsSync as existsSync13 } from "fs";
|
|
2937
2937
|
var updateCommand = new Command("update").description("Re-sync a CLI when the upstream API changes").argument("<app>", "CLI to update").option("--docs <url>", "Updated API documentation URL").option("--openapi <url>", "Updated OpenAPI spec URL").addHelpText("after", `
|
|
2938
2938
|
Example:
|
|
2939
|
-
api2cli update typefully --docs https://docs.typefully.com`).action(async (app) => {
|
|
2939
|
+
api2cli update typefully --docs https://docs.typefully.com`).action(async (app, opts) => {
|
|
2940
2940
|
const cliDir = getCliDir(app);
|
|
2941
2941
|
if (!existsSync13(cliDir)) {
|
|
2942
2942
|
console.error(`${import_picocolors11.default.red("\u2717")} ${app}-cli not found. Run: ${import_picocolors11.default.cyan(`api2cli create ${app}`)}`);
|
|
@@ -2946,6 +2946,13 @@ Example:
|
|
|
2946
2946
|
console.log(`
|
|
2947
2947
|
Use your AI agent to update resources in:`);
|
|
2948
2948
|
console.log(` ${import_picocolors11.default.dim(`${cliDir}/src/resources/`)}`);
|
|
2949
|
+
if (opts.docs) {
|
|
2950
|
+
console.log(`
|
|
2951
|
+
API docs: ${import_picocolors11.default.cyan(opts.docs)}`);
|
|
2952
|
+
}
|
|
2953
|
+
if (opts.openapi) {
|
|
2954
|
+
console.log(`OpenAPI spec: ${import_picocolors11.default.cyan(opts.openapi)}`);
|
|
2955
|
+
}
|
|
2949
2956
|
console.log(`
|
|
2950
2957
|
Then rebuild: ${import_picocolors11.default.cyan(`api2cli bundle ${app}`)}`);
|
|
2951
2958
|
});
|