Skip to content

Commit 79d7398

Browse files
committed
feat: hanzo-dev Python TUI + LSP + hooks + sandbox + vim + git + multi-auth + full parity
Rename hanzo-repl → hanzo-dev to match @hanzo/dev (Rust/TS). New packages: - hanzo-lsp: async LSP client (diagnostics, go-to-def, references, context enrichment) - hanzo-hooks: pre/post tool use hooks (shell scripts, exit-code deny) - hanzo-sandbox: container detection, filesystem isolation, Linux unshare hanzo-dev TUI: - Vim keybindings (Normal/Insert/Visual/Command modes, 37 tests) - Git slash commands (/branch /commit /worktree /diff /stash, 13 tests) - All slash commands at parity: /model /permissions /clear /resume /memory /init /export /session /plan /solve /code /auto /fast /remote-control - Multi-provider auth: Anthropic OAuth, OpenAI device code, Hanzo PKCE, auto-detect Auth: - login_with_anthropic() — PKCE via console.anthropic.com - login_with_openai() — device code flow via auth.openai.com - login_auto() — env var detection + saved credential fallback - OAuthCredentialStore supports provider keys (hanzo/anthropic/openai) Parity test suite (38 tests): SSE, MCP normalization, permissions, compaction, token usage, PKCE RFC vector, config, backoff, session roundtrip, hooks. 348 tests total, 0 failures across Python + Rust + Universe E2E.
1 parent 43c7ac8 commit 79d7398

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+4576
-460
lines changed

.github/workflows/hanzo-packages-ci.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
# hanzo-agent is now a git submodule - not tested here
1212
- 'pkg/hanzo-memory/**'
1313
- 'pkg/hanzo-aci/**'
14-
- 'pkg/hanzo-repl/**'
14+
- 'pkg/hanzo-dev/**'
1515
- 'pkg/hanzoai/**'
1616
- '.github/workflows/hanzo-packages-ci.yml'
1717
tags:
@@ -22,7 +22,7 @@ on:
2222
# hanzo-agents is now a git submodule
2323
- 'hanzo-memory-*'
2424
- 'hanzo-aci-*'
25-
- 'hanzo-repl-*'
25+
- 'hanzo-dev-*'
2626
pull_request:
2727
branches:
2828
- main
@@ -33,7 +33,7 @@ on:
3333
# hanzo-agent is now a git submodule - not tested here
3434
- 'pkg/hanzo-memory/**'
3535
- 'pkg/hanzo-aci/**'
36-
- 'pkg/hanzo-repl/**'
36+
- 'pkg/hanzo-dev/**'
3737
- 'pkg/hanzoai/**'
3838
- '.github/workflows/hanzo-packages-ci.yml'
3939

@@ -152,7 +152,7 @@ jobs:
152152
153153
integration-test:
154154
name: Integration Test
155-
needs: [test-hanzo-network, test-hanzo-mcp, test-hanzo-aci, test-hanzo-memory, test-hanzo, test-hanzo-repl]
155+
needs: [test-hanzo-network, test-hanzo-mcp, test-hanzo-aci, test-hanzo-memory, test-hanzo, test-hanzo-dev]
156156
runs-on: hanzo-build-linux-amd64
157157

158158
steps:
@@ -174,7 +174,7 @@ jobs:
174174
pip install hanzo-agents || true
175175
cd pkg/hanzo-memory && pip install -e . && cd ../..
176176
cd pkg/hanzo-aci && pip install -e . && cd ../..
177-
cd pkg/hanzo-repl && pip install -e . && cd ../..
177+
cd pkg/hanzo-dev && pip install -e . && cd ../..
178178
179179
- name: Run integration tests
180180
run: |
@@ -229,9 +229,9 @@ jobs:
229229
ruff check . || true
230230
mypy . --ignore-missing-imports || true
231231
232-
- name: Lint hanzo-repl
232+
- name: Lint hanzo-dev
233233
run: |
234-
cd pkg/hanzo-repl
234+
cd pkg/hanzo-dev
235235
ruff check . || true
236236
mypy . --ignore-missing-imports || true
237237
@@ -265,13 +265,13 @@ jobs:
265265
echo "No tests directory found, skipping tests"
266266
fi
267267
268-
test-hanzo-repl:
269-
name: Test hanzo-repl
268+
test-hanzo-dev:
269+
name: Test hanzo-dev
270270
runs-on: hanzo-build-linux-amd64
271271
timeout-minutes: 5
272272
defaults:
273273
run:
274-
working-directory: pkg/hanzo-repl
274+
working-directory: pkg/hanzo-dev
275275

276276
steps:
277277
- uses: actions/checkout@v4
@@ -295,14 +295,14 @@ jobs:
295295
timeout 120 python -m pytest tests/ -v --tb=short -n 4 --maxfail=5 || true
296296
else
297297
echo "No tests directory found, checking for test module"
298-
python -c "from hanzo_repl import tests; print('Test module found')" || echo "No test module"
298+
python -c "from hanzo_dev import tests; print('Test module found')" || echo "No test module"
299299
fi
300300
301301
# Auto-publish packages with new versions on push to main
302302
auto-publish-new-versions:
303303
name: Auto-Publish New Versions
304304
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
305-
needs: [test-hanzo-network, test-hanzo-mcp, test-hanzo-aci, test-hanzo-memory, test-hanzo, test-hanzo-repl, integration-test]
305+
needs: [test-hanzo-network, test-hanzo-mcp, test-hanzo-aci, test-hanzo-memory, test-hanzo, test-hanzo-dev, integration-test]
306306
runs-on: hanzo-build-linux-amd64
307307

308308
steps:
@@ -325,7 +325,7 @@ jobs:
325325
publish-to-pypi:
326326
name: Publish to PyPI (Tag)
327327
if: startsWith(github.ref, 'refs/tags/')
328-
needs: [test-hanzo-network, test-hanzo-mcp, test-hanzo-aci, test-hanzo-memory, test-hanzo, test-hanzo-repl, integration-test]
328+
needs: [test-hanzo-network, test-hanzo-mcp, test-hanzo-aci, test-hanzo-memory, test-hanzo, test-hanzo-dev, integration-test]
329329
runs-on: hanzo-build-linux-amd64
330330

331331
steps:
@@ -363,13 +363,13 @@ jobs:
363363
PACKAGES="hanzo-memory"
364364
elif [[ $TAG == hanzo-aci-* ]]; then
365365
PACKAGES="hanzo-aci"
366-
elif [[ $TAG == hanzo-repl-* ]]; then
367-
PACKAGES="hanzo-repl"
366+
elif [[ $TAG == hanzo-dev-* ]]; then
367+
PACKAGES="hanzo-dev"
368368
elif [[ $TAG == hanzo-* ]]; then
369369
PACKAGES="hanzo"
370370
elif [[ $TAG == v* ]]; then
371371
# For general version tags, publish all packages (except hanzo-agents which is a submodule)
372-
PACKAGES="hanzo hanzo-network hanzo-mcp hanzo-memory hanzo-aci hanzo-repl"
372+
PACKAGES="hanzo hanzo-network hanzo-mcp hanzo-memory hanzo-aci hanzo-dev"
373373
fi
374374
375375
echo "PACKAGES=$PACKAGES" >> $GITHUB_OUTPUT

.github/workflows/publish-pypi.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
TOOLS_PACKAGES="hanzo-tools-core hanzo-tools-fs hanzo-tools-shell hanzo-tools-browser hanzo-tools-memory hanzo-tools-todo hanzo-tools-reasoning hanzo-tools-lsp hanzo-tools-refactor hanzo-tools-database hanzo-tools-agent hanzo-tools-jupyter hanzo-tools-editor hanzo-tools-llm hanzo-tools-vector hanzo-tools-config hanzo-tools-mcp hanzo-tools-computer hanzo-tools"
6363
6464
# Main packages
65-
MAIN_PACKAGES="hanzoai hanzo hanzo-cli hanzo-kms hanzo-iam hanzo-consensus hanzo-network hanzo-mcp hanzo-memory hanzo-aci hanzo-repl"
65+
MAIN_PACKAGES="hanzoai hanzo hanzo-cli hanzo-kms hanzo-iam hanzo-consensus hanzo-network hanzo-mcp hanzo-memory hanzo-aci hanzo-dev"
6666
6767
# Handle manual workflow dispatch
6868
if [ -n "$MANUAL_INPUT" ]; then
@@ -127,8 +127,8 @@ jobs:
127127
PACKAGES="hanzo-memory"
128128
elif [[ $TAG == hanzo-aci-* ]]; then
129129
PACKAGES="hanzo-aci"
130-
elif [[ $TAG == hanzo-repl-* ]]; then
131-
PACKAGES="hanzo-repl"
130+
elif [[ $TAG == hanzo-dev-* ]]; then
131+
PACKAGES="hanzo-dev"
132132
elif [[ $TAG == hanzoai-* ]]; then
133133
PACKAGES="hanzoai"
134134
elif [[ $TAG == hanzo-* ]]; then

.github/workflows/test-auto-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
packages = [
5353
'hanzo', 'hanzo-network', 'hanzo-mcp',
5454
# hanzo-agents is now a git submodule
55-
'hanzo-memory', 'hanzo-aci', 'hanzo-repl'
55+
'hanzo-memory', 'hanzo-aci', 'hanzo-dev'
5656
]
5757
5858
print('📦 Package Version Status:')

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ deps: ## Install all dependencies for all packages
9696
@source .venv/bin/activate && uv pip install -e ./pkg/hanzo-agents
9797
@source .venv/bin/activate && uv pip install -e ./pkg/hanzo-mcp
9898
@source .venv/bin/activate && uv pip install -e ./pkg/hanzo
99-
@source .venv/bin/activate && uv pip install -e ./pkg/hanzo-repl
99+
@source .venv/bin/activate && uv pip install -e ./pkg/hanzo-dev
100100
@source .venv/bin/activate && uv pip install -e ./pkg/hanzo-memory
101101
@source .venv/bin/activate && uv pip install -e ./pkg/hanzo-network
102102

@@ -135,7 +135,7 @@ build: ## Build all packages
135135
@cd pkg/hanzo-agents && uv build
136136
@cd pkg/hanzo-mcp && uv build
137137
@cd pkg/hanzo && uv build
138-
@cd pkg/hanzo-repl && uv build
138+
@cd pkg/hanzo-dev && uv build
139139
@cd pkg/hanzo-memory && uv build
140140
@cd pkg/hanzo-network && uv build
141141
@cd pkg/hanzo-aci && uv build
@@ -169,7 +169,7 @@ publish-all: build ## Publish all packages to PyPI
169169
$(MAKE) publish-hanzo-agents; \
170170
$(MAKE) publish-hanzo-mcp; \
171171
$(MAKE) publish-hanzo; \
172-
$(MAKE) publish-hanzo-repl; \
172+
$(MAKE) publish-hanzo-dev; \
173173
$(MAKE) publish-hanzo-memory; \
174174
$(MAKE) publish-hanzo-network; \
175175
$(MAKE) publish-hanzo-aci; \
@@ -194,9 +194,9 @@ publish-hanzo: ## Publish hanzo package
194194
@echo -e "$(CYAN)Publishing hanzo...$(NC)"
195195
@cd pkg/hanzo && TWINE_USERNAME=__token__ TWINE_PASSWORD=$${PYPI_TOKEN} twine upload dist/* --skip-existing
196196

197-
publish-hanzo-repl: ## Publish hanzo-repl package
198-
@echo -e "$(CYAN)Publishing hanzo-repl...$(NC)"
199-
@cd pkg/hanzo-repl && TWINE_USERNAME=__token__ TWINE_PASSWORD=$${PYPI_TOKEN} twine upload dist/* --skip-existing
197+
publish-hanzo-dev: ## Publish hanzo-dev package
198+
@echo -e "$(CYAN)Publishing hanzo-dev...$(NC)"
199+
@cd pkg/hanzo-dev && TWINE_USERNAME=__token__ TWINE_PASSWORD=$${PYPI_TOKEN} twine upload dist/* --skip-existing
200200

201201
publish-hanzo-memory: ## Publish hanzo-memory package
202202
@echo -e "$(CYAN)Publishing hanzo-memory...$(NC)"

bin/check-and-publish.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def main():
187187
"hanzo-agents",
188188
"hanzo-aci",
189189
"hanzo-mcp",
190-
"hanzo-repl",
190+
"hanzo-dev",
191191
"hanzo",
192192
]
193193

bin/publish-all-packages.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ PACKAGES=(
4141
"hanzo-agents"
4242
"hanzo-aci"
4343
"hanzo-mcp"
44-
"hanzo-repl"
44+
"hanzo-dev"
4545
"hanzo"
4646
)
4747

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pretty = True
33
show_error_codes = True
44

55
# Exclude non-SDK code and subpackages (they have their own CI/linting)
6-
exclude = ^(pkg/hanzoai/_files\.py|_dev/.*\.py|tests/.*|bin/.*|examples/.*|scripts/.*|pkg/hanzo/|pkg/hanzo-aci/|pkg/hanzo-agent/|pkg/hanzo-mcp/|pkg/hanzo-memory/|pkg/hanzo-network/|pkg/hanzo-repl/)
6+
exclude = ^(pkg/hanzoai/_files\.py|_dev/.*\.py|tests/.*|bin/.*|examples/.*|scripts/.*|pkg/hanzo/|pkg/hanzo-aci/|pkg/hanzo-agent/|pkg/hanzo-mcp/|pkg/hanzo-memory/|pkg/hanzo-network/|pkg/hanzo-dev-py/)
77

88
strict_equality = True
99
implicit_reexport = True
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Hanzo REPL
1+
# Hanzo Dev
22

3-
Interactive REPL for Hanzo AI - Like Claude Code in your terminal.
3+
Interactive dev environment for Hanzo AI - Like Claude Code in your terminal.
44

55
## Features
66

@@ -15,16 +15,16 @@ Interactive REPL for Hanzo AI - Like Claude Code in your terminal.
1515

1616
```bash
1717
# Install
18-
pip install hanzo-repl
18+
pip install hanzo-dev
1919

20-
# Start interactive REPL (recommended)
21-
hanzo-repl
20+
# Start interactive dev environment (recommended)
21+
hanzo-dev
2222

23-
# Start IPython REPL (advanced)
24-
hanzo-repl-ipython
23+
# Start IPython mode (advanced)
24+
hanzo-dev-ipython
2525

2626
# Start TUI mode (beautiful interface)
27-
hanzo-repl-tui
27+
hanzo-dev-tui
2828
```
2929

3030
## Usage
@@ -105,7 +105,7 @@ export HANZO_API_KEY=your-key # For Hanzo AI
105105
Install voice dependencies:
106106

107107
```bash
108-
pip install hanzo-repl[voice]
108+
pip install hanzo-dev[voice]
109109
```
110110

111111
Enable in REPL:
@@ -134,7 +134,7 @@ def my_tool(param: str) -> str:
134134
Use the REPL in scripts:
135135

136136
```python
137-
from hanzo_repl import create_repl
137+
from hanzo_dev import create_repl
138138

139139
async def main():
140140
repl = create_repl()
Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
2-
name = "hanzo-repl"
2+
name = "hanzo-dev"
33
version = "0.1.0"
4-
description = "Interactive REPL for Hanzo AI - Like Claude Code in your terminal"
4+
description = "Interactive dev environment for Hanzo AI - Like Claude Code in your terminal"
55
authors = [
66
{name = "Hanzo AI", email = "dev@hanzo.ai"},
77
]
@@ -22,10 +22,11 @@ classifiers = [
2222
"Topic :: Software Development :: Testing",
2323
"Topic :: Scientific/Engineering :: Artificial Intelligence",
2424
]
25-
keywords = ["repl", "mcp", "ai", "llm", "hanzo", "claude", "interactive"]
25+
keywords = ["dev", "mcp", "ai", "llm", "hanzo", "claude", "interactive"]
2626
requires-python = ">=3.12"
2727

2828
dependencies = [
29+
"hanzoai>=2.2.0",
2930
"hanzo-mcp>=0.1.0",
3031
"rich>=13.0.0",
3132
"prompt-toolkit>=3.0.0",
@@ -40,11 +41,14 @@ dependencies = [
4041

4142
[project.urls]
4243
Homepage = "https://hanzo.ai"
43-
Documentation = "https://docs.hanzo.ai/repl"
44+
Documentation = "https://docs.hanzo.ai/dev"
4445
Repository = "https://github.com/hanzoai/python-sdk"
4546
Issues = "https://github.com/hanzoai/python-sdk/issues"
4647

4748
[project.optional-dependencies]
49+
lsp = ["hanzo-lsp>=0.1.0"]
50+
hooks = ["hanzo-hooks>=0.1.0"]
51+
sandbox = ["hanzo-sandbox>=0.1.0"]
4852
voice = [
4953
"speechrecognition>=3.10.0",
5054
"pyttsx3>=2.90",
@@ -63,22 +67,22 @@ dev = [
6367
]
6468

6569
[project.scripts]
66-
hanzo-repl = "hanzo_repl.cli:main"
67-
hanzo-repl-ipython = "hanzo_repl.ipython_repl:main"
68-
hanzo-repl-tui = "hanzo_repl.textual_repl:main"
70+
hanzo-dev = "hanzo_dev.cli:main"
71+
hanzo-dev-ipython = "hanzo_dev.ipython_repl:main"
72+
hanzo-dev-tui = "hanzo_dev.textual_repl:main"
6973

7074
[build-system]
7175
requires = ["hatchling"]
7276
build-backend = "hatchling.build"
7377

7478
[tool.hatch.build]
7579
include = [
76-
"src/hanzo_repl",
80+
"src/hanzo_dev",
7781
"README.md",
7882
]
7983

8084
[tool.hatch.build.targets.wheel]
81-
packages = ["src/hanzo_repl"]
85+
packages = ["src/hanzo_dev"]
8286

8387
[tool.ruff]
8488
line-length = 120

0 commit comments

Comments
 (0)