@lapius/bin-cli 0.1.0 → 0.2.1

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 (2) hide show
  1. package/README.md +21 -0
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -53,6 +53,27 @@ bin sync # pull してから、手元の変更があれば pu
53
53
 
54
54
  git でも取得できる(読み取り専用): `git clone https://bin.lapius7.com/<id>.git`。非公開のGistはパスワードにAPIトークン。
55
55
 
56
+ ### git と同じ操作感で使う(`bin g`)
57
+
58
+ `bin g <gitのサブコマンド>` で、git とほぼ同じ引数・出力のまま Gist を扱える(既存の `bin status` などはそのまま)。
59
+ origin=Gist、ブランチは `main` だけ。コミットは手元(`.lapbin/`)に貯まり、`push` の時に1コミット=1リビジョンとして保存される。
60
+
61
+ ```bash
62
+ bin g clone https://bin.lapius7.com/<id>.git && cd <id>
63
+ bin g status -sb
64
+ bin g add -A && bin g commit -m "fix" # -am、--amend(未pushのみ)、-m なしでエディタも可
65
+ bin g log --oneline --stat -5 # Gistのリビジョンもコミットとして並ぶ
66
+ bin g diff --cached / bin g diff HEAD~2 --stat / bin g show HEAD:main.py
67
+ bin g pull # 未pushのコミットはGist側の変更の上に積み直す
68
+ bin g push # Gist側が先に進んでいたら拒否(-f で上書き)
69
+
70
+ bin g init my-snippets && cd my-snippets # 新規: 最初の push で限定公開のGistを作成(--public/--private)
71
+ ```
72
+
73
+ 対応: `init clone status add rm mv restore checkout switch reset commit log show diff fetch pull push remote branch stash rev-parse ls-files clean`。
74
+ `git config` の alias(例: `alias.st=status` → `bin g st`)、`-C <dir>`、`--no-pager`、ページャ(`GIT_PAGER`/`PAGER`)、ルートの `.gitignore` にも対応。
75
+ merge・rebase・tag などGistに無い概念は使えない(Gistのタグは `bin tag`)。
76
+
56
77
  ### APIトークン(CI・スクリプト用)
57
78
 
58
79
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lapius/bin-cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "bin.lapius7.com(LapBin)の CLI クライアント",
5
5
  "keywords": [
6
6
  "cli",
@@ -30,10 +30,10 @@
30
30
  "arm64"
31
31
  ],
32
32
  "optionalDependencies": {
33
- "@lapius/bin-cli-linux-x64": "0.1.0",
34
- "@lapius/bin-cli-linux-arm64": "0.1.0",
35
- "@lapius/bin-cli-darwin-x64": "0.1.0",
36
- "@lapius/bin-cli-darwin-arm64": "0.1.0",
37
- "@lapius/bin-cli-win32-x64": "0.1.0"
33
+ "@lapius/bin-cli-linux-x64": "0.2.1",
34
+ "@lapius/bin-cli-linux-arm64": "0.2.1",
35
+ "@lapius/bin-cli-darwin-x64": "0.2.1",
36
+ "@lapius/bin-cli-darwin-arm64": "0.2.1",
37
+ "@lapius/bin-cli-win32-x64": "0.2.1"
38
38
  }
39
39
  }