abapgit-agent 1.0.1 → 1.1.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/CLAUDE.md CHANGED
@@ -97,7 +97,7 @@ abapgit-agent pull --files zcl_my_class.clas.abap,zif_my_intf.intf.abap
97
97
  abapgit-agent pull --branch develop
98
98
 
99
99
  # Pull from specific URL (useful for CI/CD)
100
- abapgit-agent pull --url https://github.com/I045696/my-repo.git
100
+ abapgit-agent pull --url https://github.com/org/my-repo.git
101
101
 
102
102
  # Combined options
103
103
  abapgit-agent pull --branch develop --files src/zcl_my_class.clas.abap
package/README.md CHANGED
@@ -10,19 +10,54 @@ This project provides a bridge between AI coding tools and your ABAP system:
10
10
  2. **Local agent pulls from git** → Activates in ABAP system
11
11
  3. **Returns activation results** → Claude fixes errors if any
12
12
 
13
- ![Claude using abapgit-agent](img/claude.png)
13
+ ![Using abapgit-agent in Claude Code](https://raw.githubusercontent.com/SylvosCai/abapgit-agent/master/img/claude.png)
14
14
 
15
15
  ## Quick Start
16
16
 
17
- 1. **Install CLI**: Run `sudo npm install -g abapgit-agent`
18
- - For local development, use `sudo npm link` from this repo instead
19
- 2. **Configure repo**: Add `.abapGitAgent` with SAP credentials
20
- 3. **Validate code**: Run `abapgit-agent pull` after pushing
17
+ ### For Existing Repositories
18
+
19
+ ```bash
20
+ # 1. Install CLI
21
+ npm install -g abapgit-agent
22
+
23
+ # 2. Clone repo
24
+ git clone https://github.com/user/abap-project.git
25
+ cd abap-project
26
+
27
+ # 3. Initialize configuration
28
+ abapgit-agent init --folder /abap --package ZMY_PACKAGE
29
+
30
+ # 4. Edit .abapGitAgent with credentials
31
+
32
+ # 5. Create online repository in ABAP
33
+ abapgit-agent create
34
+
35
+ # 6. Import objects from ABAP to git
36
+ abapgit-agent import
37
+
38
+ # 7. Pull to activate in ABAP
39
+ abapgit-agent pull
40
+ ```
21
41
 
22
42
  See [Creating New ABAP Projects](INSTALL.md#creating-new-abap-projects) to set up a new ABAP repository with Claude Code integration.
23
43
 
24
44
  ## CLI Commands
25
45
 
46
+ ### Setup Commands
47
+
48
+ ```bash
49
+ # Initialize local configuration for existing git repo
50
+ abapgit-agent init --folder /abap --package ZMY_PACKAGE
51
+
52
+ # Create online repository in ABAP
53
+ abapgit-agent create
54
+
55
+ # Import objects from ABAP package to git
56
+ abapgit-agent import
57
+ ```
58
+
59
+ ### Development Commands
60
+
26
61
  ```bash
27
62
  # Pull and activate (auto-detects git remote and branch)
28
63
  abapgit-agent pull
@@ -39,9 +74,16 @@ abapgit-agent pull --url https://github.com/user/repo --branch main
39
74
  # Pull with a specific transport request
40
75
  abapgit-agent pull --transport DEVK900001
41
76
 
42
- # Combine options: files + transport request
43
- abapgit-agent pull --files zcl_my_class.clas.abap --transport DEVK900001
77
+ # Import objects from ABAP package to git
78
+ abapgit-agent import
79
+
80
+ # Import with custom commit message
81
+ abapgit-agent import --message "feat: add new feature"
82
+ ```
44
83
 
84
+ ### Validation Commands
85
+
86
+ ```bash
45
87
  # Inspect source file for issues
46
88
  abapgit-agent inspect --files abap/zcl_my_class.clas.abap
47
89
 
@@ -50,7 +92,11 @@ abapgit-agent unit --files abap/zcl_my_test.clas.testclasses.abap
50
92
 
51
93
  # Run tests for multiple test classes
52
94
  abapgit-agent unit --files abap/zcl_test1.clas.testclasses.abap,abap/zcl_test2.clas.testclasses.abap
95
+ ```
96
+
97
+ ### Utility Commands
53
98
 
99
+ ```bash
54
100
  # Health check
55
101
  abapgit-agent health
56
102
 
@@ -72,51 +118,20 @@ node bin/abapgit-agent pull
72
118
  npm run pull -- --url <git-url> --branch main
73
119
  ```
74
120
 
75
- ## Unit Tests
76
-
77
- Run AUnit tests for ABAP test classes and view detailed results:
78
-
79
- ```bash
80
- # Run unit tests for a test class file
81
- abapgit-agent unit --files abap/zcl_my_test.clas.testclasses.abap
82
-
83
- # Run tests for multiple test classes
84
- abapgit-agent unit --files abap/zcl_test1.clas.testclasses.abap,abap/zcl_test2.clas.testclasses.abap
85
- ```
86
-
87
- ### Output
88
-
89
- Success case:
90
- ```
91
- ✅ ZCL_MY_TEST - All tests passed
92
- Tests: 10 | Passed: 10 | Failed: 0
93
- ```
94
-
95
- Failure case with details:
96
- ```
97
- ❌ ZCL_MY_TEST - Tests failed
98
- Tests: 10 | Passed: 8 | Failed: 2
99
- ✗ ZCL_MY_TEST=>TEST_METHOD_1: Error description
100
- ✗ ZCL_MY_TEST=>TEST_METHOD_2: Another error
101
- ```
102
-
103
- ### Supported File Formats
104
-
105
- | File Pattern | Description |
106
- |--------------|-------------|
107
- | `zcl_my_test.clas.testclasses.abap` | Test class file |
108
- | `src/tests/zcl_my_test.clas.testclasses.abap` | With subdirectory path |
109
-
110
121
  ## Documentation
111
122
 
112
123
  | Topic | File |
113
124
  |-------|------|
114
125
  | Installation & Setup | [INSTALL.md](INSTALL.md) |
115
- | CLI Commands Overview | [docs/commands.md](docs/commands.md) |
126
+ | init Command | [docs/init-command.md](docs/init-command.md) |
127
+ | create Command | [docs/create-command.md](docs/create-command.md) |
128
+ | import Command | [docs/import-command.md](docs/import-command.md) |
129
+ | pull Command | [docs/pull-command.md](docs/pull-command.md) |
130
+ | inspect Command | [docs/inspect-command.md](docs/inspect-command.md) |
131
+ | unit Command | [docs/unit-command.md](docs/unit-command.md) |
116
132
  | REST API Reference | [API.md](API.md) |
117
133
  | Error Handling | [ERROR_HANDLING.md](ERROR_HANDLING.md) |
118
134
  | ABAP Coding Guidelines | [abap/CLAUDE.md](abap/CLAUDE.md) |
119
- | claude-mem Knowledge Management | [CLAUDE_MEM.md](CLAUDE_MEM.md) |
120
135
 
121
136
  ## Dependent Projects
122
137
 
@@ -13,6 +13,7 @@ CLASS zcl_abgagt_command_create DEFINITION PUBLIC FINAL CREATE PUBLIC.
13
13
  display_name TYPE string,
14
14
  name TYPE string,
15
15
  folder_logic TYPE string,
16
+ folder TYPE string,
16
17
  username TYPE string,
17
18
  password TYPE string,
18
19
  END OF ty_create_params.
@@ -68,12 +69,20 @@ CLASS zcl_abgagt_command_create IMPLEMENTATION.
68
69
  iv_display_name = ls_params-display_name
69
70
  iv_name = ls_params-name
70
71
  iv_package = lv_package
71
- iv_folder_logic = ls_params-folder_logic ).
72
+ iv_folder_logic = ls_params-folder_logic ).
72
73
  CATCH zcx_abapgit_exception INTO DATA(lx_error).
73
74
  rv_result = '{"success":"","error":"' && lx_error->get_text( ) && '"}'.
74
75
  RETURN.
75
76
  ENDTRY.
76
77
 
78
+ " Set starting folder if provided
79
+ IF ls_params-folder IS NOT INITIAL.
80
+ DATA(lo_dot) = li_repo->get_dot_abapgit( ).
81
+ lo_dot->set_starting_folder( ls_params-folder ).
82
+ li_repo->set_dot_abapgit( lo_dot ).
83
+ COMMIT WORK AND WAIT.
84
+ ENDIF.
85
+
77
86
  DATA lv_response TYPE string.
78
87
  lv_response = '{"success":"X",'.
79
88
  lv_response = lv_response && '"repo_key":"' && li_repo->get_key( ) && '",'.
@@ -24,6 +24,7 @@ CLASS zcl_abgagt_resource_create IMPLEMENTATION.
24
24
  display_name TYPE string,
25
25
  name TYPE string,
26
26
  folder_logic TYPE string,
27
+ folder TYPE string,
27
28
  username TYPE string,
28
29
  password TYPE string,
29
30
  END OF ls_request.
package/bin/abapgit-agent CHANGED
@@ -709,7 +709,7 @@ async function runInit(args) {
709
709
  // Get parameters
710
710
  const folder = folderArgIndex !== -1 && folderArgIndex + 1 < args.length
711
711
  ? args[folderArgIndex + 1]
712
- : '/src';
712
+ : '/src/';
713
713
 
714
714
  const packageName = packageArgIndex !== -1 && packageArgIndex + 1 < args.length
715
715
  ? args[packageArgIndex + 1]
@@ -774,6 +774,36 @@ async function runInit(args) {
774
774
  process.exit(1);
775
775
  }
776
776
 
777
+ // Update .gitignore
778
+ const gitignorePath = pathModule.join(process.cwd(), '.gitignore');
779
+ const ignoreEntries = ['.abapGitAgent', '.abapgit_agent_cookies.txt'];
780
+ let existingIgnore = '';
781
+
782
+ if (fs.existsSync(gitignorePath)) {
783
+ existingIgnore = fs.readFileSync(gitignorePath, 'utf8');
784
+ }
785
+
786
+ let updated = false;
787
+ let newIgnoreContent = existingIgnore;
788
+
789
+ for (const entry of ignoreEntries) {
790
+ if (!newIgnoreContent.includes(entry)) {
791
+ if (newIgnoreContent && !newIgnoreContent.endsWith('\n')) {
792
+ newIgnoreContent += '\n';
793
+ }
794
+ newIgnoreContent += entry + '\n';
795
+ updated = true;
796
+ }
797
+ }
798
+
799
+ if (updated) {
800
+ fs.writeFileSync(gitignorePath, newIgnoreContent);
801
+ console.log(`✅ Updated .gitignore`);
802
+ } else {
803
+ fs.writeFileSync(gitignorePath, newIgnoreContent);
804
+ console.log(`✅ .gitignore already up to date`);
805
+ }
806
+
777
807
  // Copy CLAUDE.md
778
808
  const claudeMdPath = pathModule.join(__dirname, '..', 'abap', 'CLAUDE.md');
779
809
  const localClaudeMdPath = pathModule.join(process.cwd(), 'CLAUDE.md');
@@ -883,8 +913,7 @@ Prerequisites:
883
913
  - Edit .abapGitAgent with credentials (host, user, password)
884
914
 
885
915
  Examples:
886
- abapgit-agent create # Create repo only
887
- abapgit-agent import # Import objects from package to git
916
+ abapgit-agent create # Create repo in ABAP
888
917
  `);
889
918
  return;
890
919
  }
@@ -911,6 +940,7 @@ Examples:
911
940
  console.log(`\n🚀 Creating online repository`);
912
941
  console.log(` URL: ${repoUrl}`);
913
942
  console.log(` Package: ${config.package}`);
943
+ console.log(` Folder: ${config.folder || '/src/'}`);
914
944
  console.log(` Name: ${repoName}`);
915
945
  console.log(` Branch: ${branch}`);
916
946
 
@@ -920,7 +950,8 @@ Examples:
920
950
  url: repoUrl,
921
951
  package: config.package,
922
952
  name: repoName,
923
- branch: branch
953
+ branch: branch,
954
+ folder: config.folder || '/src/'
924
955
  };
925
956
 
926
957
  if (config.gitUsername) {
package/docs/commands.md CHANGED
@@ -4,76 +4,87 @@ All available CLI commands for abapGit Agent.
4
4
 
5
5
  ## Command Reference
6
6
 
7
- | Command | Status | Description | File |
8
- |---------|--------|-------------|------|
9
- | [init](init-command.md) | ✅ | Initialize local configuration | Initialize local configuration for git repo |
10
- | [create](create-command.md) | TODO | Create online repository | Create abapGit repo in ABAP system |
11
- | [pull](pull-command.md) | ✅ | Pull and activate | Pull objects from git and activate in ABAP |
12
- | [inspect](inspect-command.md) | ✅ | Syntax check | Check ABAP source files for errors |
13
- | [unit](unit-command.md) | ✅ | Run unit tests | Execute AUnit tests |
14
- | [health](health-command.md) | ✅ | Health check | Verify ABAP REST API is accessible |
15
- | [status](status-command.md) | ✅ | Status check | Check if configured for current repo |
7
+ | Command | Status | Description |
8
+ |---------|--------|-------------|
9
+ | [init](init-command.md) | ✅ | Initialize local configuration |
10
+ | [create](create-command.md) | | Create online repository in ABAP |
11
+ | [import](import-command.md) | ✅ | Import objects from ABAP package to git |
12
+ | [pull](pull-command.md) | ✅ | Pull and activate objects in ABAP |
13
+ | [inspect](inspect-command.md) | ✅ | Syntax check ABAP source files |
14
+ | [unit](unit-command.md) | ✅ | Run AUnit tests |
15
+ | [health](health-command.md) | ✅ | Health check |
16
+ | [status](status-command.md) | ✅ | Status check |
16
17
 
17
18
  ---
18
19
 
19
- ## Implemented Commands
20
+ ## Quick Start
20
21
 
21
- ### Daily Development
22
+ ### New Project Setup
22
23
 
23
24
  ```bash
24
- # Pull changes (auto-detects git remote)
25
- abapgit-agent pull
25
+ # 1. Initialize local configuration
26
+ abapgit-agent init --folder /src --package ZMY_PACKAGE
26
27
 
27
- # Syntax check before commit
28
- abapgit-agent inspect --files abap/zcl_my_class.clas.abap
28
+ # 2. Edit .abapGitAgent with credentials
29
+ vim .abapGitAgent
29
30
 
30
- # Run tests
31
- abapgit-agent unit --files abap/zcl_my_test.clas.testclasses.abap
31
+ # 3. Create online repository in ABAP
32
+ abapgit-agent create
32
33
 
33
- # Check configuration
34
- abapgit-agent status
34
+ # 4. Import objects from ABAP package to git
35
+ abapgit-agent import
35
36
 
36
- # Verify ABAP connection
37
- abapgit-agent health
37
+ # 5. Push to git
38
+ git push origin main
39
+
40
+ # 6. Activate in ABAP
41
+ abapgit-agent pull
38
42
  ```
39
43
 
40
44
  ---
41
45
 
42
- ## TODO Commands (Not Yet Implemented)
43
-
44
- ### New Project Setup
46
+ ## Daily Development
45
47
 
46
48
  ```bash
47
- # 1. Initialize local configuration
48
- abapgit-agent init --folder /src --package ZMY_PACKAGE
49
+ # Pull changes from git and activate in ABAP (auto-detects git remote)
50
+ abapgit-agent pull
49
51
 
50
- # 2. Edit .abapGitAgent with credentials
51
- vim .abapGitAgent
52
+ # Pull specific files only (faster for small changes)
53
+ abapgit-agent pull --files abap/zcl_my_class.clas.abap
52
54
 
53
- # 3. Create online repo and import existing objects
54
- abapgit-agent create --import
55
+ # Syntax check before commit
56
+ abapgit-agent inspect --files abap/zcl_my_class.clas.abap
55
57
 
56
- # 4. Push to git
57
- git push
58
+ # Run unit tests
59
+ abapgit-agent unit --files abap/zcl_my_test.clas.testclasses.abap
58
60
 
59
- # 5. Activate in ABAP
60
- abapgit-agent pull
61
+ # Check configuration
62
+ abapgit-agent status
63
+
64
+ # Verify ABAP connection
65
+ abapgit-agent health
61
66
  ```
62
67
 
63
68
  ---
64
69
 
65
- ## Planned Command Flow
70
+ ## Command Workflow
66
71
 
67
72
  ```
68
73
  ┌─────────────────────────────────────────────────┐
69
- │ init │ ← TODO
74
+ │ init │
70
75
  │ └── Creates .abapGitAgent, CLAUDE.md, /src/ │
71
76
  └─────────────────────────────────────────────────┘
72
77
 
73
78
 
74
79
  ┌─────────────────────────────────────────────────┐
75
- │ create --import ← TODO
76
- │ └── Creates repo in ABAP, imports objects
80
+ │ create
81
+ │ └── Creates online repo in ABAP
82
+ └─────────────────────────────────────────────────┘
83
+
84
+
85
+ ┌─────────────────────────────────────────────────┐
86
+ │ import │
87
+ │ └── Stages, commits, pushes objects to git │
77
88
  └─────────────────────────────────────────────────┘
78
89
 
79
90
 
@@ -1,211 +1,129 @@
1
- # create Command Requirements
2
-
3
- ## Overview
4
-
5
- > **TODO**: This command is not yet implemented.
1
+ # create Command
6
2
 
7
3
  Create a new abapGit online repository in the ABAP system.
8
4
 
9
5
  ## Command
10
6
 
11
7
  ```bash
12
- # Create online repo only
13
8
  abapgit-agent create
14
-
15
- # Create online repo and import existing objects
16
- abapgit-agent create --import
17
9
  ```
18
10
 
19
11
  ## Prerequisite
20
12
 
21
13
  - `init` command has been run successfully
22
- - `.abapGitAgent` file exists
23
- - User has edited `.abapGitAgent` with correct credentials (host, user, password)
14
+ - `.abapGitAgent` file exists with credentials (host, user, password, gitUsername, gitPassword)
24
15
  - Current folder is git repo root
25
16
 
26
- ## Parameters
27
-
28
- | Parameter | Required | Description |
29
- |-----------|----------|-------------|
30
- | `--import` | No | Import existing objects from package to git repo |
31
-
32
- ---
33
-
34
- ## Tasks
35
-
36
- ### 1. Validate Configuration
37
-
38
- ```bash
39
- abapgit-agent status
40
- ```
41
-
42
- - Verify `.abapGitAgent` exists
43
- - Verify git repo is configured
44
-
45
- ```bash
46
- abapgit-agent health
47
- ```
48
-
49
- - Verify ABAP connection is healthy
17
+ ## What It Does
50
18
 
51
- ### 2. Read Configuration
19
+ 1. **Detect git remote** - Gets URL from `git remote get-url origin`
20
+ 2. **Get package** - Reads from `.abapGitAgent`
21
+ 3. **Get folder** - Reads from `.abapGitAgent` (default: `/src/`)
22
+ 4. **Create repository** - Calls ABAP REST API to create online repository
23
+ 5. **Set starting folder** - Configures the folder path in repository settings
52
24
 
53
- Read `.abapGitAgent` and extract:
54
- - `host`, `sapport`, `client`, `user`, `password`, `language`
55
- - `package`
56
- - `folder`
25
+ ## Parameters
57
26
 
58
- ### 3. Get Git Remote URL
27
+ None. The command auto-detects all settings from:
28
+ - Git remote URL
29
+ - `.abapGitAgent` configuration
59
30
 
60
- ```bash
61
- git remote get-url origin
62
- ```
63
-
64
- ### 4. Create abapGit Online Repository
31
+ ## Output
65
32
 
66
- **Endpoint:** `POST /create`
33
+ ### Success
67
34
 
68
- **Request Body:**
69
- ```json
70
- {
71
- "url": "https://github.com/org/repo.git",
72
- "package": "ZMY_PACKAGE",
73
- "folder_logic": "FULL",
74
- "folder": "/src"
75
- }
76
35
  ```
36
+ 🚀 Creating online repository
37
+ URL: https://github.com/org/repo.git
38
+ Package: AUD_TAG
39
+ Folder: /abap/
40
+ Name: abgagt-import
41
+ Branch: main
77
42
 
78
- ### 5. If `--import`: Pull Existing Objects
79
-
80
- - Use `folder` from `.abapGitAgent`
81
- - Pull existing objects from package (no objects if package is empty)
82
- - Write files to folder
83
- - Git commit
84
-
85
- ---
86
-
87
- ## Output
88
-
89
- ### Success (without --import)
90
43
 
91
- ```
92
- ✅ Online repository created successfully
44
+ ✅ Repository created successfully!
93
45
  URL: https://github.com/org/repo.git
94
- Package: ZMY_PACKAGE
95
- Name: repo
46
+ Package: AUD_TAG
47
+ Name: abgagt-import
96
48
 
97
49
  Next steps:
98
- abapgit-agent pull
50
+ abapgit-agent import
99
51
  ```
100
52
 
101
- ### Success (with --import)
53
+ ### Error - Repository Already Exists
102
54
 
103
55
  ```
104
- Online repository created successfully
105
- URL: https://github.com/org/repo.git
106
- Package: ZMY_PACKAGE
107
- Name: repo
56
+ Failed to create repository
57
+ Error: Repository already exists
58
+ ```
108
59
 
109
- Objects imported from package
110
- Files: 15
111
- Commit: feat: initial import from ABAP package ZMY_PACKAGE
60
+ ### Error - Missing Configuration
112
61
 
113
- Next steps:
114
- git push
115
- abapgit-agent pull
62
+ ```
63
+ Failed to create repository
64
+ Error: Package not configured
116
65
  ```
117
66
 
118
- ---
67
+ ## Post-Create Steps
119
68
 
120
- ## Error Handling
69
+ After creating the repository:
121
70
 
122
- | Error | Message |
123
- |-------|---------|
124
- | No .abapGitAgent | Run `init` command first |
125
- | Missing credentials | Edit .abapGitAgent (host, user, password) |
126
- | Health check failed | Check ABAP system connection |
127
- | Repo already exists | Repository already exists in ABAP |
128
- | Package not found | Package ZMY_PACKAGE does not exist |
129
- | API error | Failed to create repository |
71
+ ```bash
72
+ # Import objects from ABAP package to git
73
+ abapgit-agent import
74
+
75
+ # Push to git
76
+ git push origin main
130
77
 
131
- ---
78
+ # Activate in ABAP
79
+ abapgit-agent pull
80
+ ```
132
81
 
133
82
  ## Full Workflow
134
83
 
135
84
  ```
136
- 1. abapgit-agent init --folder /src --package ZMY_PACKAGE
137
- └─> Creates .abapGitAgent, CLAUDE.md, /src/
85
+ 1. abapgit-agent init --folder /src/ --package ZMY_PACKAGE
86
+ └─> Creates .abapGitAgent, CLAUDE.md, /src/, updates .gitignore
138
87
 
139
- 2. Edit .abapGitAgent (host, user, password)
88
+ 2. Edit .abapGitAgent (host, user, password, gitUsername, gitPassword)
140
89
 
141
- 3. abapgit-agent online --import
142
- └─> Creates repo in ABAP, imports objects, commits
90
+ 3. abapgit-agent create
91
+ └─> Creates online repository in ABAP
143
92
 
144
- 4. git push origin main
93
+ 4. abapgit-agent import
94
+ └─> Stages, commits, and pushes all objects from ZMY_PACKAGE
145
95
 
146
- 5. abapgit-agent pull
147
- └─> Activates objects in ABAP
96
+ 5. git pull
97
+ └─> Optionally pull to local folder
98
+
99
+ 6. abapgit-agent pull
100
+ └─> Activate objects in ABAP
148
101
  ```
149
102
 
150
103
  ## Example
151
104
 
152
105
  ```bash
153
106
  # Initialize
154
- abapgit-agent init --folder /abap --package ZMYPROJECT
107
+ abapgit-agent init --folder /src/ --package ZMYPROJECT
155
108
 
156
109
  # Edit config
157
110
  vim .abapGitAgent
158
111
 
159
- # Create online repo with import
160
- abapgit-agent online --import
112
+ # Create repo in ABAP
113
+ abapgit-agent create
161
114
 
162
- # Push to git
163
- git push origin main
115
+ # Import objects to git
116
+ abapgit-agent import
117
+
118
+ # Pull to local folder
119
+ git pull origin main
164
120
 
165
121
  # Activate in ABAP
166
122
  abapgit-agent pull
167
123
  ```
168
124
 
169
- ## API Reference
170
-
171
- ### Create Online Repository
172
-
173
- **Endpoint:** `POST /create`
174
-
175
- **Request:**
176
- ```
177
- POST /online
178
- Content-Type: application/json
179
-
180
- {
181
- "url": "https://github.com/org/repo.git",
182
- "package": "ZMY_PACKAGE",
183
- "folder_logic": "FULL",
184
- "folder": "/src"
185
- }
186
- ```
187
-
188
- **Response:**
189
- ```
190
- HTTP/2 201 Created
191
- Content-Type: application/json
192
-
193
- {
194
- "key": "REPO_KEY_123",
195
- "url": "https://github.com/org/repo.git",
196
- "package": "ZMY_PACKAGE",
197
- "name": "repo"
198
- }
199
- ```
200
-
201
- ### Error Response
125
+ ## Related Commands
202
126
 
203
- ```
204
- HTTP/4xx
205
- Content-Type: application/json
206
-
207
- {
208
- "error": "Repository already exists",
209
- "message": "Repository with URL https://github.com/org/repo.git already exists"
210
- }
211
- ```
127
+ - [`init`](init-command.md) - Initialize local configuration
128
+ - [`import`](import-command.md) - Import objects from package to git
129
+ - [`pull`](pull-command.md) - Pull and activate objects in ABAP
@@ -30,7 +30,7 @@ Add GitHub credentials to `.abapGitAgent`:
30
30
 
31
31
  ```json
32
32
  {
33
- "gitUsername": "I045696",
33
+ "gitUsername": "<your-github-username>",
34
34
  "gitPassword": "ghp_your_github_token"
35
35
  }
36
36
  ```
@@ -38,7 +38,7 @@ Add GitHub credentials to `.abapGitAgent`:
38
38
  ### Environment Variables
39
39
 
40
40
  ```bash
41
- export GIT_USERNAME="I045696"
41
+ export GIT_USERNAME="<your-github-username>"
42
42
  export GIT_PASSWORD="ghp_your_github_token"
43
43
  ```
44
44
 
@@ -46,7 +46,6 @@ export GIT_PASSWORD="ghp_your_github_token"
46
46
 
47
47
  1. Create a PAT at:
48
48
  - GitHub.com: https://github.com/settings/tokens
49
- - GitHub Enterprise: https://github.tools.sap/settings/tokens
50
49
 
51
50
  2. Select scopes:
52
51
  - `repo` - Full control of private repositories
@@ -129,7 +128,7 @@ GitHub credentials not configured or invalid:
129
128
 
130
129
  ```json
131
130
  {
132
- "gitUsername": "I045696",
131
+ "gitUsername": "<your-github-username>",
133
132
  "gitPassword": "ghp_your_token"
134
133
  }
135
134
  ```
@@ -5,7 +5,7 @@ Initialize local configuration for an existing git repository.
5
5
  ## Command
6
6
 
7
7
  ```bash
8
- abapgit-agent init --folder /src --package ZMY_PACKAGE
8
+ abapgit-agent init --folder /src/ --package ZMY_PACKAGE
9
9
  ```
10
10
 
11
11
  ## Prerequisite
@@ -17,7 +17,7 @@ abapgit-agent init --folder /src --package ZMY_PACKAGE
17
17
 
18
18
  | Parameter | Required | Default | Description |
19
19
  |-----------|----------|---------|-------------|
20
- | `--folder` | No | `/src` | Subfolder path for ABAP source files |
20
+ | `--folder` | No | `/src/` | Subfolder path for ABAP source files |
21
21
  | `--package` | Yes | - | Target ABAP package |
22
22
 
23
23
  ## Tasks
@@ -43,26 +43,35 @@ Add to `.abapGitAgent`:
43
43
  ```json
44
44
  {
45
45
  "package": "ZMY_PACKAGE",
46
- "folder": "/src"
46
+ "folder": "/src/"
47
47
  }
48
48
  ```
49
49
 
50
- ### 4. Create Documentation
50
+ ### 4. Create Folder
51
51
 
52
52
  ```bash
53
- cp /path/to/abapgit-agent/abap/CLAUDE.md .
53
+ mkdir -p /src/
54
54
  ```
55
55
 
56
- ### 5. Create Folder
56
+ Add `.gitkeep` (optional):
57
57
 
58
58
  ```bash
59
- mkdir -p /src
59
+ touch /src/.gitkeep
60
60
  ```
61
61
 
62
- Add `.gitkeep` (optional):
62
+ ### 5. Update .gitignore
63
+
64
+ Add sensitive files to `.gitignore`:
65
+
66
+ ```
67
+ .abapGitAgent
68
+ .abapgit_agent_cookies.txt
69
+ ```
70
+
71
+ ### 6. Copy Documentation
63
72
 
64
73
  ```bash
65
- touch /src/.gitkeep
74
+ cp /path/to/abapgit-agent/abap/CLAUDE.md .
66
75
  ```
67
76
 
68
77
  ## Output Files
@@ -70,25 +79,27 @@ touch /src/.gitkeep
70
79
  | File | Description |
71
80
  |------|-------------|
72
81
  | `.abapGitAgent` | Configuration (user must edit host, user, password, gitUsername, gitPassword) |
82
+ | `.gitignore` | Updated with sensitive files |
73
83
  | `CLAUDE.md` | ABAP coding guidelines |
74
84
  | `/src/` | Folder for ABAP source files |
75
85
 
76
86
  ## .abapGitAgent Contents
77
87
 
78
- After `init` command:
88
+ After `init` command, `.abapGitAgent` contains:
79
89
 
80
90
  ```json
81
91
  {
82
- "host": "<user must edit>",
92
+ "host": "your-sap-system.com",
83
93
  "sapport": 443,
84
94
  "client": "100",
85
- "user": "<user must edit>",
86
- "password": "<user must edit>",
95
+ "user": "TECH_USER",
96
+ "password": "your-password",
87
97
  "language": "EN",
88
- "gitUsername": "<user must edit for GitHub>",
89
- "gitPassword": "<user must edit for GitHub>",
98
+ "gitUsername": "github-username",
99
+ "gitPassword": "github-token",
100
+ "referenceFolder": "~/abap-reference",
90
101
  "package": "ZMY_PACKAGE",
91
- "folder": "/src"
102
+ "folder": "/src/"
92
103
  }
93
104
  ```
94
105
 
@@ -98,13 +109,12 @@ For the `import` command to work, you need to configure GitHub credentials:
98
109
 
99
110
  1. Create a GitHub Personal Access Token (PAT):
100
111
  - GitHub.com: https://github.com/settings/tokens
101
- - GitHub Enterprise: https://github.tools.sap/settings/tokens
102
112
 
103
113
  2. Add to `.abapGitAgent`:
104
114
 
105
115
  ```json
106
116
  {
107
- "gitUsername": "I045696",
117
+ "gitUsername": "<your-github-username>",
108
118
  "gitPassword": "ghp_your_token_here"
109
119
  }
110
120
  ```
@@ -112,7 +122,7 @@ For the `import` command to work, you need to configure GitHub credentials:
112
122
  Or set environment variables:
113
123
 
114
124
  ```bash
115
- export GIT_USERNAME="I045696"
125
+ export GIT_USERNAME="<your-github-username>"
116
126
  export GIT_PASSWORD="ghp_your_token_here"
117
127
  ```
118
128
 
@@ -132,8 +142,8 @@ export GIT_PASSWORD="ghp_your_token_here"
132
142
  ## Full Workflow
133
143
 
134
144
  ```
135
- 1. abapgit-agent init --folder /src --package ZMY_PACKAGE
136
- └─> Creates .abapGitAgent, CLAUDE.md, /src/
145
+ 1. abapgit-agent init --folder /src/ --package ZMY_PACKAGE
146
+ └─> Creates .abapGitAgent, CLAUDE.md, /src/, updates .gitignore
137
147
 
138
148
  2. Edit .abapGitAgent (host, user, password, gitUsername, gitPassword)
139
149
 
@@ -145,13 +155,16 @@ export GIT_PASSWORD="ghp_your_token_here"
145
155
 
146
156
  5. git pull
147
157
  └─> Optionally pull to local folder
158
+
159
+ 6. abapgit-agent pull
160
+ └─> Activate objects in ABAP
148
161
  ```
149
162
 
150
163
  ## Example
151
164
 
152
165
  ```bash
153
166
  # Initialize
154
- abapgit-agent init --folder /abap --package ZMYPROJECT
167
+ abapgit-agent init --folder /abap/ --package ZMYPROJECT
155
168
 
156
169
  # Edit config
157
170
  vim .abapGitAgent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abapgit-agent",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "ABAP Git Agent - Pull and activate ABAP code via abapGit from any git repository",
5
5
  "main": "src/index.js",
6
6
  "bin": {