gyrus 0.1.0 → 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.
- package/README.md +129 -7
- package/package.json +12 -9
- package/src/commands/completions.ts +654 -0
- package/src/commands/pull.ts +184 -0
- package/src/commands/push.ts +175 -0
- package/src/commands/sync.ts +188 -0
- package/src/commands/version.ts +103 -0
- package/src/index.ts +44 -4
- package/src/services/adr.ts +19 -0
- package/src/services/git.ts +625 -0
- package/src/services/knowledge.ts +19 -0
- package/src/services/workspace.ts +45 -0
- package/src/types/index.ts +96 -0
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Gyrus
|
|
2
2
|
|
|
3
|
-
[](https://github.com/ewgenius/gyrus/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/ewgenius/gyrus/actions/workflows/release.yml)
|
|
5
5
|
[](https://www.npmjs.com/package/gyrus)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](https://bun.sh)
|
|
@@ -26,7 +26,7 @@ Gyrus is a unified CLI tool for managing knowledge notes and Architecture Decisi
|
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
# Clone the repository
|
|
29
|
-
git clone https://github.com/
|
|
29
|
+
git clone https://github.com/ewgenius/gyrus.git
|
|
30
30
|
cd gyrus
|
|
31
31
|
|
|
32
32
|
# Install dependencies
|
|
@@ -75,6 +75,10 @@ gyrus use work
|
|
|
75
75
|
| `gyrus use <name>` | Set the default workspace |
|
|
76
76
|
| `gyrus doctor` | Run diagnostics and health check |
|
|
77
77
|
| `gyrus mcp` | Start the MCP server (stdio) |
|
|
78
|
+
| `gyrus sync` | Stage and commit all changes to git |
|
|
79
|
+
| `gyrus push` | Push commits to remote |
|
|
80
|
+
| `gyrus pull` | Pull latest from remote |
|
|
81
|
+
| `gyrus completions <shell>` | Generate shell completions (bash, zsh, fish) |
|
|
78
82
|
| `gyrus serve` | Start the dashboard server (coming soon) |
|
|
79
83
|
| `gyrus daemon` | Start HTTP/SSE MCP server (coming soon) |
|
|
80
84
|
|
|
@@ -94,6 +98,124 @@ gyrus doctor --workspace work
|
|
|
94
98
|
gyrus doctor --all
|
|
95
99
|
```
|
|
96
100
|
|
|
101
|
+
## Git Sync
|
|
102
|
+
|
|
103
|
+
Gyrus integrates with git to backup and sync your knowledge across machines.
|
|
104
|
+
|
|
105
|
+
### Commands
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Stage and commit all changes
|
|
109
|
+
gyrus sync
|
|
110
|
+
|
|
111
|
+
# Commit with custom message
|
|
112
|
+
gyrus sync -m "Add authentication patterns"
|
|
113
|
+
|
|
114
|
+
# Sync and push in one command
|
|
115
|
+
gyrus sync --push
|
|
116
|
+
|
|
117
|
+
# Push committed changes
|
|
118
|
+
gyrus push
|
|
119
|
+
|
|
120
|
+
# Pull latest changes
|
|
121
|
+
gyrus pull
|
|
122
|
+
|
|
123
|
+
# Pull with auto-stash (saves local changes, pulls, restores)
|
|
124
|
+
gyrus pull --stash
|
|
125
|
+
|
|
126
|
+
# Sync all workspaces at once
|
|
127
|
+
gyrus sync --all
|
|
128
|
+
gyrus push --all
|
|
129
|
+
gyrus pull --all
|
|
130
|
+
|
|
131
|
+
# Preview what would be committed
|
|
132
|
+
gyrus sync --dry-run
|
|
133
|
+
|
|
134
|
+
# Verbose output
|
|
135
|
+
gyrus sync -v
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Configuration
|
|
139
|
+
|
|
140
|
+
Add git settings to workspace config in `~/.config/gyrus/config.json`:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"workspaces": [
|
|
145
|
+
{
|
|
146
|
+
"name": "personal",
|
|
147
|
+
"path": "~/gyrus",
|
|
148
|
+
"description": "Personal knowledge",
|
|
149
|
+
"git": {
|
|
150
|
+
"enabled": true,
|
|
151
|
+
"autoSync": false,
|
|
152
|
+
"autoPush": false,
|
|
153
|
+
"commitPrefix": "gyrus:",
|
|
154
|
+
"defaultBranch": "main"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
| Setting | Default | Description |
|
|
162
|
+
|---------|---------|-------------|
|
|
163
|
+
| `enabled` | `true` | Enable git integration (auto-detected if .git exists) |
|
|
164
|
+
| `autoSync` | `false` | Auto-commit after create/update operations |
|
|
165
|
+
| `autoPush` | `false` | Auto-push after sync |
|
|
166
|
+
| `commitPrefix` | `"gyrus:"` | Prefix for auto-generated commit messages |
|
|
167
|
+
| `defaultBranch` | `"main"` | Default branch for operations |
|
|
168
|
+
|
|
169
|
+
### Auto-Generated Commit Messages
|
|
170
|
+
|
|
171
|
+
When you run `gyrus sync` without a message, it generates:
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
gyrus: sync knowledge and ADRs - 2026-01-15 15:30
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Shell Completions
|
|
178
|
+
|
|
179
|
+
Gyrus provides shell completions for bash, zsh, and fish.
|
|
180
|
+
|
|
181
|
+
### Bash
|
|
182
|
+
|
|
183
|
+
Add to your `~/.bashrc`:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
eval "$(gyrus completions bash)"
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Or save to completion directory:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
gyrus completions bash > ~/.local/share/bash-completion/completions/gyrus
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Zsh
|
|
196
|
+
|
|
197
|
+
Add to your `~/.zshrc`:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
eval "$(gyrus completions zsh)"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Or save to completions directory (ensure the directory is in your fpath):
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
mkdir -p ~/.zsh/completions
|
|
207
|
+
gyrus completions zsh > ~/.zsh/completions/_gyrus
|
|
208
|
+
# Add to ~/.zshrc: fpath=(~/.zsh/completions $fpath)
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Fish
|
|
212
|
+
|
|
213
|
+
Save to fish completions directory:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
gyrus completions fish > ~/.config/fish/completions/gyrus.fish
|
|
217
|
+
```
|
|
218
|
+
|
|
97
219
|
## MCP Integration
|
|
98
220
|
|
|
99
221
|
### Claude Desktop Configuration
|
|
@@ -104,8 +226,8 @@ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_
|
|
|
104
226
|
{
|
|
105
227
|
"mcpServers": {
|
|
106
228
|
"gyrus": {
|
|
107
|
-
"command": "
|
|
108
|
-
"args": ["
|
|
229
|
+
"command": "gyrus",
|
|
230
|
+
"args": ["mcp"]
|
|
109
231
|
}
|
|
110
232
|
}
|
|
111
233
|
}
|
|
@@ -117,7 +239,7 @@ Or using the compiled binary:
|
|
|
117
239
|
{
|
|
118
240
|
"mcpServers": {
|
|
119
241
|
"gyrus": {
|
|
120
|
-
"command": "
|
|
242
|
+
"command": "gyrus",
|
|
121
243
|
"args": ["mcp"]
|
|
122
244
|
}
|
|
123
245
|
}
|
|
@@ -270,4 +392,4 @@ working_folder: /path/to/project
|
|
|
270
392
|
|
|
271
393
|
## License
|
|
272
394
|
|
|
273
|
-
MIT
|
|
395
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gyrus",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Model-agnostic knowledge management CLI with MCP server support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,12 +22,15 @@
|
|
|
22
22
|
"build:macos": "bun build src/index.ts --compile --target=bun-darwin-arm64 --outfile dist/gyrus-darwin-arm64 && bun build src/index.ts --compile --target=bun-darwin-x64 --outfile dist/gyrus-darwin-x64",
|
|
23
23
|
"build:linux": "bun build src/index.ts --compile --target=bun-linux-x64 --outfile dist/gyrus-linux-x64 && bun build src/index.ts --compile --target=bun-linux-arm64 --outfile dist/gyrus-linux-arm64",
|
|
24
24
|
"typecheck": "tsc --noEmit",
|
|
25
|
-
"test": "
|
|
26
|
-
"test:watch": "
|
|
27
|
-
"test:coverage": "
|
|
25
|
+
"test": "bun test",
|
|
26
|
+
"test:watch": "bun test --watch",
|
|
27
|
+
"test:coverage": "bun test --coverage",
|
|
28
28
|
"doctor": "bun run src/index.ts doctor",
|
|
29
29
|
"mcp": "bun run src/index.ts mcp",
|
|
30
|
-
"prepublishOnly": "bun run typecheck && bun run test"
|
|
30
|
+
"prepublishOnly": "bun run typecheck && bun run test",
|
|
31
|
+
"docs:dev": "vitepress dev",
|
|
32
|
+
"docs:build": "vitepress build",
|
|
33
|
+
"docs:preview": "vitepress preview"
|
|
31
34
|
},
|
|
32
35
|
"keywords": [
|
|
33
36
|
"knowledge-management",
|
|
@@ -47,12 +50,12 @@
|
|
|
47
50
|
"license": "MIT",
|
|
48
51
|
"repository": {
|
|
49
52
|
"type": "git",
|
|
50
|
-
"url": "git+https://github.com/
|
|
53
|
+
"url": "git+https://github.com/ewgenius/gyrus.git"
|
|
51
54
|
},
|
|
52
55
|
"bugs": {
|
|
53
|
-
"url": "https://github.com/
|
|
56
|
+
"url": "https://github.com/ewgenius/gyrus/issues"
|
|
54
57
|
},
|
|
55
|
-
"homepage": "https://github.com/
|
|
58
|
+
"homepage": "https://github.com/ewgenius/gyrus#readme",
|
|
56
59
|
"engines": {
|
|
57
60
|
"bun": ">=1.0.0"
|
|
58
61
|
},
|
|
@@ -73,6 +76,6 @@
|
|
|
73
76
|
"@types/bun": "latest",
|
|
74
77
|
"prettier": "^3.8.0",
|
|
75
78
|
"typescript": "^5",
|
|
76
|
-
"
|
|
79
|
+
"vitepress": "^2.0.0-alpha.15"
|
|
77
80
|
}
|
|
78
81
|
}
|