oche-cli 0.0.0-stage → 0.1.0
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.
- package/README.md +40 -2
- package/dist/index.js +4787 -0
- package/package.json +36 -4
package/README.md
CHANGED
|
@@ -1,3 +1,41 @@
|
|
|
1
|
-
#
|
|
1
|
+
# oche-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`oche` from your terminal. It talks to your Oche server with a token you create in the dashboard under Settings → CLI tokens.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install && npm run build && npm link # installs the `oche` command
|
|
7
|
+
|
|
8
|
+
oche login https://deploy.oche.io
|
|
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.
|