anveesa 0.6.0 → 0.7.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/Cargo.lock CHANGED
@@ -60,9 +60,10 @@ dependencies = [
60
60
 
61
61
  [[package]]
62
62
  name = "anveesa"
63
- version = "0.6.0"
63
+ version = "0.7.1"
64
64
  dependencies = [
65
65
  "anyhow",
66
+ "axum",
66
67
  "base64",
67
68
  "clap",
68
69
  "crossterm",
@@ -73,6 +74,7 @@ dependencies = [
73
74
  "serde",
74
75
  "serde_json",
75
76
  "tokio",
77
+ "tokio-stream",
76
78
  "toml",
77
79
  ]
78
80
 
@@ -82,12 +84,78 @@ version = "1.0.102"
82
84
  source = "registry+https://github.com/rust-lang/crates.io-index"
83
85
  checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
84
86
 
87
+ [[package]]
88
+ name = "async-trait"
89
+ version = "0.1.89"
90
+ source = "registry+https://github.com/rust-lang/crates.io-index"
91
+ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
92
+ dependencies = [
93
+ "proc-macro2",
94
+ "quote",
95
+ "syn",
96
+ ]
97
+
85
98
  [[package]]
86
99
  name = "atomic-waker"
87
100
  version = "1.1.2"
88
101
  source = "registry+https://github.com/rust-lang/crates.io-index"
89
102
  checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
90
103
 
104
+ [[package]]
105
+ name = "axum"
106
+ version = "0.7.9"
107
+ source = "registry+https://github.com/rust-lang/crates.io-index"
108
+ checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f"
109
+ dependencies = [
110
+ "async-trait",
111
+ "axum-core",
112
+ "bytes",
113
+ "futures-util",
114
+ "http",
115
+ "http-body",
116
+ "http-body-util",
117
+ "hyper",
118
+ "hyper-util",
119
+ "itoa",
120
+ "matchit",
121
+ "memchr",
122
+ "mime",
123
+ "percent-encoding",
124
+ "pin-project-lite",
125
+ "rustversion",
126
+ "serde",
127
+ "serde_json",
128
+ "serde_path_to_error",
129
+ "serde_urlencoded",
130
+ "sync_wrapper",
131
+ "tokio",
132
+ "tower",
133
+ "tower-layer",
134
+ "tower-service",
135
+ "tracing",
136
+ ]
137
+
138
+ [[package]]
139
+ name = "axum-core"
140
+ version = "0.4.5"
141
+ source = "registry+https://github.com/rust-lang/crates.io-index"
142
+ checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199"
143
+ dependencies = [
144
+ "async-trait",
145
+ "bytes",
146
+ "futures-util",
147
+ "http",
148
+ "http-body",
149
+ "http-body-util",
150
+ "mime",
151
+ "pin-project-lite",
152
+ "rustversion",
153
+ "sync_wrapper",
154
+ "tower-layer",
155
+ "tower-service",
156
+ "tracing",
157
+ ]
158
+
91
159
  [[package]]
92
160
  name = "base64"
93
161
  version = "0.22.1"
@@ -518,6 +586,12 @@ version = "1.10.1"
518
586
  source = "registry+https://github.com/rust-lang/crates.io-index"
519
587
  checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
520
588
 
589
+ [[package]]
590
+ name = "httpdate"
591
+ version = "1.0.3"
592
+ source = "registry+https://github.com/rust-lang/crates.io-index"
593
+ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
594
+
521
595
  [[package]]
522
596
  name = "hyper"
523
597
  version = "1.9.0"
@@ -531,6 +605,7 @@ dependencies = [
531
605
  "http",
532
606
  "http-body",
533
607
  "httparse",
608
+ "httpdate",
534
609
  "itoa",
535
610
  "pin-project-lite",
536
611
  "smallvec",
@@ -811,12 +886,24 @@ version = "0.1.2"
811
886
  source = "registry+https://github.com/rust-lang/crates.io-index"
812
887
  checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
813
888
 
889
+ [[package]]
890
+ name = "matchit"
891
+ version = "0.7.3"
892
+ source = "registry+https://github.com/rust-lang/crates.io-index"
893
+ checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
894
+
814
895
  [[package]]
815
896
  name = "memchr"
816
897
  version = "2.8.0"
817
898
  source = "registry+https://github.com/rust-lang/crates.io-index"
818
899
  checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
819
900
 
901
+ [[package]]
902
+ name = "mime"
903
+ version = "0.3.17"
904
+ source = "registry+https://github.com/rust-lang/crates.io-index"
905
+ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
906
+
820
907
  [[package]]
821
908
  name = "mio"
822
909
  version = "1.2.0"
@@ -1274,6 +1361,17 @@ dependencies = [
1274
1361
  "zmij",
1275
1362
  ]
1276
1363
 
1364
+ [[package]]
1365
+ name = "serde_path_to_error"
1366
+ version = "0.1.20"
1367
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1368
+ checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457"
1369
+ dependencies = [
1370
+ "itoa",
1371
+ "serde",
1372
+ "serde_core",
1373
+ ]
1374
+
1277
1375
  [[package]]
1278
1376
  name = "serde_spanned"
1279
1377
  version = "0.6.9"
@@ -1513,6 +1611,18 @@ dependencies = [
1513
1611
  "tokio",
1514
1612
  ]
1515
1613
 
1614
+ [[package]]
1615
+ name = "tokio-stream"
1616
+ version = "0.1.18"
1617
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1618
+ checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70"
1619
+ dependencies = [
1620
+ "futures-core",
1621
+ "pin-project-lite",
1622
+ "tokio",
1623
+ "tokio-util",
1624
+ ]
1625
+
1516
1626
  [[package]]
1517
1627
  name = "tokio-util"
1518
1628
  version = "0.7.18"
@@ -1580,6 +1690,7 @@ dependencies = [
1580
1690
  "tokio",
1581
1691
  "tower-layer",
1582
1692
  "tower-service",
1693
+ "tracing",
1583
1694
  ]
1584
1695
 
1585
1696
  [[package]]
@@ -1618,6 +1729,7 @@ version = "0.1.44"
1618
1729
  source = "registry+https://github.com/rust-lang/crates.io-index"
1619
1730
  checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
1620
1731
  dependencies = [
1732
+ "log",
1621
1733
  "pin-project-lite",
1622
1734
  "tracing-core",
1623
1735
  ]
package/Cargo.toml CHANGED
@@ -1,8 +1,17 @@
1
1
  [package]
2
2
  name = "anveesa"
3
- version = "0.6.0"
3
+ version = "0.7.1"
4
4
  edition = "2024"
5
5
  default-run = "anveesa"
6
+ description = "Multi-provider terminal AI assistant — TUI, web UI, and one-shot mode backed by any OpenAI-compatible API"
7
+ license = "MIT"
8
+ repository = "https://github.com/PandhuWibowo/anveesa-cli"
9
+ homepage = "https://github.com/PandhuWibowo/anveesa-cli"
10
+ documentation = "https://github.com/PandhuWibowo/anveesa-cli#readme"
11
+ keywords = ["ai", "cli", "llm", "assistant", "tui"]
12
+ categories = ["command-line-utilities", "development-tools"]
13
+ readme = "README.md"
14
+ exclude = ["npm/", ".github/", "src/web_ui.html"]
6
15
 
7
16
  [dependencies]
8
17
  base64 = "0.22"
@@ -15,5 +24,7 @@ reqwest = { version = "0.12", default-features = false, features = ["json", "rus
15
24
  rustyline = "14"
16
25
  serde = { version = "1.0", features = ["derive"] }
17
26
  serde_json = "1.0"
18
- tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "process", "time", "sync", "io-util", "signal"] }
27
+ tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "process", "time", "sync", "io-util", "signal", "net"] }
28
+ tokio-stream = { version = "0.1", features = ["sync"] }
19
29
  toml = "0.8"
30
+ axum = { version = "0.7", features = ["json"] }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pandhu Wibowo
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 CHANGED
@@ -1,207 +1,232 @@
1
1
  # anveesa
2
2
 
3
- A fast, terminal-native AI coding assistant. One command — interactive TUI or one-shot prompts — backed by any OpenAI-compatible provider.
3
+ A fast, multi-provider terminal AI coding assistant — interactive TUI, one-shot prompts, or web UI — backed by any OpenAI-compatible API.
4
4
 
5
- ```
6
- npm install -g anveesa
7
- anveesa
8
- ```
5
+ [![CI](https://github.com/PandhuWibowo/anveesa-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/PandhuWibowo/anveesa-cli/actions/workflows/ci.yml)
6
+ [![Crates.io](https://img.shields.io/crates/v/anveesa.svg)](https://crates.io/crates/anveesa)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
9
8
 
10
9
  ---
11
10
 
12
- ## Features
11
+ ## What it is
13
12
 
14
- - **Full TUI** — streaming output, diff previews on file edits, cost tracking, plan display
15
- - **28 built-in tools** — file ops, git, web search, deep-fetch, screenshot, notes, run commands
16
- - **Multi-provider** — Claude, GPT-4o, Gemini, DeepSeek, local Ollama, any OpenAI-compatible API
17
- - **Model routing** — `fast_model` for read-only tool rounds, main model for synthesis
18
- - **Parallel tools** — read-only tool calls run concurrently; write tools stay sequential for approval
19
- - **Approval flow** — every write/run tool shows a full diff preview; approve once, for the turn, or deny
20
- - **Multi-image paste** — ⌘V (macOS) / Ctrl+V to queue multiple clipboard images per turn
21
- - **Project memory** — `.anveesa.md` in your repo root is auto-injected into every session
22
- - **Path sandboxing** — write tools blocked outside the git root by default
23
- - **Conversation search** — Ctrl+R to search through all messages
13
+ Anveesa is a multi-provider terminal AI assistant that works with any OpenAI-compatible API including OpenAI, Anthropic (via proxy), DeepSeek, Groq, Gemini, OpenRouter, local Ollama, and more. It ships a full TUI with streaming output, diff previews, cost tracking, and plan display, plus a lightweight web UI for browser-based access. You get 28 built-in tools covering file ops, git, web search, screenshot capture, and command execution — all with an approval flow that shows a full diff before any write.
24
14
 
25
15
  ---
26
16
 
27
17
  ## Install
28
18
 
19
+ **Cargo (recommended):**
20
+
21
+ ```bash
22
+ cargo install anveesa
23
+ ```
24
+
25
+ **Pre-built binaries:**
26
+
27
+ Download from [GitHub Releases](https://github.com/PandhuWibowo/anveesa-cli/releases) for your platform (macOS, Linux x86_64/arm64).
28
+
29
+ **npm wrapper:**
30
+
29
31
  ```bash
30
- # npm (recommended — downloads prebuilt binary)
31
32
  npm install -g anveesa
33
+ ```
34
+
35
+ **Build from source:**
32
36
 
33
- # Cargo (builds from source)
34
- cargo install --path .
37
+ ```bash
38
+ git clone https://github.com/PandhuWibowo/anveesa-cli
39
+ cd anveesa-cli
40
+ cargo build --release
41
+ ./target/release/anveesa
35
42
  ```
36
43
 
44
+ Requires Rust 1.85+ (2024 edition).
45
+
37
46
  ---
38
47
 
39
48
  ## Quick start
40
49
 
41
50
  ```bash
42
- # 1. Initialize config
51
+ # 1. Initialize config at ~/.config/anveesa/config.toml
43
52
  anveesa config init
44
53
 
45
- # 2. Set your API key
46
- export ANTHROPIC_API_KEY="sk-ant-..."
54
+ # 2. Edit config to set your provider and API key
55
+ # (see sample below)
56
+
57
+ # 3. Set your API key in the environment
47
58
  export OPENAI_API_KEY="sk-..."
48
59
 
49
- # 3. Launch the TUI
60
+ # 4. Launch the TUI
50
61
  anveesa
51
62
 
52
- # 4. One-shot prompt
63
+ # 5. One-shot prompt
53
64
  anveesa "explain the auth middleware in this repo"
54
65
 
55
- # 5. Specific provider/model
56
- anveesa --provider anthropic --model claude-sonnet-4-6 "refactor src/auth.ts"
66
+ # 6. Specific provider/model
67
+ anveesa --provider deepseek --model deepseek-chat "refactor src/auth.rs"
57
68
  ```
58
69
 
59
- ---
60
-
61
- ## Configuration
62
-
63
- Config lives at `~/.config/anveesa/config.toml`.
70
+ **Sample config snippet** (`~/.config/anveesa/config.toml`):
64
71
 
65
72
  ```toml
66
- default_provider = "anthropic"
67
-
68
- [providers.anthropic]
69
- api_base = "https://api.anthropic.com/v1"
70
- api_key_env = "ANTHROPIC_API_KEY"
71
- default_model = "claude-sonnet-4-6"
72
- fast_model = "claude-haiku-4-5-20251001" # cheap model for read-only tool rounds
73
- prompt_cache = true
73
+ default_provider = "openai"
74
74
 
75
75
  [providers.openai]
76
- api_base = "https://api.openai.com/v1"
77
- api_key_env = "OPENAI_API_KEY"
76
+ kind = "openai-compatible"
77
+ base_url = "https://api.openai.com/v1"
78
+ api_key_env = "OPENAI_API_KEY"
78
79
  default_model = "gpt-4o"
79
- fast_model = "gpt-4o-mini"
80
+ fast_model = "gpt-4o-mini"
81
+
82
+ [providers.deepseek]
83
+ kind = "openai-compatible"
84
+ base_url = "https://api.deepseek.com"
85
+ api_key_env = "DEEPSEEK_API_KEY"
86
+ default_model = "deepseek-chat"
80
87
 
81
- [providers.local]
82
- api_base = "http://localhost:11434/v1"
88
+ [providers.ollama]
89
+ kind = "openai-compatible"
90
+ base_url = "http://localhost:11434/v1"
83
91
  default_model = "qwen2.5-coder:7b"
84
92
  ```
85
93
 
86
- ### Project instructions
94
+ ---
87
95
 
88
- Drop `.anveesa.md` in your repo root — auto-injected every session:
96
+ ## Providers
97
+
98
+ | Provider | kind | Notes |
99
+ |---|---|---|
100
+ | OpenAI | `openai-compatible` | GPT-4o, o1, o3 |
101
+ | Anthropic (via proxy) | `openai-compatible` | Claude 3.5/3.7 via OpenRouter or direct |
102
+ | DeepSeek | `openai-compatible` | deepseek-chat, deepseek-reasoner |
103
+ | Groq | `openai-compatible` | Ultra-fast inference |
104
+ | Google Gemini | `openai-compatible` | gemini-1.5-pro/flash |
105
+ | OpenRouter | `openai-compatible` | 200+ models via one API |
106
+ | Mistral | `openai-compatible` | mistral-large, codestral |
107
+ | xAI (Grok) | `openai-compatible` | grok-2 |
108
+ | Together AI | `openai-compatible` | Open-source models |
109
+ | Fireworks AI | `openai-compatible` | Fast open-source |
110
+ | Cerebras | `openai-compatible` | High-throughput |
111
+ | SambaNova | `openai-compatible` | Enterprise inference |
112
+ | NVIDIA NIM | `openai-compatible` | GPU-backed cloud |
113
+ | GitHub Models | `openai-compatible` | Free tier models |
114
+ | Perplexity | `openai-compatible` | Web-grounded answers |
115
+ | Ollama | `openai-compatible` | Local models |
116
+ | LM Studio | `openai-compatible` | Local GUI + API |
117
+ | vLLM | `openai-compatible` | Self-hosted inference |
118
+ | LiteLLM | `openai-compatible` | Universal proxy |
119
+ | LocalAI | `openai-compatible` | Self-hosted |
120
+ | Claude Code | `command` | Runs `claude` CLI |
121
+ | Codex CLI | `command` | Runs `codex` CLI |
122
+ | GitHub Copilot | `command` | Runs `copilot` CLI |
89
123
 
90
- ```markdown
91
- # My Project
124
+ ---
92
125
 
93
- Stack: React 18, TypeScript, Tailwind, Prisma, PostgreSQL
126
+ ## TUI commands
94
127
 
95
- Rules:
96
- - Use named exports only
97
- - Tests go in __tests__/ next to the source file
98
- - Run `pnpm test` before committing
99
- - DB migrations live in db/migrations/
100
- ```
101
-
102
- ---
128
+ | Command | Description |
129
+ |---|---|
130
+ | `/add <file>` | Inject a file into context (Aider-style) |
131
+ | `/diff` | Show `git diff HEAD` |
132
+ | `/commit [msg]` | Stage all + commit; omit msg to have AI generate one |
133
+ | `/memory <note>` | Append a note to `.anveesa.md` |
134
+ | `/clear` | Reset conversation and session |
135
+ | `/undo` | Restore last file changed by AI |
136
+ | `/compact` | Drop old turns to free context window |
137
+ | `/copy` | Copy last response to clipboard |
138
+ | `/export [path]` | Save conversation as Markdown |
139
+ | `/model [name]` | Show or switch model |
140
+ | `/provider [name]` | Show or switch provider |
141
+ | `/status` | Token usage and cost summary |
142
+ | `/search` | Search conversation (or Ctrl+R) |
143
+ | `/help` | Show all shortcuts |
144
+ | `/exit` | Quit |
103
145
 
104
- ## TUI shortcuts
146
+ **TUI keyboard shortcuts:**
105
147
 
106
148
  | Key | Action |
107
149
  |---|---|
108
150
  | Enter | Submit prompt |
109
151
  | Shift+Enter | Newline in input |
110
- | / | Navigate input history |
111
- | Tab | Complete `/command` or file path |
152
+ | Tab | Complete `/command`, provider name, or file path |
112
153
  | Ctrl+R | Search conversation |
113
- | `[` / `]` | Navigate file diffs |
114
- | Enter (on diff) | Expand / collapse diff |
115
- | V / Ctrl+V | Paste image or text (repeat to queue multiple) |
116
- | j / k | Scroll (empty input) |
154
+ | `[` / `]` | Navigate between file diffs and thinking blocks |
155
+ | Enter (on diff) | Expand / collapse |
156
+ | Ctrl+V / Cmd+V | Paste image or text |
157
+ | j / k | Scroll (when input is empty) |
117
158
  | PageUp / PageDn | Scroll |
118
159
  | Ctrl+W | Delete word |
119
160
  | Ctrl+U | Clear line |
161
+ | Ctrl+M | Toggle mouse capture (scroll vs. select mode) |
120
162
  | Ctrl+C | Cancel / quit |
121
163
 
122
164
  ---
123
165
 
124
- ## Slash commands
125
-
126
- | Command | Description |
127
- |---|---|
128
- | `/help` | Show all shortcuts |
129
- | `/clear` | Reset conversation |
130
- | `/compact` | Drop old turns to free context |
131
- | `/search` | Search conversation (or Ctrl+R) |
132
- | `/undo` | Restore last AI-modified file |
133
- | `/copy` | Copy last response to clipboard |
134
- | `/export [path]` | Save as Markdown |
135
- | `/model [name]` | Switch model |
136
- | `/provider [name]` | Switch provider |
137
- | `/status` | Token and cost info |
138
- | `/exit` | Quit |
139
-
140
- ---
141
-
142
- ## Tools
143
-
144
- **File ops:** `read_file` `write_file` `edit_file` `patch_file` `delete_file` `move_file` `copy_file` `create_dir` `list_dir` `find_files` `search_text`
145
-
146
- **Git:** `git_status` `git_diff` `git_log` `git_blame` `git_show` `git_commit` `git_stash` `git_branch`
147
-
148
- **Web:** `web_search` `fetch_url` `screenshot_url`
149
-
150
- **Notes:** `save_note` `read_notes` `search_notes` `delete_note`
151
-
152
- **Execution:** `run_command`
153
-
154
- ### fetch_url modes
166
+ ## Web UI
155
167
 
168
+ ```bash
169
+ anveesa web # starts on http://localhost:8374
170
+ anveesa web --port 8080
156
171
  ```
157
- fetch_url(url="...", mode="text") # default — plain text, HTML stripped
158
- fetch_url(url="...", mode="raw") # full HTML source
159
- fetch_url(url="...", mode="deep") # HTML + all linked CSS (+ JS if include_js=true)
160
- ```
161
-
162
- ### screenshot_url
163
172
 
164
- ```
165
- screenshot_url(url="https://localhost:3000", full_page=true)
166
- ```
173
+ The web UI provides a browser-based chat interface with the same provider/model selection as the TUI. Features:
167
174
 
168
- Requires Playwright: `npm install -g playwright && npx playwright install chromium`
175
+ - Streaming responses with Markdown rendering
176
+ - Multi-provider switching
177
+ - Session history
178
+ - Cost and token tracking
179
+ - Mobile-friendly layout
169
180
 
170
181
  ---
171
182
 
172
- ## Security
173
-
174
- - **Approval flow** — file writes and commands show a diff preview before running; `--yes` to auto-approve
175
- - **Path sandboxing** — writes outside the git root are refused
176
- - **Dangerous commands** — `rm -rf /`, pipe-to-shell, and similar patterns are hard-blocked
177
- - **Secret guard** — model is instructed never to expose API keys, `.env` files, or SSH keys
183
+ ## Key features
184
+
185
+ - **Multi-provider** — 28 built-in providers; add any OpenAI-compatible endpoint in one config line
186
+ - **Cost tracking** — per-turn and session cost displayed in the header; custom `pricing` override per provider
187
+ - **Session persistence** — conversations auto-saved per working directory; resume where you left off
188
+ - **Extended thinking** — enable Anthropic extended thinking with `extended_thinking = 10000` budget tokens
189
+ - **Image attachments** — paste screenshots with Cmd+V / Ctrl+V; queue multiple images per turn
190
+ - **MCP support** — connect Model Context Protocol servers for additional tools
191
+ - **Aider-style /add** — inject files into context without leaving the TUI
192
+ - **Auto-compact** — smart context compaction kicks in when the window fills up; AI summarises dropped turns
193
+ - **Auto-commit helper** — `/commit` stages all changes and pre-fills the input with an AI-generated commit message
194
+ - **Model routing** — `fast_model` for cheap read-only tool rounds; main model for final synthesis
195
+ - **28 built-in tools** — file ops, git, web search, deep-fetch, screenshot, notes, run commands
196
+ - **Approval flow** — every write/run tool shows a diff preview before executing
178
197
 
179
198
  ---
180
199
 
181
- ## Environment variables
200
+ ## Config reference
182
201
 
183
- | Variable | Purpose |
184
- |---|---|
185
- | `ANTHROPIC_API_KEY` | Anthropic |
186
- | `OPENAI_API_KEY` | OpenAI |
187
- | `GEMINI_API_KEY` | Google Gemini |
188
- | `BRAVE_SEARCH_API_KEY` | Better web search |
189
- | `SERPER_API_KEY` | Alternative web search |
190
- | `ANVEESA_MAX_TOOL_ROUNDS` | Override tool round limit (default 32) |
202
+ All fields of `OpenAiCompatibleProviderConfig`:
191
203
 
192
- ---
204
+ | Field | Type | Default | Description |
205
+ |---|---|---|---|
206
+ | `base_url` | string | required | API base URL (e.g. `https://api.openai.com/v1`) |
207
+ | `api_key` | string | — | Inline API key (prefer `api_key_env`) |
208
+ | `api_key_env` | string | — | Environment variable holding the API key |
209
+ | `default_model` | string | — | Model to use when none is specified |
210
+ | `fast_model` | string | — | Lightweight model for read-only tool rounds |
211
+ | `headers` | table | `{}` | Extra HTTP headers (e.g. for GitHub Models) |
212
+ | `prompt_cache` | bool | — | Enable prompt caching (Anthropic cache_control markers) |
213
+ | `max_tokens` | int | — | Upper bound on tokens generated per response |
214
+ | `extended_thinking` | int | — | Enable Anthropic extended thinking; value = budget_tokens |
215
+ | `pricing` | [f64; 4] | — | Custom pricing `[input, output, cache_read, cache_write]` per million tokens |
193
216
 
194
- ## Build from source
217
+ **Example with custom pricing:**
195
218
 
196
- ```bash
197
- git clone https://github.com/PandhuWibowo/anveesa-cli
198
- cd anveesa-cli
199
- cargo build --release
200
- ./target/release/anveesa
219
+ ```toml
220
+ [providers.my-provider]
221
+ kind = "openai-compatible"
222
+ base_url = "https://my-llm-api.com/v1"
223
+ api_key_env = "MY_API_KEY"
224
+ default_model = "my-model-v1"
225
+ pricing = [3.0, 15.0, 0.3, 3.75]
201
226
  ```
202
227
 
203
- Requires Rust 1.85+ (2024 edition).
204
-
205
228
  ---
206
229
 
207
- MIT License
230
+ ## License
231
+
232
+ MIT — see [LICENSE](LICENSE).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "anveesa",
3
- "version": "0.6.0",
4
- "description": "A terminal CLI that wraps AI providers (OpenAI-compatible APIs and local CLIs) into a single unified command",
3
+ "version": "0.7.1",
4
+ "description": "Multi-provider terminal AI assistant TUI, web UI, and one-shot mode backed by any OpenAI-compatible API",
5
5
  "main": "bin/anveesa.js",
6
6
  "bin": {
7
7
  "anveesa": "bin/anveesa.js"
@@ -26,7 +26,12 @@
26
26
  "rust",
27
27
  "openai",
28
28
  "agent",
29
- "copilot"
29
+ "copilot",
30
+ "tui",
31
+ "llm",
32
+ "deepseek",
33
+ "groq",
34
+ "anthropic"
30
35
  ],
31
36
  "license": "MIT",
32
37
  "engines": {
package/src/cli.rs CHANGED
@@ -27,6 +27,18 @@ pub enum Command {
27
27
  Config(ConfigArgs),
28
28
  /// Manage saved interactive sessions.
29
29
  Sessions(SessionsArgs),
30
+ /// Launch a browser-based chat UI on localhost.
31
+ Web(WebArgs),
32
+ }
33
+
34
+ #[derive(Debug, Args)]
35
+ pub struct WebArgs {
36
+ #[command(flatten)]
37
+ pub options: AskOptions,
38
+
39
+ /// Port to listen on (default 8374).
40
+ #[arg(long, default_value = "8374")]
41
+ pub port: u16,
30
42
  }
31
43
 
32
44
  #[derive(Debug, Args)]
package/src/config.rs CHANGED
@@ -473,6 +473,16 @@ pub struct OpenAiCompatibleProviderConfig {
473
473
  /// truncated by the output limit (Anveesa continues truncated answers either way).
474
474
  #[serde(default, skip_serializing_if = "Option::is_none")]
475
475
  pub max_tokens: Option<u32>,
476
+
477
+ /// Enable Anthropic extended thinking. Value = budget_tokens (e.g. 10000).
478
+ /// Requires a Claude 3.7+ model and the anthropic-beta header.
479
+ #[serde(default, skip_serializing_if = "Option::is_none")]
480
+ pub extended_thinking: Option<u32>,
481
+
482
+ /// Custom per-million-token pricing: [input, output, cache_read, cache_write].
483
+ /// Overrides the built-in model price table. Example: [3.0, 15.0, 0.3, 3.75]
484
+ #[serde(default, skip_serializing_if = "Option::is_none")]
485
+ pub pricing: Option<[f64; 4]>,
476
486
  }
477
487
 
478
488
  #[derive(Debug, Clone, Serialize, Deserialize)]
@@ -512,6 +522,8 @@ fn insert_openai_provider(
512
522
  headers: BTreeMap::new(),
513
523
  prompt_cache: None,
514
524
  max_tokens: None,
525
+ extended_thinking: None,
526
+ pricing: None,
515
527
  }),
516
528
  );
517
529
  }