@matheuskrumenauer/tanya 0.2.0-beta.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/LICENSE +21 -0
- package/README.md +235 -0
- package/dist/cli.js +12088 -0
- package/dist/cli.js.map +1 -0
- package/package.json +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Matheus Weber
|
|
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,235 @@
|
|
|
1
|
+
# Tanya
|
|
2
|
+
|
|
3
|
+
[](https://github.com/matheusjkweber/tanya/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@matheuskrumenauer/tanya)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
[](./package.json)
|
|
7
|
+
[](https://github.com/matheusjkweber/tanya/graphs/contributors)
|
|
8
|
+
|
|
9
|
+
Tanya is a live, tool-using AI CLI. It starts like Claude Code:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
tanya
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The first provider is DeepSeek. The provider layer is OpenAI-compatible, so future providers can be added with an API key, base URL, and model name.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
Local development:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install
|
|
23
|
+
npm run link:local
|
|
24
|
+
tanya
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
From GitHub, once published:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install -g github:matheusjkweber/tanya
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
From npm, once published:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install -g @matheuskrumenauer/tanya
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The unscoped `tanya` name is taken on npm, so the package publishes under the `@matheuskrumenauer` scope.
|
|
40
|
+
|
|
41
|
+
## Contributing
|
|
42
|
+
|
|
43
|
+
Start with [CONTRIBUTING.md](./CONTRIBUTING.md) for local setup, tool and
|
|
44
|
+
skill-pack conventions, tests, and PR expectations.
|
|
45
|
+
|
|
46
|
+
Beginner-friendly tasks are tagged
|
|
47
|
+
[`good first issue`](https://github.com/matheusjkweber/tanya/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
|
|
48
|
+
For roadmap context, read [docs/claude-code-gap-analysis.md](./docs/claude-code-gap-analysis.md).
|
|
49
|
+
|
|
50
|
+
## Configuration
|
|
51
|
+
|
|
52
|
+
Create `.env` from `.env.example`:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
DEEPSEEK_API_KEY=...
|
|
56
|
+
DEEPSEEK_BASE_URL=https://api.deepseek.com
|
|
57
|
+
TANYA_MODEL=deepseek-chat
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Use the reasoner profile for harder coding/planning tasks:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
TANYA_PROFILE=reasoner
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Or pass it per command:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
tanya run --profile reasoner "Plan this refactor"
|
|
70
|
+
tanya chat --profile reasoner
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Custom OpenAI-compatible provider:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
TANYA_PROVIDER=custom
|
|
77
|
+
TANYA_API_KEY=...
|
|
78
|
+
TANYA_BASE_URL=https://provider.example.com
|
|
79
|
+
TANYA_MODEL=provider-model-name
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Optional Obsidian logging:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
TANYA_OBSIDIAN_VAULT=/path/to/Obsidian/Vault
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
When set, Tanya appends a summary of completed tasks to the vault daily note. `tanya run` also searches the vault for task-relevant notes and materializes safe excerpts into `.tania/context/obsidian` so they can be read as normal workspace context.
|
|
89
|
+
|
|
90
|
+
DeepSeek documents its API as OpenAI-compatible for chat completions:
|
|
91
|
+
https://api-docs.deepseek.com/
|
|
92
|
+
|
|
93
|
+
## Backward compatibility
|
|
94
|
+
|
|
95
|
+
The old `tania` command remains as a binary alias for `tanya`, so existing
|
|
96
|
+
automation that runs `tania run --json` keeps working.
|
|
97
|
+
|
|
98
|
+
Configuration reads `TANYA_*` variables first and falls back to legacy
|
|
99
|
+
`TANIA_*` names when the new variable is absent. When only a legacy variable is
|
|
100
|
+
used, Tanya prints a one-line deprecation warning. If both names are set,
|
|
101
|
+
`TANYA_*` wins.
|
|
102
|
+
|
|
103
|
+
The workspace state directory remains `.tania/` for historical compatibility.
|
|
104
|
+
Existing run logs, context files, artifact materialization, and memory files are
|
|
105
|
+
not moved or renamed.
|
|
106
|
+
|
|
107
|
+
## Commands
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
tanya # live chat
|
|
111
|
+
tanya chat --profile reasoner # live chat with the reasoner profile
|
|
112
|
+
tanya ask "Explain this" # one-shot answer
|
|
113
|
+
tanya run "Fix the test" # agent task with tools
|
|
114
|
+
tanya run --profile reasoner "Fix this bug" # run with TANYA_PROFILE=reasoner
|
|
115
|
+
tanya run --verify "npm run typecheck" --verify "npm run build" "Fix the test"
|
|
116
|
+
tanya run --no-auto-brief "Fix the test" # skip deterministic project/artifact brief
|
|
117
|
+
tanya run --no-obsidian-context "Fix the test" # skip Obsidian context retrieval
|
|
118
|
+
tanya run --retries 2 "Fix this task" # retry blocked runs with context carry-forward
|
|
119
|
+
tanya run --plan --retries 2 "Implement the feature" # reasoner plan plus retries
|
|
120
|
+
tanya run --no-post-check "Long native build task" # skip independent typecheck/test re-checks
|
|
121
|
+
tanya run --json "Fix lint" # JSONL events for machine consumers
|
|
122
|
+
tanya run --context-file ./context.json --prompt-file ./prompt.md
|
|
123
|
+
tanya benchmark profiles # list runnable regression benchmark profiles
|
|
124
|
+
tanya benchmark run --all # execute the benchmark suite locally
|
|
125
|
+
tanya benchmark validate # validate recent benchmark signatures
|
|
126
|
+
tanya runs # show recent run logs with cost/status
|
|
127
|
+
tanya video presets # list available video presets
|
|
128
|
+
tanya video one-terminal-simctl # generate the exact transparent terminal asset
|
|
129
|
+
tanya providers test # provider smoke test
|
|
130
|
+
tanya doctor # local environment check
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
`--verify` adds required verification commands to the run context. Tanya must run and report each exact command before finishing the coding task.
|
|
134
|
+
|
|
135
|
+
`tanya benchmark run --all` currently exercises 26 executable low-to-medium regression fixtures: targeted edits, new files, dependency/lockfile updates, framework-style migrations, failing-test repair, frontend smoke checks, artifact/context reuse, streaming long-tool execution, run-history logging, dirty worktrees, report repair, and the CosmoHQ mobile/backend smoke profiles.
|
|
136
|
+
|
|
137
|
+
By default, `tanya run` also performs an independent post-check after the agent finishes. If the workspace has a `typecheck` script, Tanya reruns that exact script with the local package manager (`npm`, `pnpm`, `yarn`, or `bun`). If not, it falls back to `npx tsc --noEmit --pretty false` when a `tsconfig` is present. If the workspace has a `test` script, Tanya reruns that as well unless the run already reported a passing test verification.
|
|
138
|
+
|
|
139
|
+
By default, `tanya run` builds a generic task brief from local instructions, contracts, artifact indexes, project shape, and package scripts. Coding-shaped tasks get verification/report expectations automatically. If reusable artifact candidates are found, Tanya must read a relevant artifact or create a reusable one before changing code.
|
|
140
|
+
|
|
141
|
+
Per-project persistent instructions can be stored in `.tania/INSTRUCTIONS.md`. Tanya injects this file into the system prompt for runs started inside that workspace. Create a starter file with:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
tanya init
|
|
145
|
+
tanya init --cwd /path/to/project
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Tool Visibility
|
|
149
|
+
|
|
150
|
+
Human mode shows tools as they run:
|
|
151
|
+
|
|
152
|
+
```text
|
|
153
|
+
> search
|
|
154
|
+
input: {"query":"describe("}
|
|
155
|
+
ok: Found 3 match lines.
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
JSON mode emits machine-readable events:
|
|
159
|
+
|
|
160
|
+
```json
|
|
161
|
+
{"type":"tool_call","id":"call_1","tool":"search","input":{"query":"describe("}}
|
|
162
|
+
{"type":"tool_result","id":"call_1","tool":"search","ok":true,"summary":"Found 3 match lines."}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Streaming tool execution
|
|
166
|
+
|
|
167
|
+
Long-running `run_shell` calls stream throttled stdout/stderr chunks to the active event sink while the model only receives the final `tool_result`.
|
|
168
|
+
|
|
169
|
+
```text
|
|
170
|
+
tanya run "Run npm test" # emits tool_progress while the command runs; Ctrl-C cancels the active shell and returns partial_output
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Context files are generic JSON envelopes for caller-supplied task metadata, artifacts, instructions, and verification commands.
|
|
174
|
+
|
|
175
|
+
## Current Tools
|
|
176
|
+
|
|
177
|
+
- `list_files`
|
|
178
|
+
- `read_file`
|
|
179
|
+
- `search`
|
|
180
|
+
- `inspect_project_context`
|
|
181
|
+
- `find_reusable_artifacts`
|
|
182
|
+
- `build_task_brief`
|
|
183
|
+
- `search_obsidian_notes`
|
|
184
|
+
- `write_file`
|
|
185
|
+
- `apply_patch`
|
|
186
|
+
- `search_replace`
|
|
187
|
+
- `copy_file`
|
|
188
|
+
- `copy_dir`
|
|
189
|
+
- `apply_artifact`
|
|
190
|
+
- `create_ios_splash`
|
|
191
|
+
- `create_android_splash`
|
|
192
|
+
- `generate_app_icons`
|
|
193
|
+
- `create_android_foundation`
|
|
194
|
+
- `commit_platform_changes`
|
|
195
|
+
- `resize_image`
|
|
196
|
+
- `render_svg_to_png`
|
|
197
|
+
- `create_apple_app_icon_set`
|
|
198
|
+
- `create_android_launcher_icon_set`
|
|
199
|
+
- `validate_apple_app_icon_set`
|
|
200
|
+
- `validate_android_launcher_icon_set`
|
|
201
|
+
- `validate_api_contract_routes`
|
|
202
|
+
- `validate_android_project_config`
|
|
203
|
+
- `validate_apple_project_files`
|
|
204
|
+
- `validate_fastlane_config`
|
|
205
|
+
- `validate_prisma_schema`
|
|
206
|
+
- `scan_secrets`
|
|
207
|
+
- `generate_video_asset`
|
|
208
|
+
- `run_command`
|
|
209
|
+
- `run_shell`
|
|
210
|
+
|
|
211
|
+
All file paths are constrained to the selected workspace.
|
|
212
|
+
|
|
213
|
+
## Video Assets
|
|
214
|
+
|
|
215
|
+
Tanya can generate short compositable video assets locally with headless Chrome and ffmpeg:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
tanya video one-terminal-simctl --output-dir assets/video --basename simctl-fail
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
The `one-terminal-simctl` preset recreates the native 980x1012, 30fps, 3s transparent Terminal asset with failing `xcrun simctl` commands. `terminal-simctl` is kept as an alias.
|
|
222
|
+
|
|
223
|
+
To make variants, override terminal copy with repeated `--line` flags:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
tanya video one-terminal-simctl \
|
|
227
|
+
--output-dir assets/video \
|
|
228
|
+
--basename install-failure \
|
|
229
|
+
--line '$ xcrun simctl install booted CosmoKit.app' \
|
|
230
|
+
--line 'error: unable to find a booted simulator' \
|
|
231
|
+
--line '$ xcrun simctl io booted screenshot out.png' \
|
|
232
|
+
--line 'xcrun: error: selected device is not available'
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Outputs default to WebM VP9 alpha, ProRes 4444 MOV alpha, and a transparent poster PNG. Chrome/Chromium and ffmpeg must be installed; set `TANYA_CHROME_PATH` or `TANYA_FFMPEG_PATH` if Tanya cannot find them.
|