@vikasitai/vikasit-code 1.0.1 → 1.0.3
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 +172 -0
- package/bin/vikasit +28 -87
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Vikasit Code
|
|
2
|
+
|
|
3
|
+
**Your AI coding partner, right in the terminal.**
|
|
4
|
+
|
|
5
|
+
Built in India by [Chandorkar Technologies](https://chandorkar.com), Pune.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @vikasitai/vikasit-code
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or with other package managers:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Yarn
|
|
17
|
+
yarn global add @vikasitai/vikasit-code
|
|
18
|
+
|
|
19
|
+
# pnpm
|
|
20
|
+
pnpm add -g @vikasitai/vikasit-code
|
|
21
|
+
|
|
22
|
+
# Bun
|
|
23
|
+
bun add -g @vikasitai/vikasit-code
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Launch interactive mode
|
|
30
|
+
vikasit
|
|
31
|
+
|
|
32
|
+
# Run a single command
|
|
33
|
+
vikasit run "Fix the bug in login.tsx"
|
|
34
|
+
|
|
35
|
+
# Use a specific model
|
|
36
|
+
vikasit run -m vikasit-ai/vikasit-3-fast "Refactor this function"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Sign In
|
|
40
|
+
|
|
41
|
+
On first launch, you'll see a welcome screen. Type `/login` to sign in:
|
|
42
|
+
|
|
43
|
+
1. Type `/login` and press Enter
|
|
44
|
+
2. A browser window opens to [vikasit.ai/signup](https://vikasit.ai/signup)
|
|
45
|
+
3. Create your account and copy your API key from the dashboard
|
|
46
|
+
4. Paste the key in the terminal and press Enter
|
|
47
|
+
5. Start coding!
|
|
48
|
+
|
|
49
|
+
**Free Preview models** are included — no payment required to get started.
|
|
50
|
+
|
|
51
|
+
## Features
|
|
52
|
+
|
|
53
|
+
- **Terminal-Native AI** — Works in your terminal, no IDE required
|
|
54
|
+
- **75+ AI Providers** — Use Vikasit models or bring your own keys (OpenAI, Anthropic, Google, etc.)
|
|
55
|
+
- **Tool Calling** — File editing, bash commands, grep, glob built-in
|
|
56
|
+
- **MCP Support** — Extend with Model Context Protocol servers
|
|
57
|
+
- **LSP Integration** — Full language server support for code intelligence
|
|
58
|
+
- **Multi-Agent** — Spawn subagents for complex tasks
|
|
59
|
+
- **Bash Security** — Built-in safety checks for destructive commands
|
|
60
|
+
- **Session Memory** — Persistent context across sessions
|
|
61
|
+
|
|
62
|
+
## Models
|
|
63
|
+
|
|
64
|
+
### Free (Preview)
|
|
65
|
+
| Model | Description |
|
|
66
|
+
|-------|-------------|
|
|
67
|
+
| Nemotron 3 Super | Free 120B model with tool calling |
|
|
68
|
+
| Qwen 3.6 Plus | Free 1M context model |
|
|
69
|
+
|
|
70
|
+
### Paid Plans
|
|
71
|
+
|
|
72
|
+
| Plan | Price | Models |
|
|
73
|
+
|------|-------|--------|
|
|
74
|
+
| **Lite** | $10/mo | Vikasit 3 Small, Flash (9B) |
|
|
75
|
+
| **Pro** | $30/mo | + Vikasit 3 Fast (397B), Coder, Vision |
|
|
76
|
+
| **Max** | $100/mo | + Vikasit 3 (235B), Thinking, Max (480B) |
|
|
77
|
+
|
|
78
|
+
Upgrade at [vikasit.ai/dashboard](https://vikasit.ai/dashboard)
|
|
79
|
+
|
|
80
|
+
## Commands
|
|
81
|
+
|
|
82
|
+
| Command | Description |
|
|
83
|
+
|---------|-------------|
|
|
84
|
+
| `/login` | Sign in to Vikasit |
|
|
85
|
+
| `/logout` | Sign out |
|
|
86
|
+
| `/connect` | Add third-party providers (OpenAI, Anthropic, etc.) |
|
|
87
|
+
| `/models` | Switch between models |
|
|
88
|
+
| `/pass` | Send an invite to try Vikasit Code |
|
|
89
|
+
| `/help` | Show all commands |
|
|
90
|
+
|
|
91
|
+
## CLI Options
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
vikasit [options] [command]
|
|
95
|
+
|
|
96
|
+
Commands:
|
|
97
|
+
vikasit Launch interactive TUI
|
|
98
|
+
vikasit run [message] Run with a prompt (non-interactive)
|
|
99
|
+
vikasit providers login Manage AI provider credentials
|
|
100
|
+
vikasit models List available models
|
|
101
|
+
vikasit stats Show token usage statistics
|
|
102
|
+
vikasit upgrade Upgrade to latest version
|
|
103
|
+
|
|
104
|
+
Options:
|
|
105
|
+
-m, --model <provider/model> Model to use (e.g., vikasit-ai/vikasit-3-fast)
|
|
106
|
+
-p, --prompt <text> Run in non-interactive mode
|
|
107
|
+
-c, --continue Continue last session
|
|
108
|
+
-s, --session <id> Resume a specific session
|
|
109
|
+
-v, --version Show version
|
|
110
|
+
-h, --help Show help
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Configuration
|
|
114
|
+
|
|
115
|
+
Configuration file: `~/.config/vikasit/vikasit.json`
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"model": "vikasit-ai/vikasit-3-fast",
|
|
120
|
+
"theme": "vikasit",
|
|
121
|
+
"provider": {
|
|
122
|
+
"vikasit-ai": {
|
|
123
|
+
"npm": "@ai-sdk/openai-compatible",
|
|
124
|
+
"options": { "baseURL": "https://api.vikasit.ai/v1" },
|
|
125
|
+
"env": ["VIKASIT_API_KEY"]
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Environment Variables
|
|
132
|
+
|
|
133
|
+
| Variable | Description |
|
|
134
|
+
|----------|-------------|
|
|
135
|
+
| `VIKASIT_API_KEY` | Your Vikasit API key (skip `/login` flow) |
|
|
136
|
+
| `OPENAI_API_KEY` | Use OpenAI models directly |
|
|
137
|
+
| `ANTHROPIC_API_KEY` | Use Anthropic Claude models directly |
|
|
138
|
+
|
|
139
|
+
## API Access
|
|
140
|
+
|
|
141
|
+
Vikasit Code uses the OpenAI-compatible API at `api.vikasit.ai`:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
curl https://api.vikasit.ai/v1/chat/completions \
|
|
145
|
+
-H "Authorization: Bearer YOUR_API_KEY" \
|
|
146
|
+
-H "Content-Type: application/json" \
|
|
147
|
+
-d '{
|
|
148
|
+
"model": "vikasit-3-fast",
|
|
149
|
+
"messages": [{"role": "user", "content": "Hello!"}]
|
|
150
|
+
}'
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Rate Limits
|
|
154
|
+
|
|
155
|
+
| Plan | RPM | Daily Budget | Models |
|
|
156
|
+
|------|-----|-------------|--------|
|
|
157
|
+
| Free | 10 | Free models only | Preview models |
|
|
158
|
+
| Lite | 30 | $1/day | 2 models |
|
|
159
|
+
| Pro | 60 | $3/day | 6 models |
|
|
160
|
+
| Max | 120 | $10/day | All 9 models |
|
|
161
|
+
|
|
162
|
+
## Links
|
|
163
|
+
|
|
164
|
+
- **Website**: [vikasit.ai](https://vikasit.ai)
|
|
165
|
+
- **Dashboard**: [vikasit.ai/dashboard](https://vikasit.ai/dashboard)
|
|
166
|
+
- **Chat**: [chat.vikasit.ai](https://chat.vikasit.ai)
|
|
167
|
+
- **API Docs**: [vikasit.ai/api](https://vikasit.ai/api)
|
|
168
|
+
- **GitHub**: [github.com/Vikasit-AI/vikasit-code](https://github.com/Vikasit-AI/vikasit-code)
|
|
169
|
+
|
|
170
|
+
## License
|
|
171
|
+
|
|
172
|
+
MIT — [Vikasit AI](https://vikasit.ai) by Chandorkar Technologies, Pune, India
|
package/bin/vikasit
CHANGED
|
@@ -25,7 +25,6 @@ if (envPath) {
|
|
|
25
25
|
const scriptPath = fs.realpathSync(__filename)
|
|
26
26
|
const scriptDir = path.dirname(scriptPath)
|
|
27
27
|
|
|
28
|
-
//
|
|
29
28
|
const cached = path.join(scriptDir, ".vikasit")
|
|
30
29
|
if (fs.existsSync(cached)) {
|
|
31
30
|
run(cached)
|
|
@@ -42,64 +41,22 @@ const archMap = {
|
|
|
42
41
|
arm: "arm",
|
|
43
42
|
}
|
|
44
43
|
|
|
45
|
-
let platform = platformMap[os.platform()]
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
let arch = archMap[os.arch()]
|
|
50
|
-
if (!arch) {
|
|
51
|
-
arch = os.arch()
|
|
52
|
-
}
|
|
53
|
-
const base = "opencode-" + platform + "-" + arch
|
|
54
|
-
const binary = platform === "windows" ? "opencode.exe" : "vikasit"
|
|
44
|
+
let platform = platformMap[os.platform()] || os.platform()
|
|
45
|
+
let arch = archMap[os.arch()] || os.arch()
|
|
46
|
+
const base = "vikasit-code-" + platform + "-" + arch
|
|
47
|
+
const binary = platform === "windows" ? "vikasit.exe" : "vikasit"
|
|
55
48
|
|
|
56
49
|
function supportsAvx2() {
|
|
57
50
|
if (arch !== "x64") return false
|
|
58
|
-
|
|
59
|
-
if (platform === "linux") {
|
|
60
|
-
try {
|
|
61
|
-
return /(^|\s)avx2(\s|$)/i.test(fs.readFileSync("/proc/cpuinfo", "utf8"))
|
|
62
|
-
} catch {
|
|
63
|
-
return false
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
51
|
if (platform === "darwin") {
|
|
68
52
|
try {
|
|
69
|
-
const result = childProcess.spawnSync("sysctl", ["-n", "hw.optional.avx2_0"], {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
})
|
|
73
|
-
if (result.status !== 0) return false
|
|
74
|
-
return (result.stdout || "").trim() === "1"
|
|
75
|
-
} catch {
|
|
76
|
-
return false
|
|
77
|
-
}
|
|
53
|
+
const result = childProcess.spawnSync("sysctl", ["-n", "hw.optional.avx2_0"], { encoding: "utf8", timeout: 1500 })
|
|
54
|
+
return result.status === 0 && (result.stdout || "").trim() === "1"
|
|
55
|
+
} catch { return false }
|
|
78
56
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const cmd =
|
|
82
|
-
'(Add-Type -MemberDefinition "[DllImport(""kernel32.dll"")] public static extern bool IsProcessorFeaturePresent(int ProcessorFeature);" -Name Kernel32 -Namespace Win32 -PassThru)::IsProcessorFeaturePresent(40)'
|
|
83
|
-
|
|
84
|
-
for (const exe of ["powershell.exe", "pwsh.exe", "pwsh", "powershell"]) {
|
|
85
|
-
try {
|
|
86
|
-
const result = childProcess.spawnSync(exe, ["-NoProfile", "-NonInteractive", "-Command", cmd], {
|
|
87
|
-
encoding: "utf8",
|
|
88
|
-
timeout: 3000,
|
|
89
|
-
windowsHide: true,
|
|
90
|
-
})
|
|
91
|
-
if (result.status !== 0) continue
|
|
92
|
-
const out = (result.stdout || "").trim().toLowerCase()
|
|
93
|
-
if (out === "true" || out === "1") return true
|
|
94
|
-
if (out === "false" || out === "0") return false
|
|
95
|
-
} catch {
|
|
96
|
-
continue
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return false
|
|
57
|
+
if (platform === "linux") {
|
|
58
|
+
try { return /(^|\s)avx2(\s|$)/i.test(fs.readFileSync("/proc/cpuinfo", "utf8")) } catch { return false }
|
|
101
59
|
}
|
|
102
|
-
|
|
103
60
|
return false
|
|
104
61
|
}
|
|
105
62
|
|
|
@@ -109,59 +66,43 @@ const names = (() => {
|
|
|
109
66
|
|
|
110
67
|
if (platform === "linux") {
|
|
111
68
|
const musl = (() => {
|
|
112
|
-
try {
|
|
113
|
-
if (fs.existsSync("/etc/alpine-release")) return true
|
|
114
|
-
} catch {
|
|
115
|
-
// ignore
|
|
116
|
-
}
|
|
117
|
-
|
|
69
|
+
try { if (fs.existsSync("/etc/alpine-release")) return true } catch {}
|
|
118
70
|
try {
|
|
119
71
|
const result = childProcess.spawnSync("ldd", ["--version"], { encoding: "utf8" })
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
} catch {
|
|
123
|
-
// ignore
|
|
124
|
-
}
|
|
125
|
-
|
|
72
|
+
if (((result.stdout || "") + (result.stderr || "")).toLowerCase().includes("musl")) return true
|
|
73
|
+
} catch {}
|
|
126
74
|
return false
|
|
127
75
|
})()
|
|
128
76
|
|
|
129
77
|
if (musl) {
|
|
130
|
-
if (
|
|
131
|
-
|
|
132
|
-
return [`${base}-musl`, `${base}-baseline-musl`, base, `${base}-baseline`]
|
|
133
|
-
}
|
|
134
|
-
return [`${base}-musl`, base]
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (arch === "x64") {
|
|
138
|
-
if (baseline) return [`${base}-baseline`, base, `${base}-baseline-musl`, `${base}-musl`]
|
|
139
|
-
return [base, `${base}-baseline`, `${base}-musl`, `${base}-baseline-musl`]
|
|
78
|
+
if (baseline) return [`${base}-baseline-musl`, `${base}-musl`, `${base}-baseline`, base]
|
|
79
|
+
return [`${base}-musl`, `${base}-baseline-musl`, base, `${base}-baseline`]
|
|
140
80
|
}
|
|
141
|
-
return [base, `${base}-musl`]
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (arch === "x64") {
|
|
145
81
|
if (baseline) return [`${base}-baseline`, base]
|
|
146
82
|
return [base, `${base}-baseline`]
|
|
147
83
|
}
|
|
148
|
-
|
|
84
|
+
|
|
85
|
+
if (baseline) return [`${base}-baseline`, base]
|
|
86
|
+
return [base, `${base}-baseline`]
|
|
149
87
|
})()
|
|
150
88
|
|
|
89
|
+
// Look for the binary in node_modules with @vikasitai scope
|
|
151
90
|
function findBinary(startDir) {
|
|
152
91
|
let current = startDir
|
|
153
92
|
for (;;) {
|
|
154
93
|
const modules = path.join(current, "node_modules")
|
|
155
94
|
if (fs.existsSync(modules)) {
|
|
156
95
|
for (const name of names) {
|
|
157
|
-
|
|
158
|
-
|
|
96
|
+
// Check scoped package: @vikasitai/vikasit-code-darwin-arm64
|
|
97
|
+
const scoped = path.join(modules, "@vikasitai", name, "bin", binary)
|
|
98
|
+
if (fs.existsSync(scoped)) return scoped
|
|
99
|
+
// Check unscoped fallback
|
|
100
|
+
const unscoped = path.join(modules, name, "bin", binary)
|
|
101
|
+
if (fs.existsSync(unscoped)) return unscoped
|
|
159
102
|
}
|
|
160
103
|
}
|
|
161
104
|
const parent = path.dirname(current)
|
|
162
|
-
if (parent === current)
|
|
163
|
-
return
|
|
164
|
-
}
|
|
105
|
+
if (parent === current) return
|
|
165
106
|
current = parent
|
|
166
107
|
}
|
|
167
108
|
}
|
|
@@ -169,9 +110,9 @@ function findBinary(startDir) {
|
|
|
169
110
|
const resolved = findBinary(scriptDir)
|
|
170
111
|
if (!resolved) {
|
|
171
112
|
console.error(
|
|
172
|
-
"
|
|
173
|
-
|
|
174
|
-
|
|
113
|
+
"Could not find the Vikasit Code binary for your platform (" + platform + "/" + arch + ").\n" +
|
|
114
|
+
"Try: npm install -g @vikasitai/" + names[0] + "\n" +
|
|
115
|
+
"Or visit: https://vikasit.ai/code for other install methods."
|
|
175
116
|
)
|
|
176
117
|
process.exit(1)
|
|
177
118
|
}
|