@vikasitai/vikasit-code 1.0.0 → 1.0.2
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 +179 -0
- package/package.json +2 -2
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
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const childProcess = require("child_process")
|
|
4
|
+
const fs = require("fs")
|
|
5
|
+
const path = require("path")
|
|
6
|
+
const os = require("os")
|
|
7
|
+
|
|
8
|
+
function run(target) {
|
|
9
|
+
const result = childProcess.spawnSync(target, process.argv.slice(2), {
|
|
10
|
+
stdio: "inherit",
|
|
11
|
+
})
|
|
12
|
+
if (result.error) {
|
|
13
|
+
console.error(result.error.message)
|
|
14
|
+
process.exit(1)
|
|
15
|
+
}
|
|
16
|
+
const code = typeof result.status === "number" ? result.status : 0
|
|
17
|
+
process.exit(code)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const envPath = process.env.VIKASIT_BIN_PATH
|
|
21
|
+
if (envPath) {
|
|
22
|
+
run(envPath)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const scriptPath = fs.realpathSync(__filename)
|
|
26
|
+
const scriptDir = path.dirname(scriptPath)
|
|
27
|
+
|
|
28
|
+
//
|
|
29
|
+
const cached = path.join(scriptDir, ".vikasit")
|
|
30
|
+
if (fs.existsSync(cached)) {
|
|
31
|
+
run(cached)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const platformMap = {
|
|
35
|
+
darwin: "darwin",
|
|
36
|
+
linux: "linux",
|
|
37
|
+
win32: "windows",
|
|
38
|
+
}
|
|
39
|
+
const archMap = {
|
|
40
|
+
x64: "x64",
|
|
41
|
+
arm64: "arm64",
|
|
42
|
+
arm: "arm",
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
let platform = platformMap[os.platform()]
|
|
46
|
+
if (!platform) {
|
|
47
|
+
platform = os.platform()
|
|
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"
|
|
55
|
+
|
|
56
|
+
function supportsAvx2() {
|
|
57
|
+
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
|
+
if (platform === "darwin") {
|
|
68
|
+
try {
|
|
69
|
+
const result = childProcess.spawnSync("sysctl", ["-n", "hw.optional.avx2_0"], {
|
|
70
|
+
encoding: "utf8",
|
|
71
|
+
timeout: 1500,
|
|
72
|
+
})
|
|
73
|
+
if (result.status !== 0) return false
|
|
74
|
+
return (result.stdout || "").trim() === "1"
|
|
75
|
+
} catch {
|
|
76
|
+
return false
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (platform === "windows") {
|
|
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
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return false
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const names = (() => {
|
|
107
|
+
const avx2 = supportsAvx2()
|
|
108
|
+
const baseline = arch === "x64" && !avx2
|
|
109
|
+
|
|
110
|
+
if (platform === "linux") {
|
|
111
|
+
const musl = (() => {
|
|
112
|
+
try {
|
|
113
|
+
if (fs.existsSync("/etc/alpine-release")) return true
|
|
114
|
+
} catch {
|
|
115
|
+
// ignore
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
try {
|
|
119
|
+
const result = childProcess.spawnSync("ldd", ["--version"], { encoding: "utf8" })
|
|
120
|
+
const text = ((result.stdout || "") + (result.stderr || "")).toLowerCase()
|
|
121
|
+
if (text.includes("musl")) return true
|
|
122
|
+
} catch {
|
|
123
|
+
// ignore
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return false
|
|
127
|
+
})()
|
|
128
|
+
|
|
129
|
+
if (musl) {
|
|
130
|
+
if (arch === "x64") {
|
|
131
|
+
if (baseline) return [`${base}-baseline-musl`, `${base}-musl`, `${base}-baseline`, base]
|
|
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`]
|
|
140
|
+
}
|
|
141
|
+
return [base, `${base}-musl`]
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (arch === "x64") {
|
|
145
|
+
if (baseline) return [`${base}-baseline`, base]
|
|
146
|
+
return [base, `${base}-baseline`]
|
|
147
|
+
}
|
|
148
|
+
return [base]
|
|
149
|
+
})()
|
|
150
|
+
|
|
151
|
+
function findBinary(startDir) {
|
|
152
|
+
let current = startDir
|
|
153
|
+
for (;;) {
|
|
154
|
+
const modules = path.join(current, "node_modules")
|
|
155
|
+
if (fs.existsSync(modules)) {
|
|
156
|
+
for (const name of names) {
|
|
157
|
+
const candidate = path.join(modules, name, "bin", binary)
|
|
158
|
+
if (fs.existsSync(candidate)) return candidate
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const parent = path.dirname(current)
|
|
162
|
+
if (parent === current) {
|
|
163
|
+
return
|
|
164
|
+
}
|
|
165
|
+
current = parent
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const resolved = findBinary(scriptDir)
|
|
170
|
+
if (!resolved) {
|
|
171
|
+
console.error(
|
|
172
|
+
"It seems that your package manager failed to install the right version of the opencode CLI for your platform. You can try manually installing " +
|
|
173
|
+
names.map((n) => `\"${n}\"`).join(" or ") +
|
|
174
|
+
" package",
|
|
175
|
+
)
|
|
176
|
+
process.exit(1)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
run(resolved)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vikasitai/vikasit-code",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Your AI coding partner, right in the terminal",
|
|
5
5
|
"author": "Vikasit AI <info@vikasit.ai>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"code-assistant"
|
|
20
20
|
],
|
|
21
21
|
"bin": {
|
|
22
|
-
"vikasit": "
|
|
22
|
+
"vikasit": "bin/vikasit"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"postinstall": "node ./postinstall.mjs || true"
|