oche-cli 0.0.0-stage → 0.1.2

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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -2
  3. package/dist/index.js +4825 -0
  4. package/package.json +37 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Samso9th
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 CHANGED
@@ -1,3 +1,41 @@
1
- # Temporary Holding Version
1
+ # oche-cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `oche` from your terminal. It talks to your Oche server with a token you create in the dashboard under Settings → CLI tokens. Self-hosting? Run `oche login https://your-server` once.
4
+
5
+ ```sh
6
+ npm install -g oche-cli # installs the `oche` command
7
+
8
+ oche login # paste a CLI token from ship.oche.io/settings
9
+ oche ship # commit what's changed, push, then feature → dev → staging → main
10
+ oche ship staging # stop at staging
11
+ oche ship prod --direct # dev → main, then Oche syncs staging
12
+ oche commit -a # AI commit message for your changes, then commit
13
+ oche status # repo inferred from the git remote
14
+ oche promote staging # dev → staging
15
+ oche promote prod # staging → main (asks first)
16
+ oche promote prod --direct # dev → main, then Oche syncs staging
17
+ oche mode strict --approvals 2
18
+ oche onboard # shows the plan, then sets the repo up
19
+ oche log -n 20
20
+ oche repos
21
+ ```
22
+
23
+ `oche ship` shows everything it's about to do (the commit message, the files, each merge) and asks once. Answer `e` to edit the message or `r` to have it rewritten. It stops at the first step that can't finish (a review in strict mode, or a conflict); run it again once that's sorted.
24
+
25
+ Commit messages are written by your Oche server with the model it's configured for (OpenRouter), so the CLI needs no AI key. Your staged diff goes to your server and on to OpenRouter. Pass `-m "message"` to skip AI.
26
+
27
+ ## Without a server: `oche pr`
28
+
29
+ `oche pr` works from your machine alone. It talks to OpenRouter for the commit message and to GitHub with your own token, so it needs no Oche login.
30
+
31
+ ```sh
32
+ oche ai-key # save an OpenRouter key once (or set OPENROUTER_API_KEY)
33
+ oche pr # commit everything, push this branch, open a PR into dev
34
+ oche pr --merge # …and merge it (merge commit; --squash or --rebase to change)
35
+ oche pr --merge -d # …and delete the work branch on GitHub afterwards
36
+ oche pr --base develop --draft # pick the base yourself, open as a draft
37
+ ```
38
+
39
+ It refuses to run on `main`, `master`, `staging`, `dev` or `develop`. The base defaults to `dev`, or `develop` when there's no `dev` on GitHub. A branch that isn't on GitHub yet is published. If a PR from the branch is already open, it pushes to that PR instead of opening another. The GitHub token comes from `GH_TOKEN`, `GITHUB_TOKEN` or `gh auth token`. `OCHE_AI_MODEL` overrides the model (default `anthropic/claude-haiku-4.5`; set another with `oche ai-key --model <id>`).
40
+
41
+ Read commands take `--json`. `OCHE_URL` and `OCHE_TOKEN` override the saved config.