keshro 0.1.0__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.
@@ -0,0 +1,28 @@
1
+ name: Publish CLI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ release:
6
+ types: [published]
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write # Required for PyPI trusted publishing
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.13"
20
+
21
+ - name: Install build tools
22
+ run: pip install build
23
+
24
+ - name: Build package
25
+ run: python -m build
26
+
27
+ - name: Publish to PyPI
28
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,20 @@
1
+ __pycache__/
2
+ *.pyc
3
+ .venv/
4
+ .python-version
5
+ .DS_Store
6
+ .pytest_cache/
7
+ dist/
8
+ build/
9
+ *.egg-info/
10
+ .idea/
11
+ .qodo/
12
+ .claude/
13
+ .gstack/
14
+
15
+ # Keshro daemon context (auto-generated)
16
+ .claude/keshro-context.md
17
+
18
+ # Keshro agent integrations (generated per-project, not for CLI source)
19
+ .cursorrules
20
+ AGENTS.md
@@ -0,0 +1,21 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+
8
+ - repo: https://github.com/omnilib/ufmt
9
+ rev: v2.8.0
10
+ hooks:
11
+ - id: ufmt
12
+ language_version: python3.10
13
+ additional_dependencies:
14
+ - black == 22.6.0
15
+ - usort == 1.0.4
16
+
17
+ - repo: https://github.com/astral-sh/ruff-pre-commit
18
+ rev: v0.12.7
19
+ hooks:
20
+ - id: ruff
21
+ args: [--line-length=120, '--ignore=E402,E721,E722,E731,F821', '--fix']
keshro-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Keshro
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.
keshro-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,92 @@
1
+ Metadata-Version: 2.4
2
+ Name: keshro
3
+ Version: 0.1.0
4
+ Summary: The intelligent execution layer for AI agents — CLI interface
5
+ Project-URL: Homepage, https://keshro.com
6
+ Project-URL: Repository, https://github.com/jlewitt1/keshro-cli
7
+ Project-URL: Documentation, https://keshro.com/developers
8
+ Author-email: Josh Lewittes <josh.lewittes@gmail.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai-agents,cli,coding-agents,execution,planning
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
20
+ Requires-Python: >=3.11
21
+ Requires-Dist: httpx-sse>=0.4
22
+ Requires-Dist: httpx>=0.28
23
+ Requires-Dist: rich>=13.0
24
+ Requires-Dist: textual>=0.80
25
+ Requires-Dist: typer>=0.9
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest-asyncio>=1.0; extra == 'dev'
28
+ Requires-Dist: pytest>=8.0; extra == 'dev'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # Keshro
32
+
33
+ Make AI agents execute intelligently. Structured plans, parallel execution, cross-task learning.
34
+
35
+ ```bash
36
+ pip install keshro
37
+ keshro login <token> # from keshro.com/account
38
+ keshro create # scan project, generate plan
39
+ keshro continue --all # agents execute in parallel
40
+ ```
41
+
42
+ ## The problem
43
+
44
+ Your AI agent is great at one task at a time. But real projects have 10-20 tasks with dependencies, shared context, and files that shouldn't be edited by two agents at once.
45
+
46
+ Run them manually and you're the bottleneck. Run them in parallel and they conflict.
47
+
48
+ ## What Keshro does
49
+
50
+ 1. **Plans the work** — generates a dependency graph with task ordering, file assignments, acceptance criteria, and risk flags
51
+ 2. **Runs agents in parallel** — each in an isolated git worktree, respecting dependency order
52
+ 3. **Shares context across tasks** — when one agent discovers something, related future tasks inherit that knowledge
53
+ 4. **Tracks everything** — git checkpoints before each task, decision audit trails, one-command rollback
54
+
55
+ ## Create from anything
56
+
57
+ ```bash
58
+ keshro create # current directory
59
+ keshro create https://github.com/org/repo # GitHub repo
60
+ keshro create https://github.com/org/repo/issues/42 # GitHub issue
61
+ keshro create https://linear.app/team/issue/PROJ-123 # Linear issue
62
+ ```
63
+
64
+ Your AI agent scans the project, answers clarifying questions, and generates the plan.
65
+
66
+ ## Execute
67
+
68
+ Keshro drives the full execution loop — picks up the next task, gives the agent context, validates the result, marks it done, and moves to the next one. You don't manage it.
69
+
70
+ ```bash
71
+ keshro continue # execute next task, then the next, then the next
72
+ keshro continue --all # run everything — parallel agents, each in its own worktree
73
+ keshro continue --all -c 10 # cap at 10 concurrent agents
74
+ keshro continue --dry-run # preview what would run
75
+ ```
76
+
77
+ ## Monitor
78
+
79
+ ```bash
80
+ keshro status # progress summary
81
+ keshro status --tui # live terminal dashboard
82
+ keshro explain <task-id> # decision audit trail
83
+ keshro rollback <task-id> # revert to pre-task state
84
+ ```
85
+
86
+ ## Works with
87
+
88
+ Claude Code, Codex, Cursor, Devin, or any AI agent that runs in a terminal.
89
+
90
+ ## License
91
+
92
+ MIT
keshro-0.1.0/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # Keshro
2
+
3
+ Make AI agents execute intelligently. Structured plans, parallel execution, cross-task learning.
4
+
5
+ ```bash
6
+ pip install keshro
7
+ keshro login <token> # from keshro.com/account
8
+ keshro create # scan project, generate plan
9
+ keshro continue --all # agents execute in parallel
10
+ ```
11
+
12
+ ## The problem
13
+
14
+ Your AI agent is great at one task at a time. But real projects have 10-20 tasks with dependencies, shared context, and files that shouldn't be edited by two agents at once.
15
+
16
+ Run them manually and you're the bottleneck. Run them in parallel and they conflict.
17
+
18
+ ## What Keshro does
19
+
20
+ 1. **Plans the work** — generates a dependency graph with task ordering, file assignments, acceptance criteria, and risk flags
21
+ 2. **Runs agents in parallel** — each in an isolated git worktree, respecting dependency order
22
+ 3. **Shares context across tasks** — when one agent discovers something, related future tasks inherit that knowledge
23
+ 4. **Tracks everything** — git checkpoints before each task, decision audit trails, one-command rollback
24
+
25
+ ## Create from anything
26
+
27
+ ```bash
28
+ keshro create # current directory
29
+ keshro create https://github.com/org/repo # GitHub repo
30
+ keshro create https://github.com/org/repo/issues/42 # GitHub issue
31
+ keshro create https://linear.app/team/issue/PROJ-123 # Linear issue
32
+ ```
33
+
34
+ Your AI agent scans the project, answers clarifying questions, and generates the plan.
35
+
36
+ ## Execute
37
+
38
+ Keshro drives the full execution loop — picks up the next task, gives the agent context, validates the result, marks it done, and moves to the next one. You don't manage it.
39
+
40
+ ```bash
41
+ keshro continue # execute next task, then the next, then the next
42
+ keshro continue --all # run everything — parallel agents, each in its own worktree
43
+ keshro continue --all -c 10 # cap at 10 concurrent agents
44
+ keshro continue --dry-run # preview what would run
45
+ ```
46
+
47
+ ## Monitor
48
+
49
+ ```bash
50
+ keshro status # progress summary
51
+ keshro status --tui # live terminal dashboard
52
+ keshro explain <task-id> # decision audit trail
53
+ keshro rollback <task-id> # revert to pre-task state
54
+ ```
55
+
56
+ ## Works with
57
+
58
+ Claude Code, Codex, Cursor, Devin, or any AI agent that runs in a terminal.
59
+
60
+ ## License
61
+
62
+ MIT
@@ -0,0 +1,48 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "keshro"
7
+ version = "0.1.0"
8
+ description = "The intelligent execution layer for AI agents — CLI interface"
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ authors = [{name = "Josh Lewittes", email = "josh.lewittes@gmail.com"}]
12
+ keywords = ["ai-agents", "execution", "planning", "coding-agents", "cli"]
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
21
+ "Topic :: Software Development :: Libraries :: Application Frameworks",
22
+ ]
23
+ requires-python = ">=3.11"
24
+ dependencies = [
25
+ "httpx>=0.28",
26
+ "httpx-sse>=0.4",
27
+ "typer>=0.9",
28
+ "rich>=13.0",
29
+ "textual>=0.80",
30
+ ]
31
+
32
+ [project.urls]
33
+ Homepage = "https://keshro.com"
34
+ Repository = "https://github.com/jlewitt1/keshro-cli"
35
+ Documentation = "https://keshro.com/developers"
36
+
37
+ [project.scripts]
38
+ keshro = "keshro_cli.cli:main"
39
+ kr = "keshro_cli.cli:main"
40
+
41
+ [project.optional-dependencies]
42
+ dev = [
43
+ "pytest>=8.0",
44
+ "pytest-asyncio>=1.0",
45
+ ]
46
+
47
+ [tool.hatch.build.targets.wheel]
48
+ packages = ["src/keshro_cli"]
@@ -0,0 +1,3 @@
1
+ __all__ = ["__version__"]
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,81 @@
1
+ import httpx
2
+
3
+ from .client import get_api_url, print_output
4
+ from .config import clear_auth, load_auth, save_auth
5
+
6
+
7
+ def _fetch_user(base_url: str, token: str) -> dict:
8
+ with httpx.Client(base_url=base_url, timeout=30) as client:
9
+ res = client.get(
10
+ "/v1/auth/me",
11
+ headers={"Authorization": f"Bearer {token}"},
12
+ )
13
+ res.raise_for_status()
14
+ return res.json()
15
+
16
+
17
+ def cmd_auth_login(
18
+ api_url: str | None = None,
19
+ token: str | None = None,
20
+ json_output: bool = False,
21
+ ):
22
+ base_url = get_api_url(api_url)
23
+ token = (token or "").strip()
24
+ if not token:
25
+ saved_auth = load_auth()
26
+ saved_token = (saved_auth.get("token") or "").strip()
27
+ if not saved_token:
28
+ raise SystemExit(
29
+ "No saved Keshro session found.\n"
30
+ "Usage: keshro login <api-token>\n"
31
+ "You can create or reuse a token from Account -> API in the Keshro app."
32
+ )
33
+ try:
34
+ user = _fetch_user(base_url, saved_token)
35
+ except httpx.HTTPStatusError as exc:
36
+ if exc.response.status_code in {401, 403}:
37
+ raise SystemExit(
38
+ "Your saved Keshro session has expired.\n"
39
+ "Run: keshro login <api-token>\n"
40
+ "You can create or reuse a token from Account -> API in the Keshro app."
41
+ ) from exc
42
+ raise
43
+ if json_output:
44
+ print_output(
45
+ {"status": "ok", "user": user["email"], "detail": "already_logged_in"},
46
+ True,
47
+ )
48
+ else:
49
+ print(f"Already logged in to Keshro as {user['email']}.")
50
+ return
51
+
52
+ user = _fetch_user(base_url, token)
53
+ body = {"token": token, "user": user}
54
+ save_auth({"token": body["token"], "user": body["user"], "api_url": base_url})
55
+ if json_output:
56
+ print_output({"status": "ok", "user": body["user"]["email"]}, True)
57
+ else:
58
+ print(f"Successfully logged in to Keshro as {body['user']['email']}.")
59
+
60
+ # Auto-install the supported global integrations.
61
+ try:
62
+ from .cli import _install_claude_integration, _install_codex_integration
63
+
64
+ claude_target = _install_claude_integration()
65
+ codex_target = _install_codex_integration()
66
+ if not json_output:
67
+ print(f" ✓ Claude Code: {claude_target}")
68
+ print(f" ✓ Codex: {codex_target}")
69
+ print(
70
+ " Run `keshro setup` inside a repo if you also want Cursor repo instructions there."
71
+ )
72
+ except Exception:
73
+ pass # fail silently
74
+
75
+
76
+ def cmd_auth_logout(json_output: bool = False):
77
+ clear_auth()
78
+ if json_output:
79
+ print_output({"status": "ok", "detail": "Local auth cleared."}, True)
80
+ else:
81
+ print("Logged out of Keshro.")