indusagi-coding-agent 0.1.28 → 0.1.30

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 (147) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE.md +22 -0
  3. package/README.md +2 -0
  4. package/dist/core/messages.d.ts +1 -76
  5. package/dist/core/messages.d.ts.map +1 -1
  6. package/dist/core/messages.js +1 -122
  7. package/dist/core/messages.js.map +1 -1
  8. package/dist/core/session-manager.d.ts +1 -447
  9. package/dist/core/session-manager.d.ts.map +1 -1
  10. package/dist/core/session-manager.js +1 -1203
  11. package/dist/core/session-manager.js.map +1 -1
  12. package/package.json +2 -2
  13. package/docs/COMPLETE-GUIDE.md +0 -300
  14. package/docs/COMPREHENSIVE-CLI-SUMMARY.md +0 -900
  15. package/docs/MODES-ARCHITECTURE.md +0 -565
  16. package/docs/PRINT-MODE-GUIDE.md +0 -456
  17. package/docs/README.md +0 -78
  18. package/docs/RPC-GUIDE.md +0 -705
  19. package/docs/UTILS-IMPLEMENTATION-SUMMARY.md +0 -647
  20. package/docs/UTILS-MODULE-OVERVIEW.md +0 -1480
  21. package/docs/UTILS-QA-CHECKLIST.md +0 -1061
  22. package/docs/UTILS-USAGE-GUIDE.md +0 -1419
  23. package/docs/compaction.md +0 -390
  24. package/docs/custom-provider.md +0 -538
  25. package/docs/development.md +0 -69
  26. package/docs/extensions.md +0 -1733
  27. package/docs/hooks.md +0 -378
  28. package/docs/images/doom-extension.png +0 -0
  29. package/docs/images/interactive-mode.png +0 -0
  30. package/docs/images/tree-view.png +0 -0
  31. package/docs/json.md +0 -79
  32. package/docs/keybindings.md +0 -162
  33. package/docs/models.md +0 -193
  34. package/docs/packages.md +0 -163
  35. package/docs/prompt-templates.md +0 -67
  36. package/docs/providers.md +0 -147
  37. package/docs/rpc.md +0 -1048
  38. package/docs/sdk.md +0 -969
  39. package/docs/session.md +0 -412
  40. package/docs/settings.md +0 -219
  41. package/docs/shell-aliases.md +0 -13
  42. package/docs/skills.md +0 -226
  43. package/docs/subagents.md +0 -225
  44. package/docs/terminal-setup.md +0 -65
  45. package/docs/themes.md +0 -295
  46. package/docs/tree.md +0 -219
  47. package/docs/tui.md +0 -887
  48. package/docs/web-tools.md +0 -304
  49. package/docs/windows.md +0 -17
  50. package/examples/README.md +0 -25
  51. package/examples/extensions/README.md +0 -192
  52. package/examples/extensions/antigravity-image-gen.ts +0 -414
  53. package/examples/extensions/auto-commit-on-exit.ts +0 -49
  54. package/examples/extensions/bookmark.ts +0 -50
  55. package/examples/extensions/claude-rules.ts +0 -86
  56. package/examples/extensions/confirm-destructive.ts +0 -59
  57. package/examples/extensions/custom-compaction.ts +0 -115
  58. package/examples/extensions/custom-footer.ts +0 -65
  59. package/examples/extensions/custom-header.ts +0 -73
  60. package/examples/extensions/custom-provider-anthropic/index.ts +0 -605
  61. package/examples/extensions/custom-provider-anthropic/package-lock.json +0 -24
  62. package/examples/extensions/custom-provider-anthropic/package.json +0 -19
  63. package/examples/extensions/custom-provider-gitlab-duo/index.ts +0 -350
  64. package/examples/extensions/custom-provider-gitlab-duo/package.json +0 -16
  65. package/examples/extensions/custom-provider-gitlab-duo/test.ts +0 -83
  66. package/examples/extensions/dirty-repo-guard.ts +0 -56
  67. package/examples/extensions/doom-overlay/README.md +0 -46
  68. package/examples/extensions/doom-overlay/doom/build/doom.js +0 -21
  69. package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
  70. package/examples/extensions/doom-overlay/doom/build.sh +0 -152
  71. package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +0 -72
  72. package/examples/extensions/doom-overlay/doom-component.ts +0 -133
  73. package/examples/extensions/doom-overlay/doom-engine.ts +0 -173
  74. package/examples/extensions/doom-overlay/doom-keys.ts +0 -105
  75. package/examples/extensions/doom-overlay/index.ts +0 -74
  76. package/examples/extensions/doom-overlay/wad-finder.ts +0 -51
  77. package/examples/extensions/event-bus.ts +0 -43
  78. package/examples/extensions/file-trigger.ts +0 -41
  79. package/examples/extensions/git-checkpoint.ts +0 -53
  80. package/examples/extensions/handoff.ts +0 -151
  81. package/examples/extensions/hello.ts +0 -25
  82. package/examples/extensions/inline-bash.ts +0 -94
  83. package/examples/extensions/input-transform.ts +0 -43
  84. package/examples/extensions/interactive-shell.ts +0 -196
  85. package/examples/extensions/mac-system-theme.ts +0 -47
  86. package/examples/extensions/message-renderer.ts +0 -60
  87. package/examples/extensions/modal-editor.ts +0 -86
  88. package/examples/extensions/model-status.ts +0 -31
  89. package/examples/extensions/notify.ts +0 -25
  90. package/examples/extensions/overlay-qa-tests.ts +0 -882
  91. package/examples/extensions/overlay-test.ts +0 -151
  92. package/examples/extensions/permission-gate.ts +0 -34
  93. package/examples/extensions/pirate.ts +0 -47
  94. package/examples/extensions/plan-mode/README.md +0 -65
  95. package/examples/extensions/plan-mode/index.ts +0 -341
  96. package/examples/extensions/plan-mode/utils.ts +0 -168
  97. package/examples/extensions/preset.ts +0 -399
  98. package/examples/extensions/protected-paths.ts +0 -30
  99. package/examples/extensions/qna.ts +0 -120
  100. package/examples/extensions/question.ts +0 -265
  101. package/examples/extensions/questionnaire.ts +0 -428
  102. package/examples/extensions/rainbow-editor.ts +0 -88
  103. package/examples/extensions/sandbox/index.ts +0 -318
  104. package/examples/extensions/sandbox/package-lock.json +0 -92
  105. package/examples/extensions/sandbox/package.json +0 -19
  106. package/examples/extensions/send-user-message.ts +0 -97
  107. package/examples/extensions/session-name.ts +0 -27
  108. package/examples/extensions/shutdown-command.ts +0 -63
  109. package/examples/extensions/snake.ts +0 -344
  110. package/examples/extensions/space-invaders.ts +0 -561
  111. package/examples/extensions/ssh.ts +0 -220
  112. package/examples/extensions/status-line.ts +0 -40
  113. package/examples/extensions/subagent/README.md +0 -172
  114. package/examples/extensions/subagent/agents/planner.md +0 -37
  115. package/examples/extensions/subagent/agents/reviewer.md +0 -35
  116. package/examples/extensions/subagent/agents/scout.md +0 -50
  117. package/examples/extensions/subagent/agents/worker.md +0 -24
  118. package/examples/extensions/subagent/agents.ts +0 -127
  119. package/examples/extensions/subagent/index.ts +0 -964
  120. package/examples/extensions/subagent/prompts/implement-and-review.md +0 -10
  121. package/examples/extensions/subagent/prompts/implement.md +0 -10
  122. package/examples/extensions/subagent/prompts/scout-and-plan.md +0 -9
  123. package/examples/extensions/summarize.ts +0 -196
  124. package/examples/extensions/timed-confirm.ts +0 -70
  125. package/examples/extensions/todo.ts +0 -300
  126. package/examples/extensions/tool-override.ts +0 -144
  127. package/examples/extensions/tools.ts +0 -147
  128. package/examples/extensions/trigger-compact.ts +0 -40
  129. package/examples/extensions/truncated-tool.ts +0 -193
  130. package/examples/extensions/widget-placement.ts +0 -17
  131. package/examples/extensions/with-deps/index.ts +0 -36
  132. package/examples/extensions/with-deps/package-lock.json +0 -31
  133. package/examples/extensions/with-deps/package.json +0 -22
  134. package/examples/sdk/01-minimal.ts +0 -22
  135. package/examples/sdk/02-custom-model.ts +0 -50
  136. package/examples/sdk/03-custom-prompt.ts +0 -55
  137. package/examples/sdk/04-skills.ts +0 -46
  138. package/examples/sdk/05-tools.ts +0 -56
  139. package/examples/sdk/06-extensions.ts +0 -88
  140. package/examples/sdk/07-context-files.ts +0 -40
  141. package/examples/sdk/08-prompt-templates.ts +0 -47
  142. package/examples/sdk/09-api-keys-and-oauth.ts +0 -48
  143. package/examples/sdk/10-settings.ts +0 -38
  144. package/examples/sdk/11-sessions.ts +0 -48
  145. package/examples/sdk/12-full-control.ts +0 -82
  146. package/examples/sdk/13-codex-oauth.ts +0 -37
  147. package/examples/sdk/README.md +0 -144
package/docs/models.md DELETED
@@ -1,193 +0,0 @@
1
- # Custom Models
2
-
3
- Add custom providers and models (Ollama, vLLM, LM Studio, proxies) via `~/.indusagi/agent/models.json`.
4
-
5
- ## Table of Contents
6
-
7
- - [Basic Example](#basic-example)
8
- - [Supported APIs](#supported-apis)
9
- - [Provider Configuration](#provider-configuration)
10
- - [Model Configuration](#model-configuration)
11
- - [Overriding Built-in Providers](#overriding-built-in-providers)
12
- - [OpenAI Compatibility](#openai-compatibility)
13
-
14
- ## Basic Example
15
-
16
- ```json
17
- {
18
- "providers": {
19
- "ollama": {
20
- "baseUrl": "http://localhost:11434/v1",
21
- "api": "openai-completions",
22
- "models": [
23
- {
24
- "id": "llama-3.1-8b",
25
- "name": "Llama 3.1 8B (Local)",
26
- "contextWindow": 128000,
27
- "maxTokens": 32000
28
- }
29
- ]
30
- }
31
- }
32
- }
33
- ```
34
-
35
- The file reloads each time you open `/model`. Edit during session; no restart needed.
36
-
37
- ## Supported APIs
38
-
39
- | API | Description |
40
- |-----|-------------|
41
- | `openai-completions` | OpenAI Chat Completions (most compatible) |
42
- | `openai-responses` | OpenAI Responses API |
43
- | `anthropic-messages` | Anthropic Messages API |
44
- | `google-generative-ai` | Google Generative AI |
45
-
46
- Set `api` at provider level (default for all models) or model level (override per model).
47
-
48
- ## Provider Configuration
49
-
50
- | Field | Description |
51
- |-------|-------------|
52
- | `baseUrl` | API endpoint URL |
53
- | `api` | API type (see above) |
54
- | `apiKey` | API key (see value resolution below) |
55
- | `headers` | Custom headers (see value resolution below) |
56
- | `authHeader` | Set `true` to add `Authorization: Bearer <apiKey>` automatically |
57
- | `models` | Array of model configurations |
58
-
59
- ### Value Resolution
60
-
61
- The `apiKey` and `headers` fields support three formats:
62
-
63
- - **Shell command:** `"!command"` executes and uses stdout
64
- ```json
65
- "apiKey": "!security find-generic-password -ws 'anthropic'"
66
- "apiKey": "!op read 'op://vault/item/credential'"
67
- ```
68
- - **Environment variable:** Uses the value of the named variable
69
- ```json
70
- "apiKey": "MY_AINDUSAGI_KEY"
71
- ```
72
- - **Literal value:** Used directly
73
- ```json
74
- "apiKey": "sk-..."
75
- ```
76
-
77
- ### Custom Headers
78
-
79
- ```json
80
- {
81
- "providers": {
82
- "custom-proxy": {
83
- "baseUrl": "https://proxy.example.com/v1",
84
- "apiKey": "MY_AINDUSAGI_KEY",
85
- "api": "anthropic-messages",
86
- "headers": {
87
- "x-portkey-api-key": "PORTKEY_AINDUSAGI_KEY",
88
- "x-secret": "!op read 'op://vault/item/secret'"
89
- },
90
- "models": [...]
91
- }
92
- }
93
- }
94
- ```
95
-
96
- ## Model Configuration
97
-
98
- | Field | Required | Description |
99
- |-------|----------|-------------|
100
- | `id` | Yes | Model identifier |
101
- | `name` | No | Display name |
102
- | `api` | No | Override provider's API for this model |
103
- | `contextWindow` | No | Context window size in tokens |
104
- | `maxTokens` | No | Maximum output tokens |
105
- | `reasoning` | No | Supports extended thinking |
106
- | `input` | No | Input types: `["text"]` or `["text", "image"]` |
107
- | `cost` | No | `{"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}` |
108
-
109
- ## Overriding Built-in Providers
110
-
111
- Route a built-in provider through a proxy without redefining models:
112
-
113
- ```json
114
- {
115
- "providers": {
116
- "anthropic": {
117
- "baseUrl": "https://my-proxy.example.com/v1"
118
- }
119
- }
120
- }
121
- ```
122
-
123
- All built-in Anthropic models remain available. Existing OAuth or API key auth continues to work.
124
-
125
- To fully replace a built-in provider with custom models, include the `models` array:
126
-
127
- ```json
128
- {
129
- "providers": {
130
- "anthropic": {
131
- "baseUrl": "https://my-proxy.example.com/v1",
132
- "apiKey": "ANTHROPIC_AINDUSAGI_KEY",
133
- "api": "anthropic-messages",
134
- "models": [...]
135
- }
136
- }
137
- }
138
- ```
139
-
140
- ## OpenAI Compatibility
141
-
142
- For providers with partial OpenAI compatibility, use the `compat` field:
143
-
144
- ```json
145
- {
146
- "providers": {
147
- "local-llm": {
148
- "baseUrl": "http://localhost:8080/v1",
149
- "api": "openai-completions",
150
- "compat": {
151
- "supportsUsageInStreaming": false,
152
- "maxTokensField": "max_tokens"
153
- },
154
- "models": [...]
155
- }
156
- }
157
- }
158
- ```
159
-
160
- | Field | Description |
161
- |-------|-------------|
162
- | `supportsStore` | Provider supports `store` field |
163
- | `supportsDeveloperRole` | Use `developer` vs `system` role |
164
- | `supportsReasoningEffort` | Support for `reasoning_effort` parameter |
165
- | `supportsUsageInStreaming` | Supports `stream_options: { include_usage: true }` (default: `true`) |
166
- | `maxTokensField` | Use `max_completion_tokens` or `max_tokens` |
167
- | `openRouterRouting` | OpenRouter routing config passed to OpenRouter for model/provider selection |
168
-
169
- Example:
170
-
171
- ```json
172
- {
173
- "providers": {
174
- "openrouter": {
175
- "baseUrl": "https://openrouter.ai/api/v1",
176
- "apiKey": "OPENROUTER_AINDUSAGI_KEY",
177
- "api": "openai-completions",
178
- "models": [
179
- {
180
- "id": "openrouter/anthropic/claude-3.5-sonnet",
181
- "name": "OpenRouter Claude 3.5 Sonnet",
182
- "compat": {
183
- "openRouterRouting": {
184
- "order": ["anthropic"],
185
- "fallbacks": ["openai"]
186
- }
187
- }
188
- }
189
- ]
190
- }
191
- }
192
- }
193
- ```
package/docs/packages.md DELETED
@@ -1,163 +0,0 @@
1
- > indusagi can help you create indusagi packages. Ask it to bundle your extensions, skills, prompt templates, or themes.
2
-
3
- # Indusagi Packages
4
-
5
- Indusagi packages bundle extensions, skills, prompt templates, and themes so you can share them through npm or git. A package can declare resources in `package.json` under the `indusagi` key, or use conventional directories.
6
-
7
- ## Table of Contents
8
-
9
- - [Install and Manage](#install-and-manage)
10
- - [Package Sources](#package-sources)
11
- - [Creating a Indusagi Package](#creating-a-indusagi-package)
12
- - [Package Structure](#package-structure)
13
- - [Package Filtering](#package-filtering)
14
- - [Enable and Disable Resources](#enable-and-disable-resources)
15
- - [Scope and Deduplication](#scope-and-deduplication)
16
-
17
- ## Install and Manage
18
-
19
- > **Security:** Indusagi packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages.
20
-
21
- ```bash
22
- indusagi install npm:@foo/bar@1.0.0
23
- indusagi install git:github.com/user/repo@v1
24
- indusagi install https://github.com/user/repo # raw URLs work too
25
-
26
- indusagi remove npm:@foo/bar
27
- indusagi list # show installed packages from settings
28
- indusagi update # update all non-pinned packages
29
- ```
30
-
31
- By default, `install` and `remove` write to global settings (`~/.indusagi/agent/settings.json`). Use `-l` to write to project settings (`.indusagi/settings.json`) instead. Project settings can be shared with your team, and indusagi installs any missing packages automatically on startup.
32
-
33
- To try a package without installing it, use `--extension` or `-e`. This installs to a temporary directory for the current run only:
34
-
35
- ```bash
36
- indusagi -e npm:@foo/bar
37
- indusagi -e git:github.com/user/repo
38
- ```
39
-
40
- ## Package Sources
41
-
42
- Indusagi accepts three source types in settings and `indusagi install`.
43
-
44
- ### npm
45
-
46
- ```
47
- npm:@scope/pkg@1.2.3
48
- npm:pkg
49
- ```
50
-
51
- - Versioned specs are pinned and skipped by `indusagi update`.
52
- - Global installs use `npm install -g`.
53
- - Project installs go under `.indusagi/npm/`.
54
-
55
- ### git
56
-
57
- ```
58
- git:github.com/user/repo@v1
59
- https://github.com/user/repo@v1
60
- ```
61
-
62
- - Raw `https://` URLs work without the `git:` prefix.
63
- - Refs pin the package and skip `indusagi update`.
64
- - Cloned to `~/.indusagi/agent/git/<host>/<path>` (global) or `.indusagi/git/<host>/<path>` (project).
65
- - Runs `npm install` after clone or pull if `package.json` exists.
66
-
67
- ### Local Paths
68
-
69
- ```
70
- /absolute/path/to/package
71
- ./relative/path/to/package
72
- ```
73
-
74
- Local paths work in settings but not with `indusagi install`. If the path is a file, it loads as a single extension. If it is a directory, indusagi loads resources using package rules.
75
-
76
- ## Creating a Indusagi Package
77
-
78
- Add a `indusagi` manifest to `package.json` or use conventional directories. Include the `indusagi-package` keyword for discoverability.
79
-
80
- ```json
81
- {
82
- "name": "my-package",
83
- "keywords": ["indusagi-package"],
84
- "indusagi": {
85
- "extensions": ["./extensions"],
86
- "skills": ["./skills"],
87
- "prompts": ["./prompts"],
88
- "themes": ["./themes"]
89
- }
90
- }
91
- ```
92
-
93
- Paths are relative to the package root. Arrays support glob patterns and `!exclusions`.
94
-
95
- ## Package Structure
96
-
97
- ### Convention Directories
98
-
99
- If no `indusagi` manifest is present, indusagi auto-discovers resources from these directories:
100
-
101
- - `extensions/` loads `.ts` and `.js` files
102
- - `skills/` recursively finds `SKILL.md` folders and loads top-level `.md` files as skills
103
- - `prompts/` loads `.md` files
104
- - `themes/` loads `.json` files
105
-
106
- ### Bundling Other Indusagi Packages
107
-
108
- Bundle other indusagi packages by adding them as dependencies and listing them in `bundledDependencies`. Reference their resources via `node_modules/` paths.
109
-
110
- ```json
111
- {
112
- "dependencies": {
113
- "shitty-extensions": "^1.0.1"
114
- },
115
- "bundledDependencies": ["shitty-extensions"],
116
- "indusagi": {
117
- "extensions": ["extensions", "node_modules/shitty-extensions/extensions"],
118
- "skills": ["skills", "node_modules/shitty-extensions/skills"]
119
- }
120
- }
121
- ```
122
-
123
- `bundledDependencies` embeds the package in the published tarball, keeping paths stable. See `indusagi-package-test` for a working example.
124
-
125
- ## Package Filtering
126
-
127
- Filter what a package loads using the object form in settings:
128
-
129
- ```json
130
- {
131
- "packages": [
132
- "npm:simple-pkg",
133
- {
134
- "source": "npm:my-package",
135
- "extensions": ["extensions/*.ts", "!extensions/legacy.ts"],
136
- "skills": [],
137
- "prompts": ["prompts/review.md"],
138
- "themes": ["+themes/legacy.json"]
139
- }
140
- ]
141
- }
142
- ```
143
-
144
- `+path` and `-path` are exact paths relative to the package root.
145
-
146
- - Omit a key to load all of that type.
147
- - Use `[]` to load none of that type.
148
- - `!pattern` excludes matches.
149
- - `+path` force-includes an exact path.
150
- - `-path` force-excludes an exact path.
151
- - Filters layer on top of the manifest. They narrow down what is already allowed.
152
-
153
- ## Enable and Disable Resources
154
-
155
- Use `indusagi config` to enable or disable extensions, skills, prompt templates, and themes from installed packages and local directories. Works for both global (`~/.indusagi/agent`) and project (`.indusagi/`) scopes.
156
-
157
- ## Scope and Deduplication
158
-
159
- Packages can appear in both global and project settings. If the same package appears in both, the project entry wins. Identity is determined by:
160
-
161
- - npm: package name
162
- - git: repository URL without ref
163
- - local: resolved absolute path
@@ -1,67 +0,0 @@
1
- > indusagi can create prompt templates. Ask it to build one for your workflow.
2
-
3
- # Prompt Templates
4
-
5
- Prompt templates are Markdown snippets that expand into full prompts. Type `/name` in the editor to invoke a template, where `name` is the filename without `.md`.
6
-
7
- ## Locations
8
-
9
- Indusagi loads prompt templates from:
10
-
11
- - Global: `~/.indusagi/agent/prompts/*.md`
12
- - Project: `.indusagi/prompts/*.md`
13
- - Packages: `prompts/` directories or `indusagi.prompts` entries in `package.json`
14
- - Settings: `prompts` array with files or directories
15
- - CLI: `--prompt-template <path>` (repeatable)
16
-
17
- Disable discovery with `--no-prompt-templates`.
18
-
19
- ## Format
20
-
21
- ```markdown
22
- ---
23
- description: Review staged git changes
24
- ---
25
- Review the staged changes (`git diff --cached`). Focus on:
26
- - Bugs and logic errors
27
- - Security issues
28
- - Error handling gaps
29
- ```
30
-
31
- - The filename becomes the command name. `review.md` becomes `/review`.
32
- - `description` is optional. If missing, the first non-empty line is used.
33
-
34
- ## Usage
35
-
36
- Type `/` followed by the template name in the editor. Autocomplete shows available templates with descriptions.
37
-
38
- ```
39
- /review # Expands review.md
40
- /component Button # Expands with argument
41
- /component Button "click handler" # Multiple arguments
42
- ```
43
-
44
- ## Arguments
45
-
46
- Templates support positional arguments and simple slicing:
47
-
48
- - `$1`, `$2`, ... positional args
49
- - `$@` or `$ARGUMENTS` for all args joined
50
- - `${@:N}` for args from the Nth position (1-indexed)
51
- - `${@:N:L}` for `L` args starting at N
52
-
53
- Example:
54
-
55
- ```markdown
56
- ---
57
- description: Create a component
58
- ---
59
- Create a React component named $1 with features: $@
60
- ```
61
-
62
- Usage: `/component Button "onClick handler" "disabled support"`
63
-
64
- ## Loading Rules
65
-
66
- - Template discovery in `prompts/` is non-recursive.
67
- - If you want templates in subdirectories, add them explicitly via `prompts` settings or a package manifest.
package/docs/providers.md DELETED
@@ -1,147 +0,0 @@
1
- # Providers
2
-
3
- Indusagi supports subscription-based providers via OAuth and API key providers via environment variables or auth file. For each provider, indusagi knows all available models. The list is updated with every indusagi release.
4
-
5
- ## Table of Contents
6
-
7
- - [Subscriptions](#subscriptions)
8
- - [API Keys](#api-keys)
9
- - [Auth File](#auth-file)
10
- - [Cloud Providers](#cloud-providers)
11
- - [Custom Providers](#custom-providers)
12
- - [Resolution Order](#resolution-order)
13
-
14
- ## Subscriptions
15
-
16
- Use `/login` in interactive mode, then select a provider:
17
-
18
- - Claude Pro/Max
19
- - ChatGPT Plus/Pro (Codex)
20
- - GitHub Copilot
21
- - Google Gemini CLI
22
- - Google Antigravity
23
-
24
- Use `/logout` to clear credentials. Tokens are stored in `~/.indusagi/agent/auth.json` and auto-refresh when expired.
25
-
26
- ### GitHub Copilot
27
-
28
- - Press Enter for github.com, or enter your GitHub Enterprise Server domain
29
- - If you get "model not supported", enable it in VS Code: Copilot Chat → model selector → select model → "Enable"
30
-
31
- ### Google Providers
32
-
33
- - **Gemini CLI**: Standard Gemini models via Cloud Code Assist
34
- - **Antigravity**: Sandbox with Gemini 3, Claude, and GPT-OSS models
35
- - Both free with any Google account, subject to rate limits
36
- - For paid Cloud Code Assist: set `GOOGLE_CLOUD_PROJECT` env var
37
-
38
- ### OpenAI Codex
39
-
40
- - Requires ChatGPT Plus or Pro subscription
41
- - Personal use only; for production, use the OpenAI Platform API
42
-
43
- ## API Keys
44
-
45
- Set via environment variable:
46
-
47
- ```bash
48
- export ANTHROPIC_AINDUSAGI_KEY=sk-ant-...
49
- indusagi
50
- ```
51
-
52
- | Provider | Environment Variable |
53
- |----------|---------------------|
54
- | Anthropic | `ANTHROPIC_AINDUSAGI_KEY` |
55
- | OpenAI | `OPENAI_AINDUSAGI_KEY` |
56
- | Google Gemini | `GEMINI_AINDUSAGI_KEY` |
57
- | Mistral | `MISTRAL_AINDUSAGI_KEY` |
58
- | Groq | `GROQ_AINDUSAGI_KEY` |
59
- | Cerebras | `CEREBRAS_AINDUSAGI_KEY` |
60
- | xAI | `XAI_AINDUSAGI_KEY` |
61
- | OpenRouter | `OPENROUTER_AINDUSAGI_KEY` |
62
- | Vercel AI Gateway | `AI_GATEWAY_AINDUSAGI_KEY` |
63
- | ZAI | `ZAI_AINDUSAGI_KEY` |
64
- | OpenCode Zen | `OPENCODE_AINDUSAGI_KEY` |
65
- | MiniMax | `MINIMAX_AINDUSAGI_KEY` |
66
- | MiniMax (China) | `MINIMAX_CN_AINDUSAGI_KEY` |
67
-
68
- ## Auth File
69
-
70
- Store credentials in `~/.indusagi/agent/auth.json`:
71
-
72
- ```json
73
- {
74
- "anthropic": { "type": "api_key", "key": "sk-ant-..." },
75
- "openai": { "type": "api_key", "key": "sk-..." },
76
- "google": { "type": "api_key", "key": "..." }
77
- }
78
- ```
79
-
80
- The file is created with `0600` permissions (user read/write only). Auth file credentials take priority over environment variables.
81
-
82
- OAuth credentials are also stored here after `/login` and managed automatically.
83
-
84
- ## Cloud Providers
85
-
86
- ### Azure OpenAI
87
-
88
- ```bash
89
- export AZURE_OPENAI_AINDUSAGI_KEY=...
90
- export AZURE_OPENAI_BASE_URL=https://your-resource.openai.azure.com
91
- # or use resource name instead of base URL
92
- export AZURE_OPENAI_RESOURCE_NAME=your-resource
93
-
94
- # Optional
95
- export AZURE_OPENAI_AINDUSAGI_VERSION=2024-02-01
96
- export AZURE_OPENAI_DEPLOYMENT_NAME_MAP=gpt-4=my-gpt4,gpt-4o=my-gpt4o
97
- ```
98
-
99
- ### Amazon Bedrock
100
-
101
- ```bash
102
- # Option 1: AWS Profile
103
- export AWS_PROFILE=your-profile
104
-
105
- # Option 2: IAM Keys
106
- export AWS_ACCESS_KEY_ID=AKIA...
107
- export AWS_SECRET_ACCESS_KEY=...
108
-
109
- # Option 3: Bearer Token
110
- export AWS_BEARER_TOKEN_BEDROCK=...
111
-
112
- # Optional region (defaults to us-east-1)
113
- export AWS_REGION=us-west-2
114
- ```
115
-
116
- Also supports ECS task roles (`AWS_CONTAINER_CREDENTIALS_*`) and IRSA (`AWS_WEB_IDENTITY_TOKEN_FILE`).
117
-
118
- ```bash
119
- indusagi --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0
120
- ```
121
-
122
- ### Google Vertex AI
123
-
124
- Uses Application Default Credentials:
125
-
126
- ```bash
127
- gcloud auth application-default login
128
- export GOOGLE_CLOUD_PROJECT=your-project
129
- export GOOGLE_CLOUD_LOCATION=us-central1
130
- ```
131
-
132
- Or set `GOOGLE_APPLICATION_CREDENTIALS` to a service account key file.
133
-
134
- ## Custom Providers
135
-
136
- **Via models.json:** Add Ollama, LM Studio, vLLM, or any provider that speaks a supported API (OpenAI Completions, OpenAI Responses, Anthropic Messages, Google Generative AI). See [models.md](models.md).
137
-
138
- **Via extensions:** For providers that need custom API implementations or OAuth flows, create an extension. See [custom-provider.md](custom-provider.md) and [examples/extensions/custom-provider-gitlab-duo](../examples/extensions/custom-provider-gitlab-duo/).
139
-
140
- ## Resolution Order
141
-
142
- When resolving credentials for a provider:
143
-
144
- 1. CLI `--api-key` flag
145
- 2. `auth.json` entry (API key or OAuth token)
146
- 3. Environment variable
147
- 4. Custom provider keys from `models.json`