orbi-cli 0.5.6__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 (111) hide show
  1. orbi_cli-0.5.6/LICENSE.md +96 -0
  2. orbi_cli-0.5.6/PKG-INFO +192 -0
  3. orbi_cli-0.5.6/README.md +85 -0
  4. orbi_cli-0.5.6/pyproject.toml +73 -0
  5. orbi_cli-0.5.6/setup.cfg +4 -0
  6. orbi_cli-0.5.6/src/orbi/__init__.py +21 -0
  7. orbi_cli-0.5.6/src/orbi/cli.py +856 -0
  8. orbi_cli-0.5.6/src/orbi/cli_source.py +389 -0
  9. orbi_cli-0.5.6/src/orbi/delivery_labels.py +171 -0
  10. orbi_cli-0.5.6/src/orbi/delivery_scene.py +238 -0
  11. orbi_cli-0.5.6/src/orbi/engine_source.py +464 -0
  12. orbi_cli-0.5.6/src/orbi/example_config.toml +188 -0
  13. orbi_cli-0.5.6/src/orbi/git_transport.py +293 -0
  14. orbi_cli-0.5.6/src/orbi/github.py +865 -0
  15. orbi_cli-0.5.6/src/orbi/gitops.py +329 -0
  16. orbi_cli-0.5.6/src/orbi/human_review.py +210 -0
  17. orbi_cli-0.5.6/src/orbi/journal.py +526 -0
  18. orbi_cli-0.5.6/src/orbi/launchd_deploy.py +331 -0
  19. orbi_cli-0.5.6/src/orbi/pi_activity.py +484 -0
  20. orbi_cli-0.5.6/src/orbi/pi_process.py +1620 -0
  21. orbi_cli-0.5.6/src/orbi/pi_recovery.py +487 -0
  22. orbi_cli-0.5.6/src/orbi/pilot_setup.py +1252 -0
  23. orbi_cli-0.5.6/src/orbi/pilot_slots.py +210 -0
  24. orbi_cli-0.5.6/src/orbi/progress.py +644 -0
  25. orbi_cli-0.5.6/src/orbi/release.py +2329 -0
  26. orbi_cli-0.5.6/src/orbi/repo_config.py +449 -0
  27. orbi_cli-0.5.6/src/orbi/runner.py +8873 -0
  28. orbi_cli-0.5.6/src/orbi/runner_health.py +747 -0
  29. orbi_cli-0.5.6/src/orbi/scene.py +226 -0
  30. orbi_cli-0.5.6/src/orbi/scheduler.py +527 -0
  31. orbi_cli-0.5.6/src/orbi/systemd_deploy.py +361 -0
  32. orbi_cli-0.5.6/src/orbi_cli.egg-info/PKG-INFO +192 -0
  33. orbi_cli-0.5.6/src/orbi_cli.egg-info/SOURCES.txt +109 -0
  34. orbi_cli-0.5.6/src/orbi_cli.egg-info/dependency_links.txt +1 -0
  35. orbi_cli-0.5.6/src/orbi_cli.egg-info/entry_points.txt +2 -0
  36. orbi_cli-0.5.6/src/orbi_cli.egg-info/top_level.txt +1 -0
  37. orbi_cli-0.5.6/tests/test_agents_md.py +166 -0
  38. orbi_cli-0.5.6/tests/test_apply_label_patch.py +120 -0
  39. orbi_cli-0.5.6/tests/test_bootstrap_runner.py +21453 -0
  40. orbi_cli-0.5.6/tests/test_ci_failure_issue_workflow.py +175 -0
  41. orbi_cli-0.5.6/tests/test_ci_failure_triage.py +1576 -0
  42. orbi_cli-0.5.6/tests/test_ci_workflow.py +454 -0
  43. orbi_cli-0.5.6/tests/test_cli_install.py +505 -0
  44. orbi_cli-0.5.6/tests/test_cli_packaging.py +865 -0
  45. orbi_cli-0.5.6/tests/test_cli_source.py +308 -0
  46. orbi_cli-0.5.6/tests/test_concurrency_e2e.py +1793 -0
  47. orbi_cli-0.5.6/tests/test_constitution.py +49 -0
  48. orbi_cli-0.5.6/tests/test_coverage_gate.py +794 -0
  49. orbi_cli-0.5.6/tests/test_delivery_labels.py +325 -0
  50. orbi_cli-0.5.6/tests/test_delivery_scene.py +419 -0
  51. orbi_cli-0.5.6/tests/test_docs_i18n.py +599 -0
  52. orbi_cli-0.5.6/tests/test_docs_labels.py +261 -0
  53. orbi_cli-0.5.6/tests/test_docs_mermaid.py +144 -0
  54. orbi_cli-0.5.6/tests/test_docs_releases.py +216 -0
  55. orbi_cli-0.5.6/tests/test_docs_single_source.py +163 -0
  56. orbi_cli-0.5.6/tests/test_docs_site.py +927 -0
  57. orbi_cli-0.5.6/tests/test_engine_source.py +514 -0
  58. orbi_cli-0.5.6/tests/test_fix_needed_loop.py +1665 -0
  59. orbi_cli-0.5.6/tests/test_gh_read_retry.py +258 -0
  60. orbi_cli-0.5.6/tests/test_git_base_smoke.py +228 -0
  61. orbi_cli-0.5.6/tests/test_git_merge_smoke.py +275 -0
  62. orbi_cli-0.5.6/tests/test_git_network_retry.py +133 -0
  63. orbi_cli-0.5.6/tests/test_git_transport.py +804 -0
  64. orbi_cli-0.5.6/tests/test_github.py +598 -0
  65. orbi_cli-0.5.6/tests/test_github_fakes.py +468 -0
  66. orbi_cli-0.5.6/tests/test_gitops.py +249 -0
  67. orbi_cli-0.5.6/tests/test_gitops_fakes.py +297 -0
  68. orbi_cli-0.5.6/tests/test_human_review.py +381 -0
  69. orbi_cli-0.5.6/tests/test_install_sh.py +182 -0
  70. orbi_cli-0.5.6/tests/test_issue_461.py +107 -0
  71. orbi_cli-0.5.6/tests/test_journal.py +184 -0
  72. orbi_cli-0.5.6/tests/test_journal_events.py +493 -0
  73. orbi_cli-0.5.6/tests/test_launchd_deploy.py +583 -0
  74. orbi_cli-0.5.6/tests/test_license.py +98 -0
  75. orbi_cli-0.5.6/tests/test_ops_e2e.py +485 -0
  76. orbi_cli-0.5.6/tests/test_orbi.py +2007 -0
  77. orbi_cli-0.5.6/tests/test_orbi_dashboard.py +202 -0
  78. orbi_cli-0.5.6/tests/test_orbi_exporter.py +786 -0
  79. orbi_cli-0.5.6/tests/test_patch_ratchet.py +201 -0
  80. orbi_cli-0.5.6/tests/test_pi_activity.py +1066 -0
  81. orbi_cli-0.5.6/tests/test_pi_extensions.py +88 -0
  82. orbi_cli-0.5.6/tests/test_pi_provider_templates.py +63 -0
  83. orbi_cli-0.5.6/tests/test_pi_recovery.py +1080 -0
  84. orbi_cli-0.5.6/tests/test_pilot_setup.py +2084 -0
  85. orbi_cli-0.5.6/tests/test_pilot_slots.py +599 -0
  86. orbi_cli-0.5.6/tests/test_pr_issue_link_workflow.py +52 -0
  87. orbi_cli-0.5.6/tests/test_prerequisite_check.py +479 -0
  88. orbi_cli-0.5.6/tests/test_progress.py +950 -0
  89. orbi_cli-0.5.6/tests/test_progress_wiring.py +2470 -0
  90. orbi_cli-0.5.6/tests/test_prompt_contract.py +581 -0
  91. orbi_cli-0.5.6/tests/test_publish_workflow.py +240 -0
  92. orbi_cli-0.5.6/tests/test_readme_homepage.py +302 -0
  93. orbi_cli-0.5.6/tests/test_release_ticket_templates.py +146 -0
  94. orbi_cli-0.5.6/tests/test_release_v01.py +174 -0
  95. orbi_cli-0.5.6/tests/test_repo_config.py +1052 -0
  96. orbi_cli-0.5.6/tests/test_resume_continue_e2e.py +646 -0
  97. orbi_cli-0.5.6/tests/test_resume_e2e.py +972 -0
  98. orbi_cli-0.5.6/tests/test_resume_pr.py +2950 -0
  99. orbi_cli-0.5.6/tests/test_review_merge.py +2973 -0
  100. orbi_cli-0.5.6/tests/test_run_artifacts.py +261 -0
  101. orbi_cli-0.5.6/tests/test_run_id_e2e.py +684 -0
  102. orbi_cli-0.5.6/tests/test_runner_config.py +1023 -0
  103. orbi_cli-0.5.6/tests/test_runner_health.py +1306 -0
  104. orbi_cli-0.5.6/tests/test_runner_source_freshness.py +554 -0
  105. orbi_cli-0.5.6/tests/test_scene.py +326 -0
  106. orbi_cli-0.5.6/tests/test_scheduler.py +339 -0
  107. orbi_cli-0.5.6/tests/test_src_layout.py +209 -0
  108. orbi_cli-0.5.6/tests/test_systemd_deploy.py +990 -0
  109. orbi_cli-0.5.6/tests/test_systemd_timer.py +432 -0
  110. orbi_cli-0.5.6/tests/test_user_acceptance_contract.py +65 -0
  111. orbi_cli-0.5.6/tests/test_worktree_reclaim.py +452 -0
@@ -0,0 +1,96 @@
1
+ # License
2
+
3
+ Copyright 2026 xqliu
4
+
5
+ Orbi is [fair-code](https://faircode.io) distributed under the **Sustainable Use
6
+ License** (v1.0), reproduced in full below.
7
+
8
+ ## What this means in practice
9
+
10
+ - **Running Orbi on your own repositories is free, forever** — for yourself, and
11
+ inside a company of any size. Modify it, self-host it, run it on a thousand
12
+ repos; none of that needs a licence from us.
13
+ - **You may share it**, as long as you do so free of charge and for
14
+ non-commercial purposes.
15
+ - **You need a commercial licence only if you sell Orbi itself** — hosting it as
16
+ a service for your own customers, or embedding it in a product you charge for.
17
+
18
+ If you are unsure which side of that line your use falls on, open a discussion at
19
+ https://github.com/orbi-build/orbi/discussions and we will answer plainly.
20
+
21
+ The summary above is a convenience, not a substitute. The licence text below is
22
+ what governs.
23
+
24
+ ## Sustainable Use License
25
+
26
+ Version 1.0
27
+
28
+ ### Acceptance
29
+
30
+ By using the software, you agree to all of the terms and conditions below.
31
+
32
+ ### Copyright License
33
+
34
+ The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license
35
+ to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject
36
+ to the limitations below.
37
+
38
+ ### Limitations
39
+
40
+ You may use or modify the software only for your own internal business purposes or for non-commercial or
41
+ personal use. You may distribute the software or provide it to others only if you do so free of charge for
42
+ non-commercial purposes. You may not alter, remove, or obscure any licensing, copyright, or other notices of
43
+ the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
44
+
45
+ ### Patents
46
+
47
+ The licensor grants you a license, under any patent claims the licensor can license, or becomes able to
48
+ license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case
49
+ subject to the limitations and conditions in this license. This license does not cover any patent claims that
50
+ you cause to be infringed by modifications or additions to the software. If you or your company make any
51
+ written claim that the software infringes or contributes to infringement of any patent, your patent license
52
+ for the software granted under these terms ends immediately. If your company makes such a claim, your patent
53
+ license ends immediately for work on behalf of your company.
54
+
55
+ ### Notices
56
+
57
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these
58
+ terms. If you modify the software, you must include in any modified copies of the software a prominent notice
59
+ stating that you have modified the software.
60
+
61
+ ### No Other Rights
62
+
63
+ These terms do not imply any licenses other than those expressly granted in these terms.
64
+
65
+ ### Termination
66
+
67
+ If you use the software in violation of these terms, such use is not licensed, and your license will
68
+ automatically terminate. If the licensor provides you with a notice of your violation, and you cease all
69
+ violation of this license no later than 30 days after you receive that notice, your license will be reinstated
70
+ retroactively. However, if you violate these terms after such reinstatement, any additional violation of these
71
+ terms will cause your license to terminate automatically and permanently.
72
+
73
+ ### No Liability
74
+
75
+ As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will
76
+ not be liable to you for any damages arising out of these terms or the use or nature of the software, under
77
+ any kind of legal claim.
78
+
79
+ ### Definitions
80
+
81
+ The “licensor” is the entity offering these terms.
82
+
83
+ The “software” is the software the licensor makes available under these terms, including any portion of it.
84
+
85
+ “You” refers to the individual or entity agreeing to these terms.
86
+
87
+ “Your company” is any legal entity, sole proprietorship, or other kind of organization that you work for, plus
88
+ all organizations that have control over, are under the control of, or are under common control with that
89
+ organization. Control means ownership of substantially all the assets of an entity, or the power to direct its
90
+ management and policies by vote, contract, or otherwise. Control can be direct or indirect.
91
+
92
+ “Your license” is the license granted to you for the software under these terms.
93
+
94
+ “Use” means anything you do with the software requiring your license.
95
+
96
+ “Trademark” means trademarks, service marks, and similar rights.
@@ -0,0 +1,192 @@
1
+ Metadata-Version: 2.4
2
+ Name: orbi-cli
3
+ Version: 0.5.6
4
+ Summary: Orbi — local AI development worker: claims GitHub Issues, runs Pi in isolated worktrees, and delivers PRs (GitHub Issues + labels are the only state store).
5
+ Author: xqliu
6
+ License: # License
7
+
8
+ Copyright 2026 xqliu
9
+
10
+ Orbi is [fair-code](https://faircode.io) distributed under the **Sustainable Use
11
+ License** (v1.0), reproduced in full below.
12
+
13
+ ## What this means in practice
14
+
15
+ - **Running Orbi on your own repositories is free, forever** — for yourself, and
16
+ inside a company of any size. Modify it, self-host it, run it on a thousand
17
+ repos; none of that needs a licence from us.
18
+ - **You may share it**, as long as you do so free of charge and for
19
+ non-commercial purposes.
20
+ - **You need a commercial licence only if you sell Orbi itself** — hosting it as
21
+ a service for your own customers, or embedding it in a product you charge for.
22
+
23
+ If you are unsure which side of that line your use falls on, open a discussion at
24
+ https://github.com/orbi-build/orbi/discussions and we will answer plainly.
25
+
26
+ The summary above is a convenience, not a substitute. The licence text below is
27
+ what governs.
28
+
29
+ ## Sustainable Use License
30
+
31
+ Version 1.0
32
+
33
+ ### Acceptance
34
+
35
+ By using the software, you agree to all of the terms and conditions below.
36
+
37
+ ### Copyright License
38
+
39
+ The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license
40
+ to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject
41
+ to the limitations below.
42
+
43
+ ### Limitations
44
+
45
+ You may use or modify the software only for your own internal business purposes or for non-commercial or
46
+ personal use. You may distribute the software or provide it to others only if you do so free of charge for
47
+ non-commercial purposes. You may not alter, remove, or obscure any licensing, copyright, or other notices of
48
+ the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
49
+
50
+ ### Patents
51
+
52
+ The licensor grants you a license, under any patent claims the licensor can license, or becomes able to
53
+ license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case
54
+ subject to the limitations and conditions in this license. This license does not cover any patent claims that
55
+ you cause to be infringed by modifications or additions to the software. If you or your company make any
56
+ written claim that the software infringes or contributes to infringement of any patent, your patent license
57
+ for the software granted under these terms ends immediately. If your company makes such a claim, your patent
58
+ license ends immediately for work on behalf of your company.
59
+
60
+ ### Notices
61
+
62
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these
63
+ terms. If you modify the software, you must include in any modified copies of the software a prominent notice
64
+ stating that you have modified the software.
65
+
66
+ ### No Other Rights
67
+
68
+ These terms do not imply any licenses other than those expressly granted in these terms.
69
+
70
+ ### Termination
71
+
72
+ If you use the software in violation of these terms, such use is not licensed, and your license will
73
+ automatically terminate. If the licensor provides you with a notice of your violation, and you cease all
74
+ violation of this license no later than 30 days after you receive that notice, your license will be reinstated
75
+ retroactively. However, if you violate these terms after such reinstatement, any additional violation of these
76
+ terms will cause your license to terminate automatically and permanently.
77
+
78
+ ### No Liability
79
+
80
+ As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will
81
+ not be liable to you for any damages arising out of these terms or the use or nature of the software, under
82
+ any kind of legal claim.
83
+
84
+ ### Definitions
85
+
86
+ The “licensor” is the entity offering these terms.
87
+
88
+ The “software” is the software the licensor makes available under these terms, including any portion of it.
89
+
90
+ “You” refers to the individual or entity agreeing to these terms.
91
+
92
+ “Your company” is any legal entity, sole proprietorship, or other kind of organization that you work for, plus
93
+ all organizations that have control over, are under the control of, or are under common control with that
94
+ organization. Control means ownership of substantially all the assets of an entity, or the power to direct its
95
+ management and policies by vote, contract, or otherwise. Control can be direct or indirect.
96
+
97
+ “Your license” is the license granted to you for the software under these terms.
98
+
99
+ “Use” means anything you do with the software requiring your license.
100
+
101
+ “Trademark” means trademarks, service marks, and similar rights.
102
+
103
+ Requires-Python: >=3.14
104
+ Description-Content-Type: text/markdown
105
+ License-File: LICENSE.md
106
+ Dynamic: license-file
107
+
108
+ English | [简体中文](README.zh-CN.md)
109
+
110
+ # Orbi
111
+
112
+ Orbi is a local AI development Worker: put work in a GitHub Issue, and it automatically claims the Issue, starts Pi in an isolated worktree to develop and test it, creates a PR, and then passes it through independent review and merge gates. GitHub Issues and labels are the only state store—there is no database, queue, or daemon.
113
+
114
+ - Website <https://orbi.build> | Documentation <https://docs.orbi.build/> (the repository's [`docs/`](docs/) is the single source of truth; the Chinese entry point is [`docs/zh/`](docs/zh/)) | Updates [@xqliu](https://x.com/xqliu)
115
+ - **[Join the first group of contributors](https://orbi.build/apply)**: if you are stuck on the environment, model integration, or workflow, we can help you run your first Issue. The problems you encounter become Issues to prioritize.
116
+
117
+ ## Why Orbi
118
+
119
+ - **GitHub Issues are the task pool**: the `ai-ready` label dispatches work, and the delivery record (comments, PRs, and CI) is complete by default, with no second task system;
120
+ - **Fully automated**: a user scheduler timer (systemd on Linux, launchd on macOS) triggers a tick every 5 minutes. Normal operation needs no status command, polling, or supervision;
121
+ - **Independent review + merge gates**: after a PR opens, an independent review session reviews it and fixes findings in the same session. Only the reviewed head can merge, and AI never merges or pushes protected branches;
122
+ - **Fail fast**: command errors fail immediately and leave the evidence in the logs. The Issue is marked `ai-blocked` for a human decision, with no silent fallback;
123
+ - **Observable end to end**: every journal log and GitHub progress comment carries the same `run_id`, so the complete timeline can be reconstructed with one grep.
124
+
125
+ ## Quick start
126
+
127
+ ```bash
128
+ git clone https://github.com/orbi-build/orbi.git && cd orbi
129
+ uv tool install --force --reinstall --editable --python python3 . # compatible system Python (>= 3.14, e.g. Fedora 43 / current Arch); older system Python (e.g. Ubuntu 24.04 ships 3.12): --python 3.14 so uv provisions it
130
+ ```
131
+
132
+ Want just the CLI? The PyPI distribution is `orbi-cli` (Issue #874; the installed command stays `orbi`), but it is not on PyPI yet ([Issue #852](https://github.com/orbi-build/orbi/issues/852)) — the one-line installer at the top of [Getting started](docs/getting-started.mdx) is the shortest supported install.
133
+
134
+ ### Ready check (before setup)
135
+
136
+ - `uv`: `uv --version`; Pi and its provider: `pi --version`, then `pi --print "reply with the single word: ok"`
137
+ - GitHub CLI ≥ 2.94 ([official repository](https://github.com/cli/cli/blob/trunk/docs/install_linux.md) — Ubuntu 24.04's package 2.45.0 is too old): run `gh auth login` once, then verify `gh auth status`
138
+ - Linux — systemd user session: `systemctl --user status`
139
+ - macOS — launchd GUI session: `launchctl print gui/$(id -u)` (not yet verified on real hardware; reports welcome)
140
+
141
+ Choose the mode in [Getting started](docs/getting-started.mdx): bootstrap uses this checkout as `repo_dir`; [External single-repo mode](docs/getting-started.mdx#external-single-repo-mode-deploy_home) uses it as `deploy_home` and a foreign repository as `repo_dir`.
142
+
143
+ ```bash
144
+ cp src/orbi/example_config.toml orbi.toml
145
+ orbi setup --config orbi.toml # 4. run one-time setup (checks prior gh auth, labels, scheduler units (systemd/launchd), and checkout; idempotent)
146
+ PYTHONPATH=src python3 -m orbi.runner --config orbi.toml # 5. manually run one tick (for initial verification; the timer schedules normal runs)
147
+ orbi doctor --config orbi.toml # 6. verify deployment health
148
+ ```
149
+
150
+ ## What it does
151
+
152
+ ```text
153
+ GitHub Issue (ai-ready)
154
+ → Claim: create a feature branch + isolated worktree (from the frozen origin/main SHA)
155
+ → Pi development: plan → implement → test → verify
156
+ → Commit delivery (the Agent stops at the commit)
157
+ → Runner closeout: sync the latest base, push, and create a PR (body includes Fixes #N)
158
+ → Independent review (fixes in the same session) → merge gate → merge
159
+ ```
160
+
161
+ - Each task gets its own run: the branch, worktree, logs, and PR are all associated with the same `run_id`; retries create a new run and preserve the old evidence unchanged;
162
+ - Failures are classified clearly: recoverable failures return to the same PR for continued fixes, while unrecoverable failures mark the Issue `ai-blocked` for a human;
163
+ - Supports `orbi add` for dispatching work, `status` for viewing the queue, `session` for following the Pi session, `install-units` for idempotently installing the scheduler units (systemd on Linux, launchd on macOS), and `doctor` for read-only diagnostics.
164
+
165
+ ## Documentation
166
+
167
+ | Topic | Entry point |
168
+ |---|---|
169
+ | Documentation home | <https://docs.orbi.build/> |
170
+ | Getting started (prerequisites, configuration, first run, smoke test) | [Getting started](docs/getting-started.mdx) |
171
+ | One-time setup (labels, units, transport migration) | [One-time setup](docs/setup.mdx) |
172
+ | Workflow (state chain, labels, P0, Epic, Release) | [Workflow](docs/workflow.mdx) |
173
+ | Operations (timer, journal, unit drift, recovery) | [Operations](docs/operations.mdx) |
174
+ | Testing, coverage gates, and remote CI | [Testing](docs/testing.mdx) |
175
+ | Contributing (Issue granularity, KISS/LEAN, PR flow) | [Contributing](docs/contributing.mdx) |
176
+ | Chinese documentation | [docs/zh/](docs/zh/) |
177
+
178
+ ## Development and contribution
179
+
180
+ See the development contract in [AGENTS.md](AGENTS.md), and [Contributing](docs/contributing.mdx) for dispatching Issues, reporting bugs, and submitting PRs. Runtime code lives in the `src/orbi/` package (Issue #168 src layout; the editable finder maps the entire package directory, so new modules need no reinstall). The checkout root has no `orbi.py` (to avoid shadowing the installed package); the direct-execution compatibility entry point is `python3 -m orbi.cli`, not the formal usage path.
181
+
182
+ ## License
183
+
184
+ This project is [fair-code](https://faircode.io), released under the **Sustainable Use License** (v1.0). See the complete text in [LICENSE.md](LICENSE.md) at the repository root.
185
+
186
+ In practice:
187
+
188
+ - **Run Orbi on your own repositories for free forever**—for personal use and internal company use alike, at any scale. You can modify the code, self-host it, and run it across a thousand repositories without requesting authorization.
189
+ - **You may share it**, provided that it is free and used for non-commercial purposes.
190
+ - **Commercial authorization is required only when you sell Orbi itself**—for example, hosting it as a service for customers or embedding it in a paid product.
191
+
192
+ If you are unsure which side your use falls on, ask in [Discussions](https://github.com/orbi-build/orbi/discussions); we will give you a clear answer.
@@ -0,0 +1,85 @@
1
+ English | [简体中文](README.zh-CN.md)
2
+
3
+ # Orbi
4
+
5
+ Orbi is a local AI development Worker: put work in a GitHub Issue, and it automatically claims the Issue, starts Pi in an isolated worktree to develop and test it, creates a PR, and then passes it through independent review and merge gates. GitHub Issues and labels are the only state store—there is no database, queue, or daemon.
6
+
7
+ - Website <https://orbi.build> | Documentation <https://docs.orbi.build/> (the repository's [`docs/`](docs/) is the single source of truth; the Chinese entry point is [`docs/zh/`](docs/zh/)) | Updates [@xqliu](https://x.com/xqliu)
8
+ - **[Join the first group of contributors](https://orbi.build/apply)**: if you are stuck on the environment, model integration, or workflow, we can help you run your first Issue. The problems you encounter become Issues to prioritize.
9
+
10
+ ## Why Orbi
11
+
12
+ - **GitHub Issues are the task pool**: the `ai-ready` label dispatches work, and the delivery record (comments, PRs, and CI) is complete by default, with no second task system;
13
+ - **Fully automated**: a user scheduler timer (systemd on Linux, launchd on macOS) triggers a tick every 5 minutes. Normal operation needs no status command, polling, or supervision;
14
+ - **Independent review + merge gates**: after a PR opens, an independent review session reviews it and fixes findings in the same session. Only the reviewed head can merge, and AI never merges or pushes protected branches;
15
+ - **Fail fast**: command errors fail immediately and leave the evidence in the logs. The Issue is marked `ai-blocked` for a human decision, with no silent fallback;
16
+ - **Observable end to end**: every journal log and GitHub progress comment carries the same `run_id`, so the complete timeline can be reconstructed with one grep.
17
+
18
+ ## Quick start
19
+
20
+ ```bash
21
+ git clone https://github.com/orbi-build/orbi.git && cd orbi
22
+ uv tool install --force --reinstall --editable --python python3 . # compatible system Python (>= 3.14, e.g. Fedora 43 / current Arch); older system Python (e.g. Ubuntu 24.04 ships 3.12): --python 3.14 so uv provisions it
23
+ ```
24
+
25
+ Want just the CLI? The PyPI distribution is `orbi-cli` (Issue #874; the installed command stays `orbi`), but it is not on PyPI yet ([Issue #852](https://github.com/orbi-build/orbi/issues/852)) — the one-line installer at the top of [Getting started](docs/getting-started.mdx) is the shortest supported install.
26
+
27
+ ### Ready check (before setup)
28
+
29
+ - `uv`: `uv --version`; Pi and its provider: `pi --version`, then `pi --print "reply with the single word: ok"`
30
+ - GitHub CLI ≥ 2.94 ([official repository](https://github.com/cli/cli/blob/trunk/docs/install_linux.md) — Ubuntu 24.04's package 2.45.0 is too old): run `gh auth login` once, then verify `gh auth status`
31
+ - Linux — systemd user session: `systemctl --user status`
32
+ - macOS — launchd GUI session: `launchctl print gui/$(id -u)` (not yet verified on real hardware; reports welcome)
33
+
34
+ Choose the mode in [Getting started](docs/getting-started.mdx): bootstrap uses this checkout as `repo_dir`; [External single-repo mode](docs/getting-started.mdx#external-single-repo-mode-deploy_home) uses it as `deploy_home` and a foreign repository as `repo_dir`.
35
+
36
+ ```bash
37
+ cp src/orbi/example_config.toml orbi.toml
38
+ orbi setup --config orbi.toml # 4. run one-time setup (checks prior gh auth, labels, scheduler units (systemd/launchd), and checkout; idempotent)
39
+ PYTHONPATH=src python3 -m orbi.runner --config orbi.toml # 5. manually run one tick (for initial verification; the timer schedules normal runs)
40
+ orbi doctor --config orbi.toml # 6. verify deployment health
41
+ ```
42
+
43
+ ## What it does
44
+
45
+ ```text
46
+ GitHub Issue (ai-ready)
47
+ → Claim: create a feature branch + isolated worktree (from the frozen origin/main SHA)
48
+ → Pi development: plan → implement → test → verify
49
+ → Commit delivery (the Agent stops at the commit)
50
+ → Runner closeout: sync the latest base, push, and create a PR (body includes Fixes #N)
51
+ → Independent review (fixes in the same session) → merge gate → merge
52
+ ```
53
+
54
+ - Each task gets its own run: the branch, worktree, logs, and PR are all associated with the same `run_id`; retries create a new run and preserve the old evidence unchanged;
55
+ - Failures are classified clearly: recoverable failures return to the same PR for continued fixes, while unrecoverable failures mark the Issue `ai-blocked` for a human;
56
+ - Supports `orbi add` for dispatching work, `status` for viewing the queue, `session` for following the Pi session, `install-units` for idempotently installing the scheduler units (systemd on Linux, launchd on macOS), and `doctor` for read-only diagnostics.
57
+
58
+ ## Documentation
59
+
60
+ | Topic | Entry point |
61
+ |---|---|
62
+ | Documentation home | <https://docs.orbi.build/> |
63
+ | Getting started (prerequisites, configuration, first run, smoke test) | [Getting started](docs/getting-started.mdx) |
64
+ | One-time setup (labels, units, transport migration) | [One-time setup](docs/setup.mdx) |
65
+ | Workflow (state chain, labels, P0, Epic, Release) | [Workflow](docs/workflow.mdx) |
66
+ | Operations (timer, journal, unit drift, recovery) | [Operations](docs/operations.mdx) |
67
+ | Testing, coverage gates, and remote CI | [Testing](docs/testing.mdx) |
68
+ | Contributing (Issue granularity, KISS/LEAN, PR flow) | [Contributing](docs/contributing.mdx) |
69
+ | Chinese documentation | [docs/zh/](docs/zh/) |
70
+
71
+ ## Development and contribution
72
+
73
+ See the development contract in [AGENTS.md](AGENTS.md), and [Contributing](docs/contributing.mdx) for dispatching Issues, reporting bugs, and submitting PRs. Runtime code lives in the `src/orbi/` package (Issue #168 src layout; the editable finder maps the entire package directory, so new modules need no reinstall). The checkout root has no `orbi.py` (to avoid shadowing the installed package); the direct-execution compatibility entry point is `python3 -m orbi.cli`, not the formal usage path.
74
+
75
+ ## License
76
+
77
+ This project is [fair-code](https://faircode.io), released under the **Sustainable Use License** (v1.0). See the complete text in [LICENSE.md](LICENSE.md) at the repository root.
78
+
79
+ In practice:
80
+
81
+ - **Run Orbi on your own repositories for free forever**—for personal use and internal company use alike, at any scale. You can modify the code, self-host it, and run it across a thousand repositories without requesting authorization.
82
+ - **You may share it**, provided that it is free and used for non-commercial purposes.
83
+ - **Commercial authorization is required only when you sell Orbi itself**—for example, hosting it as a service for customers or embedding it in a paid product.
84
+
85
+ If you are unsure which side your use falls on, ask in [Discussions](https://github.com/orbi-build/orbi/discussions); we will give you a clear answer.
@@ -0,0 +1,73 @@
1
+ # Standard Python packaging for the Orbi CLI (Issue #140).
2
+ #
3
+ # Rebrand (Issues #183 + #246): the product brand is Orbi (GitHub
4
+ # orbi-build/orbi, docs.orbi.build). PyPI distribution rename (Issue
5
+ # #874): the released distribution is the approved `orbi-cli` name
6
+ # (artifact filenames normalize to `orbi_cli_<version>`); the `orbi`
7
+ # console script below is UNCHANGED — no old-name alias package exists.
8
+ #
9
+ # The official usage is the installed console script, installed as an
10
+ # EDITABLE uv tool (Issue #152): the tool env imports the `orbi`
11
+ # package directly from the deployment checkout, so the ExecStartPre
12
+ # checkout sync is picked up by the next CLI process automatically (no
13
+ # per-version reinstall):
14
+ #
15
+ # uv tool install --force --reinstall --editable \
16
+ # --python <interpreter> <this repo>
17
+ # orbi --help
18
+ #
19
+ # (<interpreter>, Issue #861: the system `python3` when it satisfies
20
+ # this file's `requires-python` floor, otherwise the bare `3.14` so
21
+ # uv provisions or selects a compatible interpreter — a hard pin to a
22
+ # system interpreter below the floor, e.g. Ubuntu 24.04's 3.12, fails.)
23
+ # src layout (Issue #168): the runtime code lives in `src/orbi/`
24
+ # and setuptools discovers the package automatically (no hand-maintained
25
+ # module list). The editable finder maps the WHOLE package directory, so
26
+ # a newly added package module is importable by the next CLI process
27
+ # without regenerating any module list (the #158 stale-finder root
28
+ # cause). The checkout root carries NO `orbi.py` — a flat file
29
+ # named like the package would shadow it for every process with the
30
+ # checkout root on sys.path; the direct-execution compatibility entry is
31
+ # `python3 -m orbi.cli` (the exact same code as the console
32
+ # script).
33
+ #
34
+ # The release package is machine-independent: no third-party runtime
35
+ # dependency (the bootstrap intentionally has none), no token, no user
36
+ # directory — the config file (orbi.toml) and the user systemd
37
+ # dir stay machine-local.
38
+
39
+ [build-system]
40
+ requires = ["setuptools>=64"]
41
+ build-backend = "setuptools.build_meta"
42
+
43
+ [project]
44
+ name = "orbi-cli"
45
+ version = "0.5.6"
46
+ description = "Orbi — local AI development worker: claims GitHub Issues, runs Pi in isolated worktrees, and delivers PRs (GitHub Issues + labels are the only state store)."
47
+ readme = "README.md"
48
+ requires-python = ">=3.14"
49
+ license = { file = "LICENSE.md" }
50
+ authors = [{ name = "xqliu" }]
51
+ dependencies = []
52
+
53
+ [project.scripts]
54
+ orbi = "orbi.cli:main"
55
+
56
+ # src layout: setuptools discovers the `orbi` package under
57
+ # `src/` automatically (Issue #168) — the old hand-maintained
58
+ # `py-modules` list is gone with it.
59
+ [tool.setuptools.packages.find]
60
+ where = ["src"]
61
+
62
+ # Issue #163: the example config ships INSIDE the wheel/sdist so a PyPI
63
+ # install can create an orbi.toml without any checkout-adjacent file
64
+ # (pilot_setup.ensure_config falls back to it).
65
+ [tool.setuptools.package-data]
66
+ orbi = ["example_config.toml"]
67
+
68
+ # The contract test command (`python3 -m coverage run --branch -m pytest
69
+ # tests/ -q`) runs WITHOUT installing the package: pytest puts `src/` on
70
+ # sys.path so the suite imports `orbi.*` straight from the
71
+ # checkout (Issue #168).
72
+ [tool.pytest.ini_options]
73
+ pythonpath = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,21 @@
1
+ """Orbi runtime package.
2
+
3
+ Standard src layout: the uv editable install maps this WHOLE package
4
+ directory onto the deployment checkout, so a newly added module in this
5
+ package is importable by the next CLI process without regenerating any
6
+ module list (the #158 stale-finder root cause).
7
+
8
+ The runtime entry points:
9
+
10
+ - `orbi.cli` — the `orbi` console script target
11
+ (`orbi = "orbi.cli:main"` in pyproject.toml);
12
+ - `orbi.runner` — the Runner tick (`python3 -m
13
+ orbi.runner --config ...`), the systemd ExecStart target
14
+ through the installed console script.
15
+
16
+ The checkout root carries NO `orbi.py`: a flat file named like
17
+ the package would shadow the installed package for every process with
18
+ the checkout root on sys.path. The direct-execution compatibility entry
19
+ is `python3 -m orbi.cli` (development path only).
20
+ """
21
+ __version__ = "0.5.6"