claude-friends 0.1.3 → 0.2.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/cli.js +21 -7
- package/commands/friend.md +1 -0
- package/commands/friends.md +1 -0
- package/commands/nudge.md +1 -0
- package/commands/status.md +1 -0
- package/commands/unfriend.md +1 -0
- package/package.json +3 -2
package/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { writeFileSync, existsSync } from "fs";
|
|
3
|
+
import { writeFileSync, existsSync, mkdirSync, copyFileSync, readdirSync } from "fs";
|
|
4
4
|
import { join } from "path";
|
|
5
5
|
import { homedir } from "os";
|
|
6
6
|
import { createInterface } from "readline";
|
|
@@ -40,18 +40,32 @@ if (command === "setup") {
|
|
|
40
40
|
|
|
41
41
|
writeFileSync(CONFIG_PATH, JSON.stringify({ username: username.trim() }, null, 2));
|
|
42
42
|
|
|
43
|
+
// Install slash commands to ~/.claude/commands/
|
|
44
|
+
const commandsDir = join(homedir(), ".claude", "commands");
|
|
45
|
+
mkdirSync(commandsDir, { recursive: true });
|
|
46
|
+
|
|
47
|
+
const srcCommands = join(__dirname, "commands");
|
|
48
|
+
if (existsSync(srcCommands)) {
|
|
49
|
+
const files = readdirSync(srcCommands).filter((f) => f.endsWith(".md"));
|
|
50
|
+
for (const file of files) {
|
|
51
|
+
copyFileSync(join(srcCommands, file), join(commandsDir, file));
|
|
52
|
+
}
|
|
53
|
+
console.log(`\nInstalled slash commands: ${files.map((f) => "/" + f.replace(".md", "")).join(", ")}`);
|
|
54
|
+
}
|
|
55
|
+
|
|
43
56
|
console.log(`
|
|
44
57
|
Done! You're "${username.trim()}".
|
|
45
58
|
|
|
46
59
|
Now add the MCP server to Claude Code:
|
|
47
60
|
|
|
48
|
-
claude mcp add claude-friends --
|
|
61
|
+
claude mcp add claude-friends -- claude-friends serve
|
|
49
62
|
|
|
50
|
-
Then in Claude Code
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
63
|
+
Then in Claude Code:
|
|
64
|
+
/friend alice Add a friend
|
|
65
|
+
/friends See who's online
|
|
66
|
+
/nudge bob Nudge someone
|
|
67
|
+
/status debugging Set your status
|
|
68
|
+
/unfriend alice Remove a friend
|
|
55
69
|
`);
|
|
56
70
|
|
|
57
71
|
rl.close();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the add-friend MCP tool to add "$ARGUMENTS" as a friend. If no username is provided, ask for one.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the friends-online MCP tool to show who's currently online.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the nudge MCP tool to nudge "$ARGUMENTS". If the input includes a message after the username, pass it as the message parameter. If no username is provided, ask for one.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the set-status MCP tool to set your status to "$ARGUMENTS". If no status is provided, ask what to set it to.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the remove-friend MCP tool to remove "$ARGUMENTS" from your friends list. If no username is provided, ask for one.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-friends",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "See who's online in Claude Code. Add friends, share status, nudge each other.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"cli.js",
|
|
16
16
|
"mcp-server.js",
|
|
17
17
|
"statusline.js",
|
|
18
|
-
"client.js"
|
|
18
|
+
"client.js",
|
|
19
|
+
"commands/"
|
|
19
20
|
],
|
|
20
21
|
"dependencies": {
|
|
21
22
|
"@modelcontextprotocol/sdk": "^1.12.1",
|