@dccxx/auggiegw 1.0.5 → 1.0.6
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 +180 -46
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,104 +1,238 @@
|
|
|
1
1
|
# @dccxx/auggiegw
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A CLI tool for managing Augment Gateway authentication, proxy configuration, and custom prompts. This tool simplifies the workflow of authenticating with Augment Gateway, fetching proxy configurations, and managing custom prompts for the Augment AI assistant.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🔐 **Authentication Management**: Login/logout with secure credential storage
|
|
8
|
+
- 🌐 **Proxy Configuration**: Automatic proxy setup and authentication
|
|
9
|
+
- 📝 **Custom Prompts**: Fetch and save custom prompts to `~/.augment/commands/`
|
|
10
|
+
- 🔄 **Auggie Integration**: Seamlessly forward commands to the Auggie CLI
|
|
11
|
+
- ⚡ **Command Execution**: Execute any command with automatic session setup
|
|
4
12
|
|
|
5
13
|
## Installation
|
|
6
14
|
|
|
7
|
-
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @dccxx/auggiegw
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
or with Bun:
|
|
8
20
|
|
|
9
21
|
```bash
|
|
10
|
-
bun install
|
|
22
|
+
bun install -g @dccxx/auggiegw
|
|
11
23
|
```
|
|
12
24
|
|
|
13
|
-
##
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
1. **Login to Augment Gateway**:
|
|
28
|
+
```bash
|
|
29
|
+
auggiegw login
|
|
30
|
+
```
|
|
31
|
+
You'll be prompted for your username and password.
|
|
32
|
+
|
|
33
|
+
2. **Fetch Configuration**:
|
|
34
|
+
```bash
|
|
35
|
+
auggiegw fetch
|
|
36
|
+
```
|
|
37
|
+
This fetches proxy configuration, authenticates, and downloads custom prompts.
|
|
38
|
+
|
|
39
|
+
## Commands
|
|
14
40
|
|
|
15
|
-
|
|
41
|
+
### `auggiegw login [username] [password]`
|
|
16
42
|
|
|
43
|
+
Login and store credentials securely.
|
|
44
|
+
|
|
45
|
+
**Interactive Mode** (Recommended):
|
|
17
46
|
```bash
|
|
18
|
-
|
|
47
|
+
auggiegw login
|
|
19
48
|
```
|
|
49
|
+
You'll be prompted to enter your username and password. The password input is hidden for security.
|
|
20
50
|
|
|
21
|
-
|
|
22
|
-
|
|
51
|
+
**Direct Mode**:
|
|
23
52
|
```bash
|
|
24
|
-
|
|
53
|
+
auggiegw login myusername mypassword
|
|
25
54
|
```
|
|
26
55
|
|
|
27
|
-
|
|
56
|
+
**What it does**:
|
|
57
|
+
- Authenticates with the Augment Gateway API
|
|
58
|
+
- Stores credentials in `~/.auggiegw/auth.json`
|
|
59
|
+
- Token is used for subsequent commands
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### `auggiegw logout`
|
|
64
|
+
|
|
65
|
+
Logout and remove stored credentials.
|
|
28
66
|
|
|
29
67
|
```bash
|
|
30
|
-
|
|
68
|
+
auggiegw logout
|
|
31
69
|
```
|
|
32
70
|
|
|
33
|
-
|
|
71
|
+
**What it does**:
|
|
72
|
+
- Deletes the authentication file (`~/.auggiegw/auth.json`)
|
|
73
|
+
- Removes stored credentials from your system
|
|
34
74
|
|
|
35
|
-
|
|
75
|
+
---
|
|
36
76
|
|
|
37
|
-
|
|
77
|
+
### `auggiegw fetch`
|
|
38
78
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
Set the `AUGGIEGW_AUTH_TOKEN` environment variable with your authentication token:
|
|
79
|
+
Fetch proxy configuration, authenticate, and download custom prompts.
|
|
42
80
|
|
|
43
81
|
```bash
|
|
44
|
-
|
|
82
|
+
auggiegw fetch
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**What it does**:
|
|
86
|
+
1. Retrieves proxy configuration from Augment Gateway
|
|
87
|
+
2. Authenticates the proxy
|
|
88
|
+
3. Saves Augment session to `~/.augment/session.json`
|
|
89
|
+
4. Fetches all custom prompts from the server
|
|
90
|
+
5. Saves prompts as markdown files in `~/.augment/commands/`
|
|
91
|
+
|
|
92
|
+
**Output Example**:
|
|
45
93
|
```
|
|
94
|
+
✔ Successfully saved 15 prompts
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
46
98
|
|
|
47
|
-
|
|
99
|
+
### `auggiegw auggie [args...]`
|
|
48
100
|
|
|
49
|
-
|
|
101
|
+
Forward commands to the Auggie CLI with automatic configuration.
|
|
50
102
|
|
|
51
|
-
|
|
103
|
+
```bash
|
|
104
|
+
auggiegw auggie [auggie-arguments]
|
|
105
|
+
```
|
|
52
106
|
|
|
107
|
+
**Examples**:
|
|
53
108
|
```bash
|
|
54
|
-
|
|
109
|
+
# Run Auggie with help
|
|
110
|
+
auggiegw auggie --help
|
|
55
111
|
```
|
|
56
112
|
|
|
57
|
-
|
|
113
|
+
**What it does**:
|
|
114
|
+
1. Runs `auggiegw fetch` to ensure configuration is up-to-date
|
|
115
|
+
2. Forwards all arguments to the `auggie` command
|
|
116
|
+
3. Inherits stdio for interactive sessions
|
|
58
117
|
|
|
59
|
-
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
### `auggiegw exec <command> [args...]`
|
|
121
|
+
|
|
122
|
+
Execute any custom command with automatic session setup.
|
|
60
123
|
|
|
61
|
-
#### Login
|
|
62
124
|
```bash
|
|
63
|
-
auggiegw
|
|
125
|
+
auggiegw exec <command> [arguments]
|
|
64
126
|
```
|
|
65
127
|
|
|
66
|
-
|
|
128
|
+
**Examples**:
|
|
67
129
|
```bash
|
|
68
|
-
auggiegw
|
|
130
|
+
auggiegw exec auggie --help
|
|
69
131
|
```
|
|
70
132
|
|
|
71
|
-
|
|
133
|
+
**What it does**:
|
|
134
|
+
1. Runs `auggiegw fetch` to ensure configuration is up-to-date
|
|
135
|
+
2. Executes the specified command with provided arguments
|
|
136
|
+
3. Inherits stdio for interactive sessions
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Authentication Methods
|
|
141
|
+
|
|
142
|
+
### Method 1: Login Command (Recommended for Local Development)
|
|
143
|
+
|
|
72
144
|
```bash
|
|
73
|
-
auggiegw
|
|
145
|
+
auggiegw login
|
|
74
146
|
```
|
|
75
147
|
|
|
76
|
-
|
|
148
|
+
Credentials are stored in `~/.auggiegw/auth.json` and automatically used for subsequent commands.
|
|
149
|
+
|
|
150
|
+
### Method 2: Environment Variable (Recommended for CI/CD)
|
|
151
|
+
|
|
152
|
+
Set the `AUGGIEGW_AUTH_TOKEN` environment variable:
|
|
153
|
+
|
|
77
154
|
```bash
|
|
78
|
-
|
|
155
|
+
export AUGGIEGW_AUTH_TOKEN=your_token_here
|
|
79
156
|
```
|
|
80
157
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
158
|
+
When this environment variable is set, the CLI uses it directly without requiring the login command or auth.json file.
|
|
159
|
+
|
|
160
|
+
**Example in CI/CD**:
|
|
161
|
+
```yaml
|
|
162
|
+
# GitHub Actions example
|
|
163
|
+
env:
|
|
164
|
+
AUGGIEGW_AUTH_TOKEN: ${{ secrets.AUGGIEGW_AUTH_TOKEN }}
|
|
84
165
|
```
|
|
85
166
|
|
|
86
|
-
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Configuration
|
|
87
170
|
|
|
88
|
-
|
|
171
|
+
### File Locations
|
|
89
172
|
|
|
90
|
-
|
|
91
|
-
|
|
173
|
+
- **Auth Data**: `~/.auggiegw/auth.json`
|
|
174
|
+
- **Augment Session**: `~/.augment/session.json`
|
|
175
|
+
- **Custom Prompts**: `~/.augment/commands/*.md`
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Custom Prompts
|
|
180
|
+
|
|
181
|
+
Custom prompts are fetched from the Augment Gateway and saved as markdown files in `~/.augment/commands/`. Each prompt file follows this format:
|
|
182
|
+
|
|
183
|
+
```markdown
|
|
184
|
+
---
|
|
185
|
+
description: Prompt Name
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
Prompt content goes here...
|
|
92
189
|
```
|
|
93
190
|
|
|
94
|
-
|
|
191
|
+
The filename corresponds to the command name (e.g., `my-command.md`).
|
|
95
192
|
|
|
96
|
-
|
|
97
|
-
- `dist/` - Compiled JavaScript output (generated by build)
|
|
98
|
-
- `tsconfig.json` - TypeScript configuration
|
|
99
|
-
- `biome.json` - Biome linter configuration
|
|
193
|
+
---
|
|
100
194
|
|
|
101
195
|
## Requirements
|
|
102
196
|
|
|
103
|
-
- Node.js >= 18.0.0
|
|
104
|
-
- Bun
|
|
197
|
+
- **Node.js**: >= 18.0.0
|
|
198
|
+
- **Bun**: For package management and running scripts (development)
|
|
199
|
+
- **Auggie CLI**: Required for `auggiegw auggie` command
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Troubleshooting
|
|
204
|
+
|
|
205
|
+
### "Not logged in" Error
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
Error: Not logged in. Please run "auggiegw login" first.
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Solution**: Run `auggiegw login` to authenticate.
|
|
212
|
+
|
|
213
|
+
### "Failed to get proxy" Error
|
|
214
|
+
|
|
215
|
+
**Possible causes**:
|
|
216
|
+
- Invalid credentials
|
|
217
|
+
- Network connectivity issues
|
|
218
|
+
- API endpoint unavailable
|
|
219
|
+
|
|
220
|
+
**Solution**:
|
|
221
|
+
1. Verify your credentials with `auggiegw logout` then `auggiegw login`
|
|
222
|
+
2. Check your network connection
|
|
223
|
+
3. Verify the API URL is correct
|
|
224
|
+
|
|
225
|
+
### "No proxy data available" Error
|
|
226
|
+
|
|
227
|
+
**Solution**: Contact your administrator to ensure your account has proxy access configured.
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## License
|
|
232
|
+
|
|
233
|
+
See LICENSE file for details.
|
|
234
|
+
|
|
235
|
+
## Support
|
|
236
|
+
|
|
237
|
+
For issues and questions, please open an issue on the GitHub repository.
|
|
238
|
+
|