@intercom/cli 0.4.0 → 0.5.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.
- package/dist/index.js +14 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -714,6 +714,14 @@ Examples:
|
|
|
714
714
|
});
|
|
715
715
|
}
|
|
716
716
|
|
|
717
|
+
// src/utils/claude-code-hint.ts
|
|
718
|
+
var HINT_LINE = '<claude-code-hint v="1" type="plugin" value="intercom@claude-plugins-official" />';
|
|
719
|
+
function emitClaudeCodeHint() {
|
|
720
|
+
if (!process.env.CLAUDECODE) return;
|
|
721
|
+
process.stderr.write(`${HINT_LINE}
|
|
722
|
+
`);
|
|
723
|
+
}
|
|
724
|
+
|
|
717
725
|
// src/commands/auth/login.ts
|
|
718
726
|
function registerLoginCommand(auth) {
|
|
719
727
|
auth.command("login").description("Authenticate with Intercom").option("--token <token>", "Authenticate with an API key or token directly").option("--device", "Use device flow (for headless environments)").addHelpText(
|
|
@@ -752,6 +760,7 @@ async function loginWithToken(token) {
|
|
|
752
760
|
await store.set(appId, { token, auth_type: authType, app_id: appId });
|
|
753
761
|
await addWorkspace(configDir2, { app_id: appId, name });
|
|
754
762
|
console.log(`Authenticated to ${name} (${appId})`);
|
|
763
|
+
emitClaudeCodeHint();
|
|
755
764
|
}
|
|
756
765
|
|
|
757
766
|
// src/auth/cookies.ts
|
|
@@ -3667,17 +3676,17 @@ function fullCommandName(cmd) {
|
|
|
3667
3676
|
function createProgram() {
|
|
3668
3677
|
const program = new Command();
|
|
3669
3678
|
const binName2 = detectBinaryName();
|
|
3670
|
-
program.name(binName2).description("CLI tool for managing Intercom workspaces").version(VERSION).option("--json", "Output as JSON").option("--jq <expr>", "Filter JSON output").option("--workspace <id>", "Override default workspace").option("--verbose", "Show HTTP request/response details").option("--no-retry", "Disable automatic rate limit retry").option("--timeout <seconds>", "Request timeout in seconds").option("-n, --dry-run", "Print HTTP requests to stderr without executing them").option("--agent", "Force machine-readable output (JSON/NDJSON)").option("--human", "Force human-readable output even when piped").option("--wide", "Show all columns with wider truncation").addHelpText(
|
|
3671
|
-
|
|
3672
|
-
`
|
|
3679
|
+
program.name(binName2).description("CLI tool for managing Intercom workspaces").version(VERSION).option("--json", "Output as JSON").option("--jq <expr>", "Filter JSON output").option("--workspace <id>", "Override default workspace").option("--verbose", "Show HTTP request/response details").option("--no-retry", "Disable automatic rate limit retry").option("--timeout <seconds>", "Request timeout in seconds").option("-n, --dry-run", "Print HTTP requests to stderr without executing them").option("--agent", "Force machine-readable output (JSON/NDJSON)").option("--human", "Force human-readable output even when piped").option("--wide", "Show all columns with wider truncation").addHelpText("after", () => {
|
|
3680
|
+
emitClaudeCodeHint();
|
|
3681
|
+
return `
|
|
3673
3682
|
Quick start:
|
|
3674
3683
|
$ intercom auth login --token <your-api-token>
|
|
3675
3684
|
$ intercom me
|
|
3676
3685
|
$ intercom articles list --json
|
|
3677
3686
|
$ intercom setup --company-name "Acme" --articles-from ./docs
|
|
3678
3687
|
|
|
3679
|
-
Environment: Set INTERCOM_TOKEN to skip login entirely
|
|
3680
|
-
);
|
|
3688
|
+
Environment: Set INTERCOM_TOKEN to skip login entirely.`;
|
|
3689
|
+
});
|
|
3681
3690
|
registerApiCommand(program);
|
|
3682
3691
|
registerAuthCommand(program);
|
|
3683
3692
|
registerMeCommand(program);
|