resulgit 1.0.17 → 1.0.19

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 (3) hide show
  1. package/package.json +1 -1
  2. package/resulgit.js +216 -1250
  3. package/README.md +0 -194
package/README.md DELETED
@@ -1,194 +0,0 @@
1
- # resulgit
2
-
3
- A powerful command-line interface (CLI) tool for version control system operations.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install -g resulgit
9
- ```
10
-
11
- Or install locally:
12
-
13
- ```bash
14
- npm install resulgit
15
- ```
16
-
17
- ## Usage
18
-
19
- ```bash
20
- resulgit <command> [options]
21
- ```
22
-
23
- ## Commands
24
-
25
- ### Authentication
26
-
27
- - `resulgit auth set-token --token <token>` - Set authentication token
28
- - `resulgit auth set-server --server <url>` - Set server URL
29
- - `resulgit auth login --email <email> --password <password>` - Login to server
30
- - `resulgit auth register --username <name> --email <email> --password <password>` - Register new account
31
-
32
- ### Repository Management
33
-
34
- - `resulgit repo list` - List all repositories
35
- - `resulgit repo create --name <name> [--description <text>] [--visibility <private|public>]` - Create new repository
36
- - `resulgit repo log --repo <id> [--branch <name>]` - View commit log
37
- - `resulgit repo head --repo <id> [--branch <name>]` - Get HEAD commit
38
- - `resulgit repo select` - Interactive repository selection
39
-
40
- ### Clone & Initialize
41
-
42
- - `resulgit init <name>` - Initialize a new repository (creates folder and remote repo automatically)
43
- - `resulgit init <name> --dir <path>` - Initialize in a specific directory
44
- - `resulgit clone <name>` - Clone a repository by name
45
- - `resulgit clone --repo <name> --branch <branch>` - Clone with specific branch
46
- - `resulgit workspace set-root --path <dir>` - Set workspace root directory
47
-
48
- ### Branch Operations
49
-
50
- - `resulgit branch list` - List all branches
51
- - `resulgit branch create <name>` - Create new branch (simple)
52
- - `resulgit branch create <name> --base <branch>` - Create from specific base
53
- - `resulgit branch delete <name>` - Delete a branch
54
- - `resulgit switch <branch>` - Switch to a branch
55
- - `resulgit switch -c <branch>` - Create and switch to new branch
56
- - `resulgit checkout <branch>` - Checkout a branch
57
- - `resulgit merge <branch>` - Merge a branch into current
58
-
59
- ### File Operations
60
-
61
- - `resulgit status` - Show working directory status
62
- - `resulgit diff [--path <file>] [--commit <id>]` - Show differences
63
- - `resulgit add <file> [--content <text>] [--all]` - Add files
64
- - `resulgit rm --path <file>` - Remove files
65
- - `resulgit mv --from <old> --to <new>` - Move/rename files
66
- - `resulgit restore --path <file> [--source <commit>]` - Restore file from commit
67
-
68
- ### Version Control
69
-
70
- - `resulgit commit --message <text>` - Create a commit
71
- - `resulgit commit -m <text>` - Short form (same as above)
72
- - `resulgit commit -a -m <text>` - Add all changes and commit
73
- - `resulgit push` - Push changes to remote
74
- - `resulgit pull` - Pull changes from remote
75
- - `resulgit merge --branch <name> [--squash] [--no-push]` - Merge branches
76
- - `resulgit cherry-pick --commit <id> [--branch <name>] [--no-push]` - Cherry-pick a commit
77
- - `resulgit revert --commit <id> [--no-push]` - Revert a commit
78
- - `resulgit reset [--commit <id>] [--mode <soft|mixed|hard>]` - Reset to commit
79
-
80
- ### Stash Operations
81
-
82
- - `resulgit stash` or `resulgit stash save [--message <msg>]` - Save changes to stash
83
- - `resulgit stash list` - List all stashes
84
- - `resulgit stash pop [--index <n>]` - Apply and remove stash
85
- - `resulgit stash apply [--index <n>]` - Apply stash without removing
86
- - `resulgit stash drop [--index <n>]` - Delete a stash
87
- - `resulgit stash clear` - Clear all stashes
88
-
89
- ### Tags
90
-
91
- - `resulgit tag list` - List all tags
92
- - `resulgit tag create --name <tag> [--branch <name>]` - Create a tag
93
- - `resulgit tag delete --name <tag>` - Delete a tag
94
-
95
- ### Pull Requests
96
-
97
- - `resulgit pr list` - List pull requests
98
- - `resulgit pr create --title <title> [--source <branch>] [--target <branch>]` - Create pull request
99
- - `resulgit pr merge --id <id>` - Merge a pull request
100
-
101
- ### Information & Inspection
102
-
103
- - `resulgit current` - Show current repository and branch
104
- - `resulgit head` - Show HEAD commit ID
105
- - `resulgit show --commit <id>` - Show commit details
106
- - `resulgit log [--branch <name>] [--max <N>] [--oneline] [--stats]` - Show commit history with visualization
107
- - `resulgit blame --path <file>` - Show line-by-line authorship information
108
- - `resulgit grep --pattern <pattern> [--ignore-case]` - Search for patterns in repository
109
- - `resulgit ls-files` - List all tracked files
110
- - `resulgit reflog` - Show reference log history
111
- - `resulgit cat-file --type <type> --object <id> [--path <file>]` - Display file/commit contents
112
- - `resulgit rev-parse --rev <ref>` - Parse revision names to commit IDs
113
- - `resulgit describe [--commit <id>]` - Describe a commit with nearest tag
114
- - `resulgit shortlog [--branch <name>] [--max <N>]` - Summarize commit log by author
115
-
116
- ### Git Hooks
117
-
118
- - `resulgit hook list` - List installed hooks
119
- - `resulgit hook install --name <hook> [--script <code>] [--sample]` - Install a hook
120
- - `resulgit hook remove --name <hook>` - Remove a hook
121
- - `resulgit hook show --name <hook>` - Show hook content
122
-
123
- **Available hooks:** `pre-commit`, `post-commit`, `pre-push`, `post-push`, `pre-merge`, `post-merge`, `pre-checkout`, `post-checkout`
124
-
125
- ## Global Options
126
-
127
- - `--server <url>` - Override default server
128
- - `--token <token>` - Override stored token
129
- - `--json` - Output in JSON format
130
- - `--dir <path>` - Specify working directory
131
-
132
- ## Examples
133
-
134
- ```bash
135
- # Login to server
136
- resulgit auth login --email user@example.com --password mypassword
137
-
138
- # List repositories
139
- resulgit repo list
140
-
141
- # Initialize a new repository (creates folder + remote repo automatically)
142
- resulgit init MyProject
143
-
144
- # Or clone an existing repository
145
- resulgit clone MyProject
146
-
147
- # Check status
148
- cd MyProject
149
- resulgit status
150
-
151
- # Create and commit changes
152
- resulgit add file.txt --content "Hello World"
153
- resulgit commit -m "Add file.txt"
154
- resulgit push
155
-
156
- # Create a branch
157
- resulgit branch create --name feature-branch
158
-
159
- # Merge branches
160
- resulgit merge --branch feature-branch
161
-
162
- # View commit history with graph
163
- resulgit log --max 20
164
-
165
- # View commit history in one line
166
- resulgit log --oneline
167
-
168
- # View commit statistics
169
- resulgit log --stats
170
-
171
- # Show line-by-line authorship
172
- resulgit blame --path src/index.js
173
-
174
- # Search in repository
175
- resulgit grep --pattern "TODO"
176
-
177
- # List tracked files
178
- resulgit ls-files
179
-
180
- # Install a pre-commit hook
181
- resulgit hook install --name pre-commit --sample
182
- ```
183
-
184
- ## Configuration
185
-
186
- Configuration is stored in `~/.resulgit/config.json`. You can set:
187
- - `server`: Default server URL
188
- - `token`: Authentication token
189
- - `workspaceRoot`: Default workspace directory
190
-
191
- ## License
192
-
193
- MIT
194
-