sona-code 0.1.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/README.md +119 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +2979 -0
- package/dist/cli.js.map +1 -0
- package/dist/compressor.d.ts +84 -0
- package/dist/compressor.d.ts.map +1 -0
- package/dist/compressor.js +237 -0
- package/dist/compressor.js.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +79 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware.d.ts +81 -0
- package/dist/middleware.d.ts.map +1 -0
- package/dist/middleware.js +165 -0
- package/dist/middleware.js.map +1 -0
- package/dist/proxy.d.ts +105 -0
- package/dist/proxy.d.ts.map +1 -0
- package/dist/proxy.js +548 -0
- package/dist/proxy.js.map +1 -0
- package/dist/rules.d.ts +30 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/rules.js +201 -0
- package/dist/rules.js.map +1 -0
- package/dist/session.d.ts +156 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +351 -0
- package/dist/session.js.map +1 -0
- package/package.json +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
```
|
|
2
|
+
███████╗ ██████╗ ███╗ ██╗ █████╗ ██████╗ ██████╗ ██████╗ ███████╗
|
|
3
|
+
██╔════╝██╔═══██╗████╗ ██║██╔══██╗ ██╔════╝██╔═══██╗██╔══██╗██╔════╝
|
|
4
|
+
███████╗██║ ██║██╔██╗ ██║███████║ ██║ ██║ ██║██║ ██║█████╗
|
|
5
|
+
╚════██║██║ ██║██║╚██╗██║██╔══██║ ██║ ██║ ██║██║ ██║██╔══╝
|
|
6
|
+
███████║╚██████╔╝██║ ╚████║██║ ██║ ╚██████╗╚██████╔╝██████╔╝███████╗
|
|
7
|
+
╚══════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
**AI coding agent for your terminal.** Fast. Capable. Cost-effective.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install -g sona-code
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
sona
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
On first run, you'll be prompted to enter your DeepSeek API key. Get one at [platform.deepseek.com](https://platform.deepseek.com).
|
|
27
|
+
|
|
28
|
+
## What It Does
|
|
29
|
+
|
|
30
|
+
SONA is a terminal-based AI coding assistant that can:
|
|
31
|
+
|
|
32
|
+
- **Read & write files** — Navigate your codebase, make edits, create new files
|
|
33
|
+
- **Run commands** — Execute shell commands, npm scripts, build tools
|
|
34
|
+
- **Search code** — Find files by pattern, search content with regex
|
|
35
|
+
- **Git operations** — Status, diff, commit, log
|
|
36
|
+
- **Remember context** — Persists workspace memory across sessions
|
|
37
|
+
|
|
38
|
+
## Commands
|
|
39
|
+
|
|
40
|
+
| Command | Description |
|
|
41
|
+
|---------|-------------|
|
|
42
|
+
| `/help` | Show available commands |
|
|
43
|
+
| `/api` | Configure API provider |
|
|
44
|
+
| `/model` | Switch model |
|
|
45
|
+
| `/clear` | Reset current session |
|
|
46
|
+
| `/forget` | Clear workspace memory |
|
|
47
|
+
| `/quit` | Exit |
|
|
48
|
+
|
|
49
|
+
## Why SONA?
|
|
50
|
+
|
|
51
|
+
**100x cheaper than alternatives.** Powered by DeepSeek, which delivers Claude-level quality at a fraction of the cost.
|
|
52
|
+
|
|
53
|
+
**Workspace memory.** SONA remembers what files you've touched, commands you've run, and tasks you've worked on — even after restart. Say "continue" and pick up where you left off.
|
|
54
|
+
|
|
55
|
+
**No setup friction.** One command to install, one command to start. API key prompt on first run.
|
|
56
|
+
|
|
57
|
+
## Example Session
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
$ sona
|
|
61
|
+
|
|
62
|
+
███████╗ ██████╗ ███╗ ██╗ █████╗
|
|
63
|
+
...
|
|
64
|
+
|
|
65
|
+
> read the auth module and explain how it works
|
|
66
|
+
|
|
67
|
+
· src/auth/index.ts 2.1KB
|
|
68
|
+
142 lines
|
|
69
|
+
|
|
70
|
+
The auth module uses JWT tokens with a 24h expiry...
|
|
71
|
+
|
|
72
|
+
> add rate limiting to the login endpoint
|
|
73
|
+
|
|
74
|
+
writing src/auth/index.ts
|
|
75
|
+
|
|
76
|
+
+ import rateLimit from 'express-rate-limit';
|
|
77
|
+
+
|
|
78
|
+
+ const loginLimiter = rateLimit({
|
|
79
|
+
+ windowMs: 15 * 60 * 1000,
|
|
80
|
+
+ max: 5
|
|
81
|
+
+ });
|
|
82
|
+
|
|
83
|
+
✓ +8 lines
|
|
84
|
+
|
|
85
|
+
> run the tests
|
|
86
|
+
|
|
87
|
+
Running: npm test
|
|
88
|
+
✓ 23 passed
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Configuration
|
|
92
|
+
|
|
93
|
+
Config is stored in `~/.sona/config.json`:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"provider": "deepseek",
|
|
98
|
+
"model": "deepseek-chat",
|
|
99
|
+
"apiKey": "sk-..."
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Workspace memory is stored in `.sona/memory.json` in each project directory.
|
|
104
|
+
|
|
105
|
+
## Requirements
|
|
106
|
+
|
|
107
|
+
- Node.js 18+
|
|
108
|
+
- DeepSeek API key (or OpenAI/Anthropic if preferred)
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
MIT
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
<p align="center">
|
|
117
|
+
<sub>Built for developers who value speed and simplicity.</sub>
|
|
118
|
+
<sub>Developed by Zeradam Fantaye, Building @ Shadow Labs</sub>
|
|
119
|
+
</p>
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;GAKG"}
|