usemint-cli 0.2.0-beta.1
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/LICENSE +21 -0
- package/README.md +115 -0
- package/dist/cli/index.js +13540 -0
- package/dist/cli/index.js.map +1 -0
- package/package.json +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Asaf Erdman
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
```
|
|
2
|
+
███╗ ███╗██╗███╗ ██╗████████╗ ██████╗██╗ ██╗
|
|
3
|
+
████╗ ████║██║████╗ ██║╚══██╔══╝ ██╔════╝██║ ██║
|
|
4
|
+
██╔████╔██║██║██╔██╗ ██║ ██║ ██║ ██║ ██║
|
|
5
|
+
██║╚██╔╝██║██║██║╚██╗██║ ██║ ██║ ██║ ██║
|
|
6
|
+
██║ ╚═╝ ██║██║██║ ╚████║ ██║ ╚██████╗███████╗██║
|
|
7
|
+
╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═════╝╚══════╝╚═╝
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
# Mint CLI
|
|
11
|
+
|
|
12
|
+
Zero-setup AI coding assistant in your terminal. Type `mint`, start coding.
|
|
13
|
+
|
|
14
|
+
No API keys. No accounts. No config files.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npx usemint-cli
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install -g usemint-cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or run directly without installing:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx usemint-cli
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
mint # open the interactive TUI
|
|
36
|
+
mint "fix the auth bug" # one-shot prompt — get an answer and exit
|
|
37
|
+
mint usage # show session stats and savings
|
|
38
|
+
mint models # list available models
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## How It Works
|
|
42
|
+
|
|
43
|
+
Every message routes through a smart gateway that picks the cheapest model capable of handling your task — automatically.
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
mint CLI → gateway → best model for the job
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**3-tier routing (automatic, invisible):**
|
|
50
|
+
|
|
51
|
+
| Complexity | Examples | Model | Cost per 1M tokens |
|
|
52
|
+
|------------|----------|-------|---------------------|
|
|
53
|
+
| Simple | explain, Q&A | Groq Llama 3.1 8B | $0.05 / $0.08 |
|
|
54
|
+
| Medium | write, fix, refactor | DeepSeek V3 | $0.27 / $1.10 |
|
|
55
|
+
| Complex | architect, multi-file | Grok 3 Mini | $0.60 / $4.00 |
|
|
56
|
+
|
|
57
|
+
Context over 20K tokens automatically bumps to the next tier. If a provider fails, it falls back to the next one.
|
|
58
|
+
|
|
59
|
+
## Supported Providers
|
|
60
|
+
|
|
61
|
+
Mint works out of the box via the gateway (no keys needed). You can also bring your own API keys:
|
|
62
|
+
|
|
63
|
+
| Provider | Models | Env Variable |
|
|
64
|
+
|----------|--------|-------------|
|
|
65
|
+
| Gateway (default) | Auto-routed | None required |
|
|
66
|
+
| Anthropic | Claude Sonnet, Haiku | `ANTHROPIC_API_KEY` |
|
|
67
|
+
| OpenAI | GPT-4o, GPT-4o-mini | `OPENAI_API_KEY` |
|
|
68
|
+
| Google | Gemini Pro, Flash | `GEMINI_API_KEY` |
|
|
69
|
+
| DeepSeek | DeepSeek V3, R1 | `DEEPSEEK_API_KEY` |
|
|
70
|
+
| Groq | Llama 3.x | `GROQ_API_KEY` |
|
|
71
|
+
| Grok (xAI) | Grok 3 | `GROK_API_KEY` |
|
|
72
|
+
| Mistral | Mistral Large, Small | `MISTRAL_API_KEY` |
|
|
73
|
+
|
|
74
|
+
## TUI Features
|
|
75
|
+
|
|
76
|
+
- **Vim keybindings** — `i` for INSERT, `Esc` for NORMAL, full motion support (`w`, `b`, `e`, `f`, `d`, `c`, `y`, `p`)
|
|
77
|
+
- **Status bar** — current model, token count, session cost
|
|
78
|
+
- **Slash commands** — `/help`, `/clear`, `/model`
|
|
79
|
+
- **Ctrl+C** — exit
|
|
80
|
+
|
|
81
|
+
## Security
|
|
82
|
+
|
|
83
|
+
- **No keys stored in code** — all credentials are read from environment variables or local config at runtime
|
|
84
|
+
- **Gateway mode** requires no API keys on your machine — keys live server-side
|
|
85
|
+
- **Local config** is stored in your OS config directory (via [conf](https://github.com/sindresorhus/conf)) and never committed to git
|
|
86
|
+
- `.env`, `.mint/`, and `.claude/` are gitignored by default
|
|
87
|
+
|
|
88
|
+
## Requirements
|
|
89
|
+
|
|
90
|
+
- Node.js 20+
|
|
91
|
+
- Internet connection
|
|
92
|
+
|
|
93
|
+
## Development
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
git clone https://github.com/asaferdman23/mint-cli
|
|
97
|
+
cd mint-cli
|
|
98
|
+
npm install
|
|
99
|
+
npm run build
|
|
100
|
+
node dist/cli/index.js
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Contributing
|
|
104
|
+
|
|
105
|
+
1. Fork the repo
|
|
106
|
+
2. Create your feature branch (`git checkout -b feat/my-feature`)
|
|
107
|
+
3. Commit your changes
|
|
108
|
+
4. Push to the branch (`git push origin feat/my-feature`)
|
|
109
|
+
5. Open a Pull Request
|
|
110
|
+
|
|
111
|
+
Please open an issue first for major changes so we can discuss the approach.
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
[MIT](LICENSE)
|