mikasa-cli 1.0.3 → 1.0.5

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 ADDED
@@ -0,0 +1,20 @@
1
+ # Mikasa CLI 🌸
2
+
3
+ Mikasa CLI is an AI-powered command-line tool that lets you chat with AI, manage authentication via GitHub, and interact with smart agents directly from your terminal.
4
+
5
+ ---
6
+
7
+ ## ✨ Features
8
+
9
+ - 🔐 GitHub login using Device Authorization Flow
10
+ - 🤖 AI chat (tool / agent based)
11
+ - 💾 Persistent login session
12
+ - ⚡ Fast and interactive CLI experience
13
+ - 🧠 Built with Better Auth + Prisma
14
+
15
+ ---
16
+
17
+ ## 📦 Installation
18
+
19
+ ```bash
20
+ npm install -g mikasa-cli
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mikasa-cli",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -17,7 +17,7 @@ import prisma from "../../../lib/db.js";
17
17
  // dotenv.config();
18
18
 
19
19
  const DEMO_URL = "https://mikasa-cli-2.onrender.com";
20
- const CLIENT_ID = process.env.GITHUB_CLIENT_ID;
20
+ const CLIENT_ID = process.env.GITHUB_CLIENT_ID || "Ov23lir2byjlHCgWLvEf";
21
21
  const CONFIG_DIR = path.join(os.homedir(), ".better-auth");
22
22
  const TOKEN_FILE = path.join(CONFIG_DIR, "token.json");
23
23
 
package/src/cli/main.js CHANGED
@@ -25,7 +25,7 @@ async function main() {
25
25
 
26
26
  program
27
27
  .name("mikasa")
28
- .version("1.0.0")
28
+ .version("1.0.4")
29
29
  .description(
30
30
  "Mikasa CLI - A powerful AI command line tool.\n" +
31
31
  "Built by Suman Kayal.\n" +
package/src/lib/auth.js CHANGED
@@ -18,8 +18,8 @@ export const auth = betterAuth({
18
18
  ],
19
19
  socialProviders: {
20
20
  github: {
21
- clientId: "Ov23lir2byjlHCgWLvEf",
22
- clientSecret: "1508f24efb3a1969480348b36b35302b6ad07952",
21
+ clientId: process.env.GITHUB_CLIENT_ID || "Ov23lir2byjlHCgWLvEf",
22
+ clientSecret: process.env.GITHUB_CLIENT_SECRET || "1508f24efb3a1969480348b36b35302b6ad07952",
23
23
  }
24
24
  },
25
25
  // logger: {
package/src/lib/db.js CHANGED
@@ -1,9 +1,35 @@
1
- import { PrismaClient } from '@prisma/client';
1
+ // import { PrismaClient } from '@prisma/client';
2
2
 
3
3
 
4
+ // const globalForPrisma = global;
5
+ // const prisma = new PrismaClient();
6
+
7
+ // if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;
8
+
9
+ // export default prisma;
10
+
11
+
12
+ import { PrismaClient } from "@prisma/client";
13
+
14
+ // ⚠️ HARD-CODED DATABASE URL (NOT SAFE FOR PUBLIC NPM PACKAGES)
15
+ const DATABASE_URL =
16
+ "postgresql://USERNAME:PASSWORD@HOST:5432/DATABASE?schema=public";
17
+
18
+ // Reuse Prisma client in dev (to avoid multiple instances)
4
19
  const globalForPrisma = global;
5
- const prisma = new PrismaClient();
6
20
 
7
- if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;
21
+ const prisma =
22
+ globalForPrisma.prisma ??
23
+ new PrismaClient({
24
+ datasources: {
25
+ db: {
26
+ url: DATABASE_URL, // 👈 overrides env("DATABASE_URL")
27
+ },
28
+ },
29
+ });
30
+
31
+ if (process.env.NODE_ENV !== "production") {
32
+ globalForPrisma.prisma = prisma;
33
+ }
8
34
 
9
- export default prisma;
35
+ export default prisma;