midsummer-sol 0.1.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.
- package/README.md +99 -0
- package/index.js +2035 -0
- package/package.json +39 -0
- package/sol-mcp.js +638 -0
- package/sol.js +3518 -0
package/README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Sol
|
|
2
|
+
|
|
3
|
+
**Sol is an agent-native version control system — a new `git`.** It keeps the
|
|
4
|
+
shape you already know (`commit`, `branch`, `switch`, `merge`, `diff`,
|
|
5
|
+
`clone`/`push`/`pull`) and adds what `git` structurally can't: every edit is
|
|
6
|
+
captured automatically, history is content-addressed and tamper-evident, and an
|
|
7
|
+
agent can author straight into version control with no working files at all.
|
|
8
|
+
|
|
9
|
+
> The name: `sol` is the sun. Three letters, like `git`.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm i -g midsummer-sol # exposes the `sol` command
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Check it:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
sol --version
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Authenticate
|
|
24
|
+
|
|
25
|
+
Sign in once and Sol caches a token outside any repo so every machine command
|
|
26
|
+
just works:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
sol auth login # opens a one-click link to finish sign-in in your browser
|
|
30
|
+
sol auth status # who you're signed in as
|
|
31
|
+
sol auth logout
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Prefer a token in your environment (CI, scripts)? Set `SOL_TOKEN` and Sol uses
|
|
35
|
+
it directly — it always wins over the cached login:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
export SOL_TOKEN=<your-token>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Everyday commands
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
sol init # create ./.sol in the current directory
|
|
45
|
+
# ...edit files...
|
|
46
|
+
sol commit "first cut" # snapshot the working tree + record a commit
|
|
47
|
+
sol status # current branch + uncommitted changes
|
|
48
|
+
sol log # commit history (sol log --all for every op)
|
|
49
|
+
sol diff # working-tree changes (sol diff main feature between refs)
|
|
50
|
+
sol watch # OR: auto-capture every change, hands-free
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Branch and merge:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
sol branch feature
|
|
57
|
+
sol switch feature
|
|
58
|
+
sol commit "work on feature"
|
|
59
|
+
sol switch main
|
|
60
|
+
sol merge feature # 3-way merge; conflicts land in your working tree to resolve
|
|
61
|
+
sol tag v1
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Recover and inspect:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
sol restore --from 3 app.py # a file (or the whole tree) from any ref
|
|
68
|
+
sol show 5 # a commit's message + its diff
|
|
69
|
+
sol blame src/app.ts # who/which commit last touched each line
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
A **ref** is a branch/tag name, a commit hash-prefix, an op sequence number, or
|
|
73
|
+
`HEAD`. Set `SOL_ACTOR=you` to attribute your changes.
|
|
74
|
+
|
|
75
|
+
## Remotes
|
|
76
|
+
|
|
77
|
+
Sol is hosted. After `sol auth login`, clone and push to the hosted Sol with no
|
|
78
|
+
extra setup — the default remote is `https://sol.midsummer.new`:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
sol clone <owner>/<repo> # clone into ./<repo>
|
|
82
|
+
# ...work, commit...
|
|
83
|
+
sol push # publish your commits
|
|
84
|
+
sol pull # fast-forward sync
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Point at a different host when you need to (a self-hosted or staging Sol). Either
|
|
88
|
+
set `SOL_REMOTE`, or configure a remote per repo:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
export SOL_REMOTE=https://sol.example.com # override the default for all commands
|
|
92
|
+
# or, per repo:
|
|
93
|
+
sol remote https://sol.example.com my-repo
|
|
94
|
+
sol push
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## License
|
|
98
|
+
|
|
99
|
+
MIT.
|