@augmentcode/auggie-sdk 0.1.12 → 0.1.13

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 CHANGED
@@ -312,9 +312,32 @@ const client = await Auggie.create({
312
312
  allowIndexing: true,
313
313
  apiKey: "your-api-key", // Optional
314
314
  apiUrl: "https://your-tenant.api.augmentcode.com", // Required when apiKey is provided
315
+ cliArgs: ["--verbose", "--timeout=30"], // Optional: Additional CLI arguments
315
316
  });
316
317
  ```
317
318
 
319
+ ### Advanced CLI Arguments
320
+
321
+ The `cliArgs` option allows you to pass additional command-line arguments directly to the Auggie CLI process. These arguments are appended after all SDK-generated flags.
322
+
323
+ ```typescript
324
+ // Pass custom CLI flags
325
+ const client = await Auggie.create({
326
+ model: "sonnet4.5",
327
+ cliArgs: ["--verbose", "--log-level=debug"]
328
+ });
329
+
330
+ // Arguments can use either format:
331
+ // 1. Separate flag and value: ["--timeout", "30"]
332
+ // 2. Combined with equals: ["--timeout=30"]
333
+ const client2 = await Auggie.create({
334
+ model: "sonnet4.5",
335
+ cliArgs: ["--timeout=60", "--retries", "3"]
336
+ });
337
+ ```
338
+
339
+ Use this option for advanced configurations or experimental flags not exposed through standard SDK options. Refer to `auggie --help` for available CLI flags.
340
+
318
341
  ## Context Modes
319
342
 
320
343
  The SDK provides two context modes for codebase indexing and search.
@@ -458,6 +481,7 @@ Creates and initializes a new Auggie instance. This method automatically connect
458
481
  - `apiKey?: string` - API key for authentication (optional, sets AUGMENT_API_TOKEN)
459
482
  - `apiUrl?: string` - API URL for authentication (optional, sets AUGMENT_API_URL)
460
483
  - `excludedTools?: ToolIdentifier[]` - List of tool identifiers to exclude/disable (optional)
484
+ - `cliArgs?: string[]` - Additional command-line arguments to pass to the Auggie CLI process (optional, default: [])
461
485
 
462
486
  When `tools` (or `toolsMap`) is provided, an MCP server is automatically started and connected to the session.
463
487
 
@@ -39,6 +39,33 @@ type AuggieOptions = {
39
39
  * ```
40
40
  */
41
41
  excludedTools?: ToolIdentifier[];
42
+ /**
43
+ * Additional command-line arguments to pass to the Auggie CLI process.
44
+ * These arguments are appended to the CLI command when spawning the process.
45
+ *
46
+ * Use this option to pass custom or advanced CLI flags that are not
47
+ * directly exposed through other AuggieOptions properties.
48
+ *
49
+ * Arguments can be provided as:
50
+ * - Flag-only arguments: `"--verbose"`
51
+ * - Flag with value (separate strings): `"--timeout", "30"`
52
+ * - Flag with value (single string): `"--timeout=30"`
53
+ *
54
+ * @example
55
+ * ```typescript
56
+ * // Pass a single flag
57
+ * cliArgs: ["--verbose"]
58
+ *
59
+ * // Pass multiple arguments with values
60
+ * cliArgs: ["--timeout", "30", "--retries", "3"]
61
+ *
62
+ * // Pass flags with equals-style values
63
+ * cliArgs: ["--timeout=30", "--retries=3"]
64
+ * ```
65
+ *
66
+ * @default []
67
+ */
68
+ cliArgs?: string[];
42
69
  };
43
70
  /**
44
71
  * ACP Client for connecting to Auggie as an ACP server
@@ -65,6 +92,7 @@ declare class Auggie {
65
92
  private readonly apiUrl;
66
93
  private readonly rules;
67
94
  private readonly excludedTools;
95
+ private readonly cliArgs;
68
96
  private constructor();
69
97
  /**
70
98
  * Create and initialize a new Auggie instance
@@ -24,6 +24,7 @@ class Auggie {
24
24
  apiUrl;
25
25
  rules;
26
26
  excludedTools;
27
+ cliArgs;
27
28
  constructor({
28
29
  auggiePath = "auggie",
29
30
  workspaceRoot,
@@ -32,7 +33,8 @@ class Auggie {
32
33
  apiKey,
33
34
  apiUrl = process.env.AUGMENT_API_URL || "https://api.augmentcode.com",
34
35
  rules,
35
- excludedTools
36
+ excludedTools,
37
+ cliArgs = []
36
38
  } = {}) {
37
39
  this.auggiePath = auggiePath;
38
40
  this.workspaceRoot = workspaceRoot;
@@ -42,6 +44,7 @@ class Auggie {
42
44
  this.apiUrl = apiUrl;
43
45
  this.rules = rules;
44
46
  this.excludedTools = excludedTools;
47
+ this.cliArgs = cliArgs;
45
48
  }
46
49
  /**
47
50
  * Create and initialize a new Auggie instance
@@ -81,6 +84,9 @@ class Auggie {
81
84
  args.push("--remove-tool", tool);
82
85
  }
83
86
  }
87
+ if (this.cliArgs.length > 0) {
88
+ args.push(...this.cliArgs);
89
+ }
84
90
  const pathParts = this.auggiePath.trim().split(Auggie.PATH_SPLIT_REGEX);
85
91
  if (pathParts.length === 0 || !pathParts[0]) {
86
92
  throw new Error("Invalid auggiePath: cannot be empty");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augmentcode/auggie-sdk",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "TypeScript SDK for Auggie",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",