@inetafrica/open-claudia 1.0.3 → 1.0.4
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/bin/cli.js +2 -1
- package/bot.js +7 -6
- package/config-dir.js +11 -0
- package/package.json +2 -4
- package/setup.js +11 -10
- package/crons.json +0 -1
- package/soul.md +0 -39
package/bin/cli.js
CHANGED
|
@@ -34,7 +34,8 @@ switch (command) {
|
|
|
34
34
|
break;
|
|
35
35
|
|
|
36
36
|
case "logs":
|
|
37
|
-
const
|
|
37
|
+
const configDir = require(path.join(botDir, "config-dir"));
|
|
38
|
+
const logFile = path.join(configDir, "bot.log");
|
|
38
39
|
try {
|
|
39
40
|
execSync(`tail -50 "${logFile}"`, { stdio: "inherit" });
|
|
40
41
|
} catch (e) {
|
package/bot.js
CHANGED
|
@@ -5,10 +5,11 @@ const path = require("path");
|
|
|
5
5
|
const https = require("https");
|
|
6
6
|
const cron = require("node-cron");
|
|
7
7
|
const Vault = require("./vault");
|
|
8
|
+
const CONFIG_DIR = require("./config-dir");
|
|
8
9
|
|
|
9
10
|
// ── Load Config from .env ───────────────────────────────────────────
|
|
10
11
|
function loadEnv() {
|
|
11
|
-
const envPath = path.join(
|
|
12
|
+
const envPath = path.join(CONFIG_DIR, ".env");
|
|
12
13
|
if (!fs.existsSync(envPath)) {
|
|
13
14
|
console.error("No .env file found. Run: node setup.js");
|
|
14
15
|
process.exit(1);
|
|
@@ -23,7 +24,7 @@ function loadEnv() {
|
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
function saveEnvKey(key, value) {
|
|
26
|
-
const envPath = path.join(
|
|
27
|
+
const envPath = path.join(CONFIG_DIR, ".env");
|
|
27
28
|
const content = fs.readFileSync(envPath, "utf-8");
|
|
28
29
|
const lines = content.split("\n");
|
|
29
30
|
let found = false;
|
|
@@ -44,10 +45,10 @@ const CLAUDE_PATH = config.CLAUDE_PATH;
|
|
|
44
45
|
const WHISPER_CLI = config.WHISPER_CLI || "";
|
|
45
46
|
const WHISPER_MODEL = config.WHISPER_MODEL || "";
|
|
46
47
|
const FFMPEG = config.FFMPEG || "";
|
|
47
|
-
const SOUL_FILE = config.SOUL_FILE || path.join(
|
|
48
|
-
const CRONS_FILE = config.CRONS_FILE || path.join(
|
|
49
|
-
const VAULT_FILE = config.VAULT_FILE || path.join(
|
|
50
|
-
const AUTH_FILE = config.AUTH_FILE || path.join(
|
|
48
|
+
const SOUL_FILE = config.SOUL_FILE || path.join(CONFIG_DIR, "soul.md");
|
|
49
|
+
const CRONS_FILE = config.CRONS_FILE || path.join(CONFIG_DIR, "crons.json");
|
|
50
|
+
const VAULT_FILE = config.VAULT_FILE || path.join(CONFIG_DIR, "vault.enc");
|
|
51
|
+
const AUTH_FILE = config.AUTH_FILE || path.join(CONFIG_DIR, "auth.json");
|
|
51
52
|
const BOT_DIR = __dirname;
|
|
52
53
|
|
|
53
54
|
// Detect PATH for subprocess
|
package/config-dir.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
|
|
4
|
+
const CONFIG_DIR = path.join(process.env.HOME || require("os").homedir(), ".open-claudia");
|
|
5
|
+
|
|
6
|
+
// Ensure directory exists
|
|
7
|
+
if (!fs.existsSync(CONFIG_DIR)) {
|
|
8
|
+
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = CONFIG_DIR;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inetafrica/open-claudia",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Your always-on AI coding assistant — Claude Code via Telegram",
|
|
5
5
|
"main": "bot.js",
|
|
6
6
|
"bin": {
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
"bot.js",
|
|
16
16
|
"vault.js",
|
|
17
17
|
"setup.js",
|
|
18
|
+
"config-dir.js",
|
|
18
19
|
"bin/",
|
|
19
|
-
"soul.md",
|
|
20
|
-
"crons.json",
|
|
21
|
-
"auth.json",
|
|
22
20
|
".env.example",
|
|
23
21
|
"README.md"
|
|
24
22
|
],
|
package/setup.js
CHANGED
|
@@ -7,13 +7,14 @@ const path = require("path");
|
|
|
7
7
|
const crypto = require("crypto");
|
|
8
8
|
const { execSync } = require("child_process");
|
|
9
9
|
const Vault = require("./vault");
|
|
10
|
+
const CONFIG_DIR = require("./config-dir");
|
|
10
11
|
|
|
11
|
-
const ENV_FILE = path.join(
|
|
12
|
-
const VAULT_FILE = path.join(
|
|
13
|
-
const SOUL_FILE = path.join(
|
|
14
|
-
const CRONS_FILE = path.join(
|
|
15
|
-
const AUTH_FILE = path.join(
|
|
16
|
-
const SETUP_STATE_FILE = path.join(
|
|
12
|
+
const ENV_FILE = path.join(CONFIG_DIR, ".env");
|
|
13
|
+
const VAULT_FILE = path.join(CONFIG_DIR, "vault.enc");
|
|
14
|
+
const SOUL_FILE = path.join(CONFIG_DIR, "soul.md");
|
|
15
|
+
const CRONS_FILE = path.join(CONFIG_DIR, "crons.json");
|
|
16
|
+
const AUTH_FILE = path.join(CONFIG_DIR, "auth.json");
|
|
17
|
+
const SETUP_STATE_FILE = path.join(CONFIG_DIR, ".setup-state.json");
|
|
17
18
|
|
|
18
19
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
19
20
|
const ask = (q) => new Promise((r) => rl.question(q, r));
|
|
@@ -220,9 +221,9 @@ async function setupDaemon(platform) {
|
|
|
220
221
|
<key>KeepAlive</key>
|
|
221
222
|
<true/>
|
|
222
223
|
<key>StandardOutPath</key>
|
|
223
|
-
<string>${path.join(
|
|
224
|
+
<string>${path.join(CONFIG_DIR, "bot.log")}</string>
|
|
224
225
|
<key>StandardErrorPath</key>
|
|
225
|
-
<string>${path.join(
|
|
226
|
+
<string>${path.join(CONFIG_DIR, "bot.log")}</string>
|
|
226
227
|
<key>EnvironmentVariables</key>
|
|
227
228
|
<dict>
|
|
228
229
|
<key>PATH</key>
|
|
@@ -251,8 +252,8 @@ WorkingDirectory=${__dirname}
|
|
|
251
252
|
ExecStart=${nodePath} ${botPath}
|
|
252
253
|
Restart=always
|
|
253
254
|
RestartSec=10
|
|
254
|
-
StandardOutput=append:${path.join(
|
|
255
|
-
StandardError=append:${path.join(
|
|
255
|
+
StandardOutput=append:${path.join(CONFIG_DIR, "bot.log")}
|
|
256
|
+
StandardError=append:${path.join(CONFIG_DIR, "bot.log")}
|
|
256
257
|
|
|
257
258
|
[Install]
|
|
258
259
|
WantedBy=multi-user.target`;
|
package/crons.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[]
|
package/soul.md
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# Soul
|
|
2
|
-
|
|
3
|
-
You are Sumeet's personal AI assistant, running 24/7 via a Telegram bot bridge to Claude Code.
|
|
4
|
-
|
|
5
|
-
## Identity
|
|
6
|
-
- Name: Just "Claude" — no need for a custom persona
|
|
7
|
-
- Tone: Direct, concise, technical. Like a sharp senior engineer who's also a good friend.
|
|
8
|
-
- Never over-explain. Sumeet is technical — he gets it.
|
|
9
|
-
- Mobile-first: keep messages short. Send files for anything long.
|
|
10
|
-
|
|
11
|
-
## About Sumeet
|
|
12
|
-
- Full-stack developer / founder
|
|
13
|
-
- Works across many projects in ~/Workspace
|
|
14
|
-
- Tech stack: Node.js, React/Next.js, MongoDB, Kubernetes, Docker
|
|
15
|
-
- Uses Cursor IDE and Claude Code CLI daily
|
|
16
|
-
- Communicates via Telegram on mobile when away from desk
|
|
17
|
-
|
|
18
|
-
## Key Projects
|
|
19
|
-
- **crm** — Kazee CRM platform (monorepo: crm-backend, frontend, helpdesk-frontend, spaces-backend, spaces-frontend, workflow-kanban). MongoDB, Node.js backend, Next.js frontends.
|
|
20
|
-
- **metriq / metriq-api** — Metrics/analytics platform
|
|
21
|
-
- **ticket-central** — Ticketing system
|
|
22
|
-
- **hr-hub** — HR management
|
|
23
|
-
- **kazee-connect-subscription-service** — Subscription/billing service
|
|
24
|
-
- **k8s / kubernetes-applications / kazee-infratructure** — Kubernetes deployment configs
|
|
25
|
-
- **janus-devops / janus-webrtc** — WebRTC infrastructure
|
|
26
|
-
|
|
27
|
-
## Working Style
|
|
28
|
-
- Prefers action over discussion. Do the thing, then explain what you did.
|
|
29
|
-
- Likes plans for big changes, but hates over-planning small ones.
|
|
30
|
-
- Appreciates when you proactively flag issues or suggest improvements.
|
|
31
|
-
- Send files directly via Telegram when output is long.
|
|
32
|
-
|
|
33
|
-
## What You Can Do
|
|
34
|
-
- Write, edit, and refactor code across all projects
|
|
35
|
-
- Run commands, tests, builds, deployments
|
|
36
|
-
- Send files, images, code snippets directly to Telegram
|
|
37
|
-
- Run scheduled checks and report results
|
|
38
|
-
- Monitor git status, PRs, deployments
|
|
39
|
-
- Help with architecture decisions and code reviews
|