steinn 0.1.0a1__tar.gz

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.
Files changed (49) hide show
  1. steinn-0.1.0a1/LICENSE +26 -0
  2. steinn-0.1.0a1/PKG-INFO +152 -0
  3. steinn-0.1.0a1/README.md +73 -0
  4. steinn-0.1.0a1/pyproject.toml +85 -0
  5. steinn-0.1.0a1/src/steinn_ai/__init__.py +14 -0
  6. steinn-0.1.0a1/src/steinn_ai/__main__.py +14 -0
  7. steinn-0.1.0a1/src/steinn_ai/agent/__init__.py +1 -0
  8. steinn-0.1.0a1/src/steinn_ai/agent/auth.py +808 -0
  9. steinn-0.1.0a1/src/steinn_ai/agent/budget.py +168 -0
  10. steinn-0.1.0a1/src/steinn_ai/agent/client.py +72 -0
  11. steinn-0.1.0a1/src/steinn_ai/agent/context.py +366 -0
  12. steinn-0.1.0a1/src/steinn_ai/agent/conversation.py +52 -0
  13. steinn-0.1.0a1/src/steinn_ai/agent/environment.py +260 -0
  14. steinn-0.1.0a1/src/steinn_ai/agent/mcp/__init__.py +24 -0
  15. steinn-0.1.0a1/src/steinn_ai/agent/mcp/client.py +110 -0
  16. steinn-0.1.0a1/src/steinn_ai/agent/mcp/config.py +116 -0
  17. steinn-0.1.0a1/src/steinn_ai/agent/mcp/convert.py +47 -0
  18. steinn-0.1.0a1/src/steinn_ai/agent/mcp/manager.py +101 -0
  19. steinn-0.1.0a1/src/steinn_ai/agent/permissions.py +208 -0
  20. steinn-0.1.0a1/src/steinn_ai/agent/stream.py +435 -0
  21. steinn-0.1.0a1/src/steinn_ai/agent/templates/callback_error.html +89 -0
  22. steinn-0.1.0a1/src/steinn_ai/agent/templates/callback_success.html +89 -0
  23. steinn-0.1.0a1/src/steinn_ai/agent/tools/__init__.py +166 -0
  24. steinn-0.1.0a1/src/steinn_ai/agent/tools/bash.py +35 -0
  25. steinn-0.1.0a1/src/steinn_ai/agent/tools/codebase.py +637 -0
  26. steinn-0.1.0a1/src/steinn_ai/agent/tools/definitions.py +135 -0
  27. steinn-0.1.0a1/src/steinn_ai/agent/tools/file.py +436 -0
  28. steinn-0.1.0a1/src/steinn_ai/agent/tools/web.py +91 -0
  29. steinn-0.1.0a1/src/steinn_ai/cli.py +78 -0
  30. steinn-0.1.0a1/src/steinn_ai/config.py +161 -0
  31. steinn-0.1.0a1/src/steinn_ai/exceptions.py +59 -0
  32. steinn-0.1.0a1/src/steinn_ai/indexer.py +497 -0
  33. steinn-0.1.0a1/src/steinn_ai/init.py +2213 -0
  34. steinn-0.1.0a1/src/steinn_ai/logger.py +90 -0
  35. steinn-0.1.0a1/src/steinn_ai/parser/__init__.py +85 -0
  36. steinn-0.1.0a1/src/steinn_ai/parser/fallback.py +119 -0
  37. steinn-0.1.0a1/src/steinn_ai/parser/languages.py +152 -0
  38. steinn-0.1.0a1/src/steinn_ai/parser/treesitter.py +718 -0
  39. steinn-0.1.0a1/src/steinn_ai/parser/usages.py +642 -0
  40. steinn-0.1.0a1/src/steinn_ai/repl/__init__.py +1 -0
  41. steinn-0.1.0a1/src/steinn_ai/repl/commands.py +144 -0
  42. steinn-0.1.0a1/src/steinn_ai/repl/loop.py +1338 -0
  43. steinn-0.1.0a1/src/steinn_ai/repl/mermaid.py +371 -0
  44. steinn-0.1.0a1/src/steinn_ai/repl/prompt.py +598 -0
  45. steinn-0.1.0a1/src/steinn_ai/repl/render.py +1874 -0
  46. steinn-0.1.0a1/src/steinn_ai/repl/select.py +296 -0
  47. steinn-0.1.0a1/src/steinn_ai/repl/theme.py +170 -0
  48. steinn-0.1.0a1/src/steinn_ai/telemetry.py +106 -0
  49. steinn-0.1.0a1/src/steinn_ai/watcher.py +337 -0
steinn-0.1.0a1/LICENSE ADDED
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2026 Steinn Labs Pvt Ltd. All rights reserved.
2
+
3
+ The Steinn AI CLI ("the Software") is proprietary software of Steinn Labs
4
+ Pvt Ltd. The Software is publicly distributed via package registries (PyPI,
5
+ Homebrew) so that end users may install and run it for its intended
6
+ purpose. No other rights are granted.
7
+
8
+ In particular, no right is granted to:
9
+ - copy or redistribute the Software,
10
+ - modify the Software or create derivative works,
11
+ - reverse-engineer, decompile, or disassemble the Software,
12
+ - sub-license, rent, lease, or sell the Software,
13
+ except as expressly permitted in a written agreement with Steinn Labs Pvt Ltd.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
18
+ IN NO EVENT SHALL STEINN LABS PVT LTD BE LIABLE FOR ANY CLAIM, DAMAGES, OR
19
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE,
20
+ ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21
+ OTHER DEALINGS IN THE SOFTWARE.
22
+
23
+ This file is a placeholder. Replace it with the finalised end-user
24
+ license agreement reviewed by legal counsel before public release.
25
+
26
+ For licensing inquiries: legal@steinn.ai
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.4
2
+ Name: steinn
3
+ Version: 0.1.0a1
4
+ Summary: Steinn AI — an AI coding assistant
5
+ License: Copyright (c) 2026 Steinn Labs Pvt Ltd. All rights reserved.
6
+
7
+ The Steinn AI CLI ("the Software") is proprietary software of Steinn Labs
8
+ Pvt Ltd. The Software is publicly distributed via package registries (PyPI,
9
+ Homebrew) so that end users may install and run it for its intended
10
+ purpose. No other rights are granted.
11
+
12
+ In particular, no right is granted to:
13
+ - copy or redistribute the Software,
14
+ - modify the Software or create derivative works,
15
+ - reverse-engineer, decompile, or disassemble the Software,
16
+ - sub-license, rent, lease, or sell the Software,
17
+ except as expressly permitted in a written agreement with Steinn Labs Pvt Ltd.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
22
+ IN NO EVENT SHALL STEINN LABS PVT LTD BE LIABLE FOR ANY CLAIM, DAMAGES, OR
23
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE,
24
+ ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25
+ OTHER DEALINGS IN THE SOFTWARE.
26
+
27
+ This file is a placeholder. Replace it with the finalised end-user
28
+ license agreement reviewed by legal counsel before public release.
29
+
30
+ For licensing inquiries: legal@steinn.ai
31
+ License-File: LICENSE
32
+ Author: Jeet Patel
33
+ Author-email: jeet@steinnlabs.com
34
+ Requires-Python: >=3.12
35
+ Classifier: Development Status :: 3 - Alpha
36
+ Classifier: Environment :: Console
37
+ Classifier: Intended Audience :: Developers
38
+ Classifier: License :: Other/Proprietary License
39
+ Classifier: Operating System :: OS Independent
40
+ Classifier: Programming Language :: Python :: 3.12
41
+ Classifier: Topic :: Software Development
42
+ Requires-Dist: ddgs (>=9.13.0,<10.0.0)
43
+ Requires-Dist: httpx (>=0.28.0,<0.29.0)
44
+ Requires-Dist: keyring (>=25.6.0,<26.0.0)
45
+ Requires-Dist: mcp (>=1.27.0,<2.0.0)
46
+ Requires-Dist: platformdirs (>=4.0.0,<5.0.0)
47
+ Requires-Dist: prompt-toolkit (>=3.0.50,<4.0.0)
48
+ Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
49
+ Requires-Dist: rich (>=14.0.0,<15.0.0)
50
+ Requires-Dist: sentry-sdk (>=2.20.0,<3.0.0)
51
+ Requires-Dist: structlog (>=25.0.0,<26.0.0)
52
+ Requires-Dist: term-image (>=0.7.1,<0.8.0)
53
+ Requires-Dist: trafilatura (>=2.0.0,<3.0.0)
54
+ Requires-Dist: tree-sitter (==0.25.2)
55
+ Requires-Dist: tree-sitter-bash (==0.25.1)
56
+ Requires-Dist: tree-sitter-c (==0.24.2)
57
+ Requires-Dist: tree-sitter-c-sharp (==0.23.5)
58
+ Requires-Dist: tree-sitter-cpp (==0.23.4)
59
+ Requires-Dist: tree-sitter-css (==0.25.0)
60
+ Requires-Dist: tree-sitter-elixir (==0.3.5)
61
+ Requires-Dist: tree-sitter-go (==0.25.0)
62
+ Requires-Dist: tree-sitter-html (==0.23.2)
63
+ Requires-Dist: tree-sitter-java (==0.23.5)
64
+ Requires-Dist: tree-sitter-javascript (==0.25.0)
65
+ Requires-Dist: tree-sitter-kotlin (==1.1.0)
66
+ Requires-Dist: tree-sitter-lua (==0.5.0)
67
+ Requires-Dist: tree-sitter-php (==0.24.1)
68
+ Requires-Dist: tree-sitter-python (==0.25.0)
69
+ Requires-Dist: tree-sitter-ruby (==0.23.1)
70
+ Requires-Dist: tree-sitter-rust (==0.24.2)
71
+ Requires-Dist: tree-sitter-scala (==0.26.0)
72
+ Requires-Dist: tree-sitter-swift (==0.7.3)
73
+ Requires-Dist: tree-sitter-typescript (==0.23.2)
74
+ Requires-Dist: watchdog (>=4.0.0,<6.0.0)
75
+ Project-URL: Homepage, https://stg.steinn.ai
76
+ Project-URL: Privacy, https://stg.steinn.ai/privacy
77
+ Description-Content-Type: text/markdown
78
+
79
+ # Steinn AI
80
+
81
+ > AI coding assistant in your terminal.
82
+
83
+ > ⚠️ **Alpha** — license, terms, and behavior subject to change. Telemetry is on by default; see Privacy below.
84
+
85
+ ---
86
+
87
+ ## Install
88
+
89
+ ```bash
90
+ pipx install --pip-args="--pre" steinn
91
+ ```
92
+
93
+ Requires Python 3.12 or later. The `--pre` flag is needed while Steinn
94
+ is in alpha; drop it once the first stable release is out. Full install
95
+ options, including standalone binaries, are in [INSTALL.md](INSTALL.md).
96
+
97
+ ---
98
+
99
+ ## Quickstart
100
+
101
+ ```bash
102
+ steinn
103
+ ```
104
+
105
+ First run opens a browser to sign in. After login, ask anything:
106
+
107
+ ```
108
+ > explain src/auth.py
109
+ > what does this repo do?
110
+ > fix the bug in services/auth/session.py
111
+ ```
112
+
113
+ ---
114
+
115
+ ## Commands
116
+
117
+ | Command | Description |
118
+ | --------- | ------------------------------ |
119
+ | `/help` | Show all commands |
120
+ | `/login` | Sign in |
121
+ | `/logout` | Sign out |
122
+ | `/clear` | Reset the current conversation |
123
+ | `/exit` | Quit |
124
+
125
+ ---
126
+
127
+ ## Privacy & telemetry
128
+
129
+ Steinn sends prompt content and any file content the assistant reads to inference providers in real time. The CLI also collects anonymous crash reports and usage counts by default.
130
+
131
+ To disable telemetry:
132
+
133
+ ```bash
134
+ export STEINN_TELEMETRY=0
135
+ ```
136
+
137
+ Full privacy policy: <https://stg.steinn.ai/privacy>
138
+
139
+ ---
140
+
141
+ ## Support
142
+
143
+ jeet@steinnlabs.com
144
+
145
+ ---
146
+
147
+ ## License
148
+
149
+ Proprietary. See [LICENSE](LICENSE).
150
+
151
+ Copyright 2026 Steinn Labs Pvt Ltd. All rights reserved.
152
+
@@ -0,0 +1,73 @@
1
+ # Steinn AI
2
+
3
+ > AI coding assistant in your terminal.
4
+
5
+ > ⚠️ **Alpha** — license, terms, and behavior subject to change. Telemetry is on by default; see Privacy below.
6
+
7
+ ---
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ pipx install --pip-args="--pre" steinn
13
+ ```
14
+
15
+ Requires Python 3.12 or later. The `--pre` flag is needed while Steinn
16
+ is in alpha; drop it once the first stable release is out. Full install
17
+ options, including standalone binaries, are in [INSTALL.md](INSTALL.md).
18
+
19
+ ---
20
+
21
+ ## Quickstart
22
+
23
+ ```bash
24
+ steinn
25
+ ```
26
+
27
+ First run opens a browser to sign in. After login, ask anything:
28
+
29
+ ```
30
+ > explain src/auth.py
31
+ > what does this repo do?
32
+ > fix the bug in services/auth/session.py
33
+ ```
34
+
35
+ ---
36
+
37
+ ## Commands
38
+
39
+ | Command | Description |
40
+ | --------- | ------------------------------ |
41
+ | `/help` | Show all commands |
42
+ | `/login` | Sign in |
43
+ | `/logout` | Sign out |
44
+ | `/clear` | Reset the current conversation |
45
+ | `/exit` | Quit |
46
+
47
+ ---
48
+
49
+ ## Privacy & telemetry
50
+
51
+ Steinn sends prompt content and any file content the assistant reads to inference providers in real time. The CLI also collects anonymous crash reports and usage counts by default.
52
+
53
+ To disable telemetry:
54
+
55
+ ```bash
56
+ export STEINN_TELEMETRY=0
57
+ ```
58
+
59
+ Full privacy policy: <https://stg.steinn.ai/privacy>
60
+
61
+ ---
62
+
63
+ ## Support
64
+
65
+ jeet@steinnlabs.com
66
+
67
+ ---
68
+
69
+ ## License
70
+
71
+ Proprietary. See [LICENSE](LICENSE).
72
+
73
+ Copyright 2026 Steinn Labs Pvt Ltd. All rights reserved.
@@ -0,0 +1,85 @@
1
+ [project]
2
+ name = "steinn"
3
+ version = "0.1.0a1"
4
+ description = "Steinn AI — an AI coding assistant"
5
+ authors = [
6
+ {name = "Jeet Patel", email = "jeet@steinnlabs.com"}
7
+ ]
8
+ readme = "README.md"
9
+ requires-python = ">=3.12"
10
+ license = {file = "LICENSE"}
11
+ classifiers = [
12
+ "Development Status :: 3 - Alpha",
13
+ "Environment :: Console",
14
+ "Intended Audience :: Developers",
15
+ "License :: Other/Proprietary License",
16
+ "Operating System :: OS Independent",
17
+ "Programming Language :: Python :: 3.12",
18
+ "Topic :: Software Development",
19
+ ]
20
+
21
+ dependencies = [
22
+ "rich>=14.0.0,<15.0.0",
23
+ "prompt-toolkit>=3.0.50,<4.0.0",
24
+ "structlog>=25.0.0,<26.0.0",
25
+ "httpx>=0.28.0,<0.29.0",
26
+ "platformdirs>=4.0.0,<5.0.0",
27
+ "python-dotenv>=1.0.0,<2.0.0",
28
+ "trafilatura (>=2.0.0,<3.0.0)",
29
+ "ddgs (>=9.13.0,<10.0.0)",
30
+ "mcp (>=1.27.0,<2.0.0)",
31
+ "keyring (>=25.6.0,<26.0.0)",
32
+ "term-image (>=0.7.1,<0.8.0)",
33
+ "tree-sitter==0.25.2",
34
+ "watchdog>=4.0.0,<6.0.0",
35
+ "sentry-sdk>=2.20.0,<3.0.0",
36
+ # Tree-sitter language grammars. Exact pins to prevent breaking
37
+ # changes from upstream. Missing grammar at runtime → fallback regex
38
+ # via parser/languages.py:load_parser() returning None.
39
+ # Dart has no tree-sitter-dart on PyPI; .dart files use regex fallback.
40
+ "tree-sitter-bash==0.25.1",
41
+ "tree-sitter-c==0.24.2",
42
+ "tree-sitter-c-sharp==0.23.5",
43
+ "tree-sitter-cpp==0.23.4",
44
+ "tree-sitter-css==0.25.0",
45
+ "tree-sitter-elixir==0.3.5",
46
+ "tree-sitter-go==0.25.0",
47
+ "tree-sitter-html==0.23.2",
48
+ "tree-sitter-java==0.23.5",
49
+ "tree-sitter-javascript==0.25.0",
50
+ "tree-sitter-kotlin==1.1.0",
51
+ "tree-sitter-lua==0.5.0",
52
+ "tree-sitter-php==0.24.1",
53
+ "tree-sitter-python==0.25.0",
54
+ "tree-sitter-ruby==0.23.1",
55
+ "tree-sitter-rust==0.24.2",
56
+ "tree-sitter-scala==0.26.0",
57
+ "tree-sitter-swift==0.7.3",
58
+ "tree-sitter-typescript==0.23.2",
59
+ ]
60
+
61
+ [project.urls]
62
+ Homepage = "https://stg.steinn.ai"
63
+ Privacy = "https://stg.steinn.ai/privacy"
64
+
65
+ [project.scripts]
66
+ steinn = "steinn_ai.cli:main"
67
+
68
+ [tool.poetry]
69
+ packages = [{include = "steinn_ai", from = "src"}]
70
+
71
+ [build-system]
72
+ requires = ["poetry-core>=2.0.0,<3.0.0"]
73
+ build-backend = "poetry.core.masonry.api"
74
+
75
+ [dependency-groups]
76
+ dev = [
77
+ "pytest>=9.0.0,<10.0.0",
78
+ "pytest-asyncio>=1.3.0,<2.0.0",
79
+ "pytest-cov>=7.0.0,<8.0.0",
80
+ ]
81
+
82
+ [tool.pytest.ini_options]
83
+ asyncio_mode = "auto"
84
+ asyncio_default_fixture_loop_scope = "session"
85
+ testpaths = ["tests"]
@@ -0,0 +1,14 @@
1
+ """
2
+ Steinn AI — a local AI coding assistant.
3
+
4
+ Version is read from package metadata at runtime (set in pyproject.toml,
5
+ written by poetry at build time). Falls back to dev version if the package
6
+ is not installed (e.g. running directly from source without pip install).
7
+ """
8
+
9
+ from importlib.metadata import PackageNotFoundError, version
10
+
11
+ try:
12
+ __version__ = version("steinn")
13
+ except PackageNotFoundError:
14
+ __version__ = "0.0.0.dev0"
@@ -0,0 +1,14 @@
1
+ """
2
+ Entry point for `python -m steinn_ai`.
3
+
4
+ This allows the CLI to be invoked as a module:
5
+ python -m steinn_ai --version
6
+ python -m steinn_ai --help
7
+
8
+ The primary entry point is the `steinn` command registered in pyproject.toml,
9
+ which calls cli.main() directly. This file exists for convenience.
10
+ """
11
+
12
+ from steinn_ai.cli import main
13
+
14
+ main()
@@ -0,0 +1 @@
1
+ """Agent layer — conversation context and backend streaming."""