resulgit 1.0.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 +143 -0
- package/package.json +38 -0
- package/resulgit.js +2309 -0
package/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
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 & Workspace
|
|
41
|
+
|
|
42
|
+
- `resulgit clone --repo <id> --branch <name> [--dest <dir>]` - Clone a repository
|
|
43
|
+
- `resulgit workspace set-root --path <dir>` - Set workspace root directory
|
|
44
|
+
|
|
45
|
+
### Branch Operations
|
|
46
|
+
|
|
47
|
+
- `resulgit branch list` - List all branches
|
|
48
|
+
- `resulgit branch create --name <branch> [--base <branch>]` - Create new branch
|
|
49
|
+
- `resulgit branch delete --name <branch>` - Delete a branch
|
|
50
|
+
- `resulgit switch --branch <name>` - Switch to a branch
|
|
51
|
+
- `resulgit checkout --branch <name>` - Checkout a branch
|
|
52
|
+
|
|
53
|
+
### File Operations
|
|
54
|
+
|
|
55
|
+
- `resulgit status` - Show working directory status
|
|
56
|
+
- `resulgit diff [--path <file>] [--commit <id>]` - Show differences
|
|
57
|
+
- `resulgit add <file> [--content <text>] [--all]` - Add files
|
|
58
|
+
- `resulgit rm --path <file>` - Remove files
|
|
59
|
+
- `resulgit mv --from <old> --to <new>` - Move/rename files
|
|
60
|
+
- `resulgit restore --path <file> [--source <commit>]` - Restore file from commit
|
|
61
|
+
|
|
62
|
+
### Version Control
|
|
63
|
+
|
|
64
|
+
- `resulgit commit --message <text>` - Create a commit
|
|
65
|
+
- `resulgit push` - Push changes to remote
|
|
66
|
+
- `resulgit pull` - Pull changes from remote
|
|
67
|
+
- `resulgit merge --branch <name> [--squash] [--no-push]` - Merge branches
|
|
68
|
+
- `resulgit cherry-pick --commit <id> [--branch <name>] [--no-push]` - Cherry-pick a commit
|
|
69
|
+
- `resulgit revert --commit <id> [--no-push]` - Revert a commit
|
|
70
|
+
- `resulgit reset [--commit <id>] [--mode <soft|mixed|hard>]` - Reset to commit
|
|
71
|
+
|
|
72
|
+
### Stash Operations
|
|
73
|
+
|
|
74
|
+
- `resulgit stash` or `resulgit stash save [--message <msg>]` - Save changes to stash
|
|
75
|
+
- `resulgit stash list` - List all stashes
|
|
76
|
+
- `resulgit stash pop [--index <n>]` - Apply and remove stash
|
|
77
|
+
- `resulgit stash apply [--index <n>]` - Apply stash without removing
|
|
78
|
+
- `resulgit stash drop [--index <n>]` - Delete a stash
|
|
79
|
+
- `resulgit stash clear` - Clear all stashes
|
|
80
|
+
|
|
81
|
+
### Tags
|
|
82
|
+
|
|
83
|
+
- `resulgit tag list` - List all tags
|
|
84
|
+
- `resulgit tag create --name <tag> [--branch <name>]` - Create a tag
|
|
85
|
+
- `resulgit tag delete --name <tag>` - Delete a tag
|
|
86
|
+
|
|
87
|
+
### Pull Requests
|
|
88
|
+
|
|
89
|
+
- `resulgit pr list` - List pull requests
|
|
90
|
+
- `resulgit pr create --title <title> [--source <branch>] [--target <branch>]` - Create pull request
|
|
91
|
+
- `resulgit pr merge --id <id>` - Merge a pull request
|
|
92
|
+
|
|
93
|
+
### Information
|
|
94
|
+
|
|
95
|
+
- `resulgit current` - Show current repository and branch
|
|
96
|
+
- `resulgit head` - Show HEAD commit ID
|
|
97
|
+
- `resulgit show --commit <id>` - Show commit details
|
|
98
|
+
|
|
99
|
+
## Global Options
|
|
100
|
+
|
|
101
|
+
- `--server <url>` - Override default server
|
|
102
|
+
- `--token <token>` - Override stored token
|
|
103
|
+
- `--json` - Output in JSON format
|
|
104
|
+
- `--dir <path>` - Specify working directory
|
|
105
|
+
|
|
106
|
+
## Examples
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Login to server
|
|
110
|
+
resulgit auth login --email user@example.com --password mypassword
|
|
111
|
+
|
|
112
|
+
# List repositories
|
|
113
|
+
resulgit repo list
|
|
114
|
+
|
|
115
|
+
# Clone a repository
|
|
116
|
+
resulgit clone --repo 123 --branch main
|
|
117
|
+
|
|
118
|
+
# Check status
|
|
119
|
+
resulgit status
|
|
120
|
+
|
|
121
|
+
# Create and commit changes
|
|
122
|
+
resulgit add file.txt --content "Hello World"
|
|
123
|
+
resulgit commit --message "Add file.txt"
|
|
124
|
+
resulgit push
|
|
125
|
+
|
|
126
|
+
# Create a branch
|
|
127
|
+
resulgit branch create --name feature-branch
|
|
128
|
+
|
|
129
|
+
# Merge branches
|
|
130
|
+
resulgit merge --branch feature-branch
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Configuration
|
|
134
|
+
|
|
135
|
+
Configuration is stored in `~/.resulgit/config.json`. You can set:
|
|
136
|
+
- `server`: Default server URL
|
|
137
|
+
- `token`: Authentication token
|
|
138
|
+
- `workspaceRoot`: Default workspace directory
|
|
139
|
+
|
|
140
|
+
## License
|
|
141
|
+
|
|
142
|
+
MIT
|
|
143
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "resulgit",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A powerful CLI tool for version control system operations - clone, commit, push, pull, merge, branch management, and more",
|
|
5
|
+
"main": "resulgit.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"resulgit": "./resulgit.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"git",
|
|
14
|
+
"vcs",
|
|
15
|
+
"version-control",
|
|
16
|
+
"cli",
|
|
17
|
+
"repository",
|
|
18
|
+
"commit",
|
|
19
|
+
"branch",
|
|
20
|
+
"merge",
|
|
21
|
+
"pull-request",
|
|
22
|
+
"stash"
|
|
23
|
+
],
|
|
24
|
+
"author": "",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=14.0.0"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": ""
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"resulgit.js",
|
|
35
|
+
"README.md"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
|