@codemieai/code 0.2.0 → 0.2.1
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 +17 -6
- package/dist/agents/plugins/claude/plugin/skills/codemie-analytics/SKILL.md +641 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-analytics/references/leaderboard-dashboard-report.md +225 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-analytics/references/people-spending-dashboard-report.md +746 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-analytics/references/people-spending-dashboard-template.html +3270 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-analytics/scripts/analytics-cli.js +893 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-analytics/scripts/inspect-schema.js +211 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-html-report/README.md +39 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-html-report/SKILL.md +117 -26
- package/dist/agents/plugins/claude/plugin/skills/codemie-html-report/scripts/inject-css.js +40 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-html-report/scripts/inject-data.js +68 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-html-report/style-guide/css/bundle.css +1 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/SKILL.md +240 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/assistants.md +256 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/categories.md +101 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/datasources.md +401 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/integrations.md +242 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/skills.md +191 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/users.md +38 -0
- package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/workflows.md +151 -0
- package/dist/cli/commands/profile/display.d.ts.map +1 -1
- package/dist/cli/commands/profile/display.js +1 -0
- package/dist/cli/commands/profile/display.js.map +1 -1
- package/dist/cli/commands/proxy/connectors/desktop.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connectors/desktop.js +20 -10
- package/dist/cli/commands/proxy/connectors/desktop.js.map +1 -1
- package/dist/cli/commands/sdk/assistants.d.ts +3 -0
- package/dist/cli/commands/sdk/assistants.d.ts.map +1 -0
- package/dist/cli/commands/sdk/assistants.js +211 -0
- package/dist/cli/commands/sdk/assistants.js.map +1 -0
- package/dist/cli/commands/sdk/categories.d.ts +3 -0
- package/dist/cli/commands/sdk/categories.d.ts.map +1 -0
- package/dist/cli/commands/sdk/categories.js +186 -0
- package/dist/cli/commands/sdk/categories.js.map +1 -0
- package/dist/cli/commands/sdk/datasources.d.ts +3 -0
- package/dist/cli/commands/sdk/datasources.d.ts.map +1 -0
- package/dist/cli/commands/sdk/datasources.js +276 -0
- package/dist/cli/commands/sdk/datasources.js.map +1 -0
- package/dist/cli/commands/sdk/index.d.ts +3 -0
- package/dist/cli/commands/sdk/index.d.ts.map +1 -0
- package/dist/cli/commands/sdk/index.js +23 -0
- package/dist/cli/commands/sdk/index.js.map +1 -0
- package/dist/cli/commands/sdk/integrations.d.ts +3 -0
- package/dist/cli/commands/sdk/integrations.d.ts.map +1 -0
- package/dist/cli/commands/sdk/integrations.js +220 -0
- package/dist/cli/commands/sdk/integrations.js.map +1 -0
- package/dist/cli/commands/sdk/llm.d.ts +3 -0
- package/dist/cli/commands/sdk/llm.d.ts.map +1 -0
- package/dist/cli/commands/sdk/llm.js +48 -0
- package/dist/cli/commands/sdk/llm.js.map +1 -0
- package/dist/cli/commands/sdk/services/assistants.d.ts +13 -0
- package/dist/cli/commands/sdk/services/assistants.d.ts.map +1 -0
- package/dist/cli/commands/sdk/services/assistants.js +60 -0
- package/dist/cli/commands/sdk/services/assistants.js.map +1 -0
- package/dist/cli/commands/sdk/services/categories.d.ts +8 -0
- package/dist/cli/commands/sdk/services/categories.d.ts.map +1 -0
- package/dist/cli/commands/sdk/services/categories.js +19 -0
- package/dist/cli/commands/sdk/services/categories.js.map +1 -0
- package/dist/cli/commands/sdk/services/datasources.d.ts +33 -0
- package/dist/cli/commands/sdk/services/datasources.d.ts.map +1 -0
- package/dist/cli/commands/sdk/services/datasources.js +268 -0
- package/dist/cli/commands/sdk/services/datasources.js.map +1 -0
- package/dist/cli/commands/sdk/services/index.d.ts +6 -0
- package/dist/cli/commands/sdk/services/index.d.ts.map +1 -0
- package/dist/cli/commands/sdk/services/index.js +6 -0
- package/dist/cli/commands/sdk/services/index.js.map +1 -0
- package/dist/cli/commands/sdk/services/integrations.d.ts +27 -0
- package/dist/cli/commands/sdk/services/integrations.d.ts.map +1 -0
- package/dist/cli/commands/sdk/services/integrations.js +59 -0
- package/dist/cli/commands/sdk/services/integrations.js.map +1 -0
- package/dist/cli/commands/sdk/services/llm.d.ts +4 -0
- package/dist/cli/commands/sdk/services/llm.d.ts.map +1 -0
- package/dist/cli/commands/sdk/services/llm.js +7 -0
- package/dist/cli/commands/sdk/services/llm.js.map +1 -0
- package/dist/cli/commands/sdk/services/skills.d.ts +23 -0
- package/dist/cli/commands/sdk/services/skills.d.ts.map +1 -0
- package/dist/cli/commands/sdk/services/skills.js +69 -0
- package/dist/cli/commands/sdk/services/skills.js.map +1 -0
- package/dist/cli/commands/sdk/services/users.d.ts +4 -0
- package/dist/cli/commands/sdk/services/users.d.ts.map +1 -0
- package/dist/cli/commands/sdk/services/users.js +7 -0
- package/dist/cli/commands/sdk/services/users.js.map +1 -0
- package/dist/cli/commands/sdk/services/workflows.d.ts +7 -0
- package/dist/cli/commands/sdk/services/workflows.d.ts.map +1 -0
- package/dist/cli/commands/sdk/services/workflows.js +34 -0
- package/dist/cli/commands/sdk/services/workflows.js.map +1 -0
- package/dist/cli/commands/sdk/skills.d.ts +3 -0
- package/dist/cli/commands/sdk/skills.d.ts.map +1 -0
- package/dist/cli/commands/sdk/skills.js +492 -0
- package/dist/cli/commands/sdk/skills.js.map +1 -0
- package/dist/cli/commands/sdk/users.d.ts +3 -0
- package/dist/cli/commands/sdk/users.d.ts.map +1 -0
- package/dist/cli/commands/sdk/users.js +81 -0
- package/dist/cli/commands/sdk/users.js.map +1 -0
- package/dist/cli/commands/sdk/utils/cli-utils.d.ts +35 -0
- package/dist/cli/commands/sdk/utils/cli-utils.d.ts.map +1 -0
- package/dist/cli/commands/sdk/utils/cli-utils.js +110 -0
- package/dist/cli/commands/sdk/utils/cli-utils.js.map +1 -0
- package/dist/cli/commands/sdk/utils/datasource-types.d.ts +9 -0
- package/dist/cli/commands/sdk/utils/datasource-types.d.ts.map +1 -0
- package/dist/cli/commands/sdk/utils/datasource-types.js +61 -0
- package/dist/cli/commands/sdk/utils/datasource-types.js.map +1 -0
- package/dist/cli/commands/sdk/utils/file-utils.d.ts +8 -0
- package/dist/cli/commands/sdk/utils/file-utils.d.ts.map +1 -0
- package/dist/cli/commands/sdk/utils/file-utils.js +21 -0
- package/dist/cli/commands/sdk/utils/file-utils.js.map +1 -0
- package/dist/cli/commands/sdk/utils/render.d.ts +82 -0
- package/dist/cli/commands/sdk/utils/render.d.ts.map +1 -0
- package/dist/cli/commands/sdk/utils/render.js +149 -0
- package/dist/cli/commands/sdk/utils/render.js.map +1 -0
- package/dist/cli/commands/sdk/workflows.d.ts +3 -0
- package/dist/cli/commands/sdk/workflows.d.ts.map +1 -0
- package/dist/cli/commands/sdk/workflows.js +170 -0
- package/dist/cli/commands/sdk/workflows.js.map +1 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
# Datasources Examples
|
|
2
|
+
|
|
3
|
+
> **Important:** `create` and `update` require a **type subcommand**: `confluence`, `jira`, `file`, `code`, `google`, `azure-devops-wiki`, `azure-devops-work-item`, `xray`, `sharepoint`, `platform`
|
|
4
|
+
>
|
|
5
|
+
> **Name constraint:** must match `^[a-zA-Z0-9][\w-]*$` — no spaces, use hyphens (e.g. `my-wiki`, not `My Wiki`)
|
|
6
|
+
|
|
7
|
+
## List
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Basic list
|
|
11
|
+
codemie sdk datasources list
|
|
12
|
+
|
|
13
|
+
# Filter
|
|
14
|
+
codemie sdk datasources list --search 'Wiki' --projects Documentation
|
|
15
|
+
codemie sdk datasources list --status completed
|
|
16
|
+
codemie sdk datasources list --datasource-types confluence,jira
|
|
17
|
+
codemie sdk datasources list --sort-key update_date --sort-order desc --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Status values:** `completed`, `failed`, `fetching`, `in_progress`
|
|
21
|
+
|
|
22
|
+
**List columns:** ID, Name, Project, Type, Status
|
|
23
|
+
|
|
24
|
+
## Get
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
codemie sdk datasources get ebfe842a-07af-4a8e-8790-7213834068e9
|
|
28
|
+
codemie sdk datasources get ebfe842a-07af-4a8e-8790-7213834068e9 --json
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Create
|
|
32
|
+
|
|
33
|
+
**Base fields (all types):**
|
|
34
|
+
|
|
35
|
+
| Field | Required | Description |
|
|
36
|
+
|-------|----------|-------------|
|
|
37
|
+
| `name` | ✅ | Must match `^[a-zA-Z0-9][\w-]*$` — no spaces, use hyphens |
|
|
38
|
+
| `project_name` | ✅ | Project to create the datasource in |
|
|
39
|
+
| `description` | — | Human-readable description of this datasource |
|
|
40
|
+
| `shared_with_project` | — | `true` = visible to all project members |
|
|
41
|
+
| `setting_id` | — | Integration ID to authenticate fetching — get IDs: `codemie sdk integrations list --json` |
|
|
42
|
+
|
|
43
|
+
### Confluence
|
|
44
|
+
|
|
45
|
+
> Requires a **Confluence integration** already configured in the project.
|
|
46
|
+
> Get the integration ID: `codemie sdk integrations list --setting-type project --json | jq -r '.[] | select(.credential_type=="Confluence") | "\(.id) \(.alias)"'`
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
codemie sdk datasources create confluence --data '{
|
|
50
|
+
"name": "company-wiki",
|
|
51
|
+
"project_name": "Documentation",
|
|
52
|
+
"cql": "space=TEAM AND type=page",
|
|
53
|
+
"description": "Company-wide wiki",
|
|
54
|
+
"shared_with_project": true
|
|
55
|
+
}'
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Confluence-specific fields:**
|
|
59
|
+
|
|
60
|
+
| Field | Required | Description |
|
|
61
|
+
|-------|----------|-------------|
|
|
62
|
+
| `cql` | ✅ | Confluence Query Language — e.g. `space=TEAM`, `space=TEAM AND type=page` |
|
|
63
|
+
| `include_restricted_content` | — | Include pages that are restricted but accessible by the integration user |
|
|
64
|
+
| `include_archived_content` | — | Include archived/historic pages |
|
|
65
|
+
| `include_attachments` | — | Include file attachments from pages |
|
|
66
|
+
| `include_comments` | — | Include page comments in indexed content |
|
|
67
|
+
| `keep_markdown_format` | — | Preserve Markdown formatting in fetched content |
|
|
68
|
+
| `keep_newlines` | — | Preserve newlines (prevents content collapsing) |
|
|
69
|
+
| `max_pages` | — | Maximum number of pages to fetch (caps the index size) |
|
|
70
|
+
| `pages_per_request` | — | Batch size per API call — tune lower to avoid Confluence rate limits |
|
|
71
|
+
|
|
72
|
+
**Full Confluence example:**
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"name": "engineering-wiki",
|
|
76
|
+
"project_name": "Engineering",
|
|
77
|
+
"cql": "space=ENG AND type=page AND ancestor=12345",
|
|
78
|
+
"description": "Engineering team wiki pages",
|
|
79
|
+
"shared_with_project": true,
|
|
80
|
+
"include_attachments": false,
|
|
81
|
+
"include_comments": false,
|
|
82
|
+
"keep_markdown_format": true,
|
|
83
|
+
"max_pages": 500,
|
|
84
|
+
"pages_per_request": 25
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Jira
|
|
89
|
+
|
|
90
|
+
> Requires a **Jira integration** already configured in the project.
|
|
91
|
+
> Get the integration ID: `codemie sdk integrations list --setting-type project --json | jq -r '.[] | select(.credential_type=="Jira") | "\(.id) \(.alias)"'`
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
codemie sdk datasources create jira --data '{
|
|
95
|
+
"name": "support-tickets",
|
|
96
|
+
"project_name": "Support",
|
|
97
|
+
"jql": "project=SUP AND status != Done",
|
|
98
|
+
"description": "Open support tickets",
|
|
99
|
+
"shared_with_project": true
|
|
100
|
+
}'
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Jira-specific fields:**
|
|
104
|
+
|
|
105
|
+
| Field | Required | Description |
|
|
106
|
+
|-------|----------|-------------|
|
|
107
|
+
| `jql` | ✅ | Jira Query Language — e.g. `project=SUP AND status=Open ORDER BY created DESC` |
|
|
108
|
+
|
|
109
|
+
### File (local files)
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# One or more files (max 10), plus metadata
|
|
113
|
+
codemie sdk datasources create file --file ./doc1.pdf --file ./doc2.docx --data '{"name":"team-docs","project_name":"Engineering"}'
|
|
114
|
+
|
|
115
|
+
# From metadata file
|
|
116
|
+
codemie sdk datasources create file --file ./report.pdf --json metadata.json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**`metadata.json`:**
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"name": "project-docs",
|
|
123
|
+
"project_name": "Engineering",
|
|
124
|
+
"description": "Key project documents",
|
|
125
|
+
"shared_with_project": true
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Supported file formats: PDF, DOCX, XLSX, TXT, MD, and other common document types. Max 10 files per create call.
|
|
130
|
+
|
|
131
|
+
### Code Repository
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
codemie sdk datasources create code --data '{
|
|
135
|
+
"name": "main-repo",
|
|
136
|
+
"project_name": "Engineering",
|
|
137
|
+
"link": "https://github.com/org/repo",
|
|
138
|
+
"branch": "main",
|
|
139
|
+
"index_type": "code",
|
|
140
|
+
"description": "Main application codebase"
|
|
141
|
+
}'
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Output: `✓ Indexing of datasource main-repo has been started in the background`
|
|
145
|
+
|
|
146
|
+
**Code-specific fields:**
|
|
147
|
+
|
|
148
|
+
| Field | Required | Description |
|
|
149
|
+
|-------|----------|-------------|
|
|
150
|
+
| `link` | ✅ | Repository HTTPS URL — e.g. `https://github.com/org/repo` |
|
|
151
|
+
| `branch` | ✅ | Branch to index — e.g. `main`, `develop` |
|
|
152
|
+
| `index_type` | ✅ | `"code"` = searchable code snippets; `"summary"` = LLM-generated summaries |
|
|
153
|
+
| `files_filter` | — | Glob pattern to limit indexed files — e.g. `src/**/*.ts`, `**/*.py` |
|
|
154
|
+
| `embeddings_model` | — | Embedding model `base_name` — get values: `codemie sdk llm list --embeddings --json` |
|
|
155
|
+
| `summarization_model` | — | LLM model `base_name` for summary generation — get values: `codemie sdk llm list --json` |
|
|
156
|
+
| `prompt` | — | Custom prompt template for summarization (overrides platform default) |
|
|
157
|
+
| `docs_generation` | — | `true` = auto-generate documentation from code during indexing |
|
|
158
|
+
|
|
159
|
+
**Full Code example:**
|
|
160
|
+
```json
|
|
161
|
+
{
|
|
162
|
+
"name": "backend-api",
|
|
163
|
+
"project_name": "Engineering",
|
|
164
|
+
"link": "https://github.com/org/backend",
|
|
165
|
+
"branch": "main",
|
|
166
|
+
"index_type": "code",
|
|
167
|
+
"description": "Backend API codebase",
|
|
168
|
+
"files_filter": "src/**/*.ts",
|
|
169
|
+
"docs_generation": true
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Google Docs
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
codemie sdk datasources create google --data '{
|
|
177
|
+
"name": "team-docs",
|
|
178
|
+
"project_name": "Product",
|
|
179
|
+
"google_doc": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
|
|
180
|
+
"description": "Team documentation",
|
|
181
|
+
"shared_with_project": true
|
|
182
|
+
}'
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Google-specific fields:**
|
|
186
|
+
|
|
187
|
+
| Field | Required | Description |
|
|
188
|
+
|-------|----------|-------------|
|
|
189
|
+
| `google_doc` | ✅ | Google Doc ID (from URL) or full Google Docs URL |
|
|
190
|
+
|
|
191
|
+
## Update
|
|
192
|
+
|
|
193
|
+
Same subcommands as create, but takes `<id>` after the type:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
codemie sdk datasources update confluence <id> --data '{"name":"updated-wiki","project_name":"Documentation","cql":"space=NEWTEAM"}'
|
|
197
|
+
codemie sdk datasources update jira <id> --data '{"name":"support-tickets","project_name":"Support","jql":"project=SUP AND status=Open"}'
|
|
198
|
+
codemie sdk datasources update file <id> --data '{"name":"team-docs","project_name":"Engineering","description":"Updated docs"}'
|
|
199
|
+
codemie sdk datasources update code <id> --json updates.json
|
|
200
|
+
# Output: ✓ Incremental reindexing of datasource <name> has been started in the background
|
|
201
|
+
codemie sdk datasources update azure-devops-wiki <id> --data '{"organization":"my-org","project":"my-project","wiki_name":"updated-wiki"}'
|
|
202
|
+
codemie sdk datasources update azure-devops-work-item <id> --data '{"wiql_query":"SELECT [Id],[Title] FROM WorkItems WHERE [System.State]!='\''Closed'\''"}'
|
|
203
|
+
codemie sdk datasources update xray <id> --data '{"jql":"project=QA AND issuetype in testExecutions()"}'
|
|
204
|
+
codemie sdk datasources update sharepoint <id> --data '{"include_lists":true,"skip_reindex":true}'
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Update-only reindex flags** (add to any update payload):
|
|
208
|
+
|
|
209
|
+
| Flag | Description |
|
|
210
|
+
|------|-------------|
|
|
211
|
+
| `full_reindex` | Discard existing index and re-fetch everything from scratch |
|
|
212
|
+
| `incremental_reindex` | Only fetch and index content changed since last run (default for most types) |
|
|
213
|
+
| `resume_indexing` | Resume a previously interrupted indexing job |
|
|
214
|
+
| `skip_reindex` | Update metadata (name, description, etc.) without triggering any reindex |
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Rename without reindexing
|
|
218
|
+
codemie sdk datasources update confluence <id> --data '{"name":"new-name","project_name":"Documentation","cql":"space=TEAM","skip_reindex":true}'
|
|
219
|
+
|
|
220
|
+
# Force full re-fetch
|
|
221
|
+
codemie sdk datasources update code <id> --data '{"name":"main-repo","project_name":"Engineering","link":"https://github.com/org/repo","branch":"main","index_type":"code","full_reindex":true}'
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Delete
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
codemie sdk datasources get <id>
|
|
228
|
+
codemie sdk datasources delete <id>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Linking to an Assistant
|
|
232
|
+
|
|
233
|
+
After creating a datasource, attach it to an assistant via the assistant's `context` field.
|
|
234
|
+
|
|
235
|
+
- Use `context_type: "knowledge_base"` for file, Confluence, Jira, Google, Azure DevOps Wiki, Azure DevOps Work Item, Xray, SharePoint, and JSON datasources.
|
|
236
|
+
- Use `context_type: "code"` for code repository datasources.
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
# Get datasource ID
|
|
240
|
+
DS_ID=$(codemie sdk datasources list --search 'my-docs' --json | jq -r '.[0].id')
|
|
241
|
+
DS_NAME=$(codemie sdk datasources list --search 'my-docs' --json | jq -r '.[0].name')
|
|
242
|
+
|
|
243
|
+
# Attach to assistant
|
|
244
|
+
codemie sdk assistants update <assistant-id> --data "{
|
|
245
|
+
\"context\": [{\"id\": \"$DS_ID\", \"context_type\": \"knowledge_base\", \"name\": \"$DS_NAME\"}]
|
|
246
|
+
}"
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
> See [Assistants — Linking a Datasource](assistants.md#linking-a-datasource) for full details.
|
|
250
|
+
|
|
251
|
+
### Azure DevOps Wiki
|
|
252
|
+
|
|
253
|
+
> Requires an **AzureDevOps integration** already configured in the project.
|
|
254
|
+
> Get the integration ID: `codemie sdk integrations list --setting-type project --json | jq -r '.[] | select(.credential_type=="AzureDevOps") | "\(.id) \(.alias)"'`
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
codemie sdk datasources create azure-devops-wiki --data '{
|
|
258
|
+
"name": "ado-wiki",
|
|
259
|
+
"project_name": "Engineering",
|
|
260
|
+
"organization": "my-org",
|
|
261
|
+
"project": "my-project",
|
|
262
|
+
"wiki_name": "my-wiki",
|
|
263
|
+
"description": "Azure DevOps team wiki",
|
|
264
|
+
"shared_with_project": true
|
|
265
|
+
}'
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**Azure DevOps Wiki-specific fields:**
|
|
269
|
+
|
|
270
|
+
| Field | Required | Description |
|
|
271
|
+
|-------|----------|-------------|
|
|
272
|
+
| `organization` | — | Azure DevOps organization name |
|
|
273
|
+
| `project` | — | Azure DevOps project name |
|
|
274
|
+
| `wiki_name` | — | Name of the wiki to index |
|
|
275
|
+
| `wiki_query` | — | Query to filter wiki pages |
|
|
276
|
+
|
|
277
|
+
### Azure DevOps Work Item
|
|
278
|
+
|
|
279
|
+
> Requires an **AzureDevOps integration** already configured in the project.
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
codemie sdk datasources create azure-devops-work-item --data '{
|
|
283
|
+
"name": "ado-work-items",
|
|
284
|
+
"project_name": "Engineering",
|
|
285
|
+
"organization": "my-org",
|
|
286
|
+
"project": "my-project",
|
|
287
|
+
"wiql_query": "SELECT [Id],[Title],[State] FROM WorkItems WHERE [System.TeamProject]=@project AND [System.State]!='\''Closed'\''",
|
|
288
|
+
"description": "Azure DevOps work items",
|
|
289
|
+
"shared_with_project": true
|
|
290
|
+
}'
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**Azure DevOps Work Item-specific fields:**
|
|
294
|
+
|
|
295
|
+
| Field | Required | Description |
|
|
296
|
+
|-------|----------|-------------|
|
|
297
|
+
| `organization` | — | Azure DevOps organization name |
|
|
298
|
+
| `project` | — | Azure DevOps project name |
|
|
299
|
+
| `wiql_query` | — | WIQL query to filter work items — e.g. `SELECT [Id],[Title] FROM WorkItems WHERE [System.State]!='Closed'` |
|
|
300
|
+
|
|
301
|
+
### Xray
|
|
302
|
+
|
|
303
|
+
> Requires a **Jira integration** already configured (Xray is a Jira plugin).
|
|
304
|
+
> Get the integration ID: `codemie sdk integrations list --setting-type project --json | jq -r '.[] | select(.credential_type=="Jira") | "\(.id) \(.alias)"'`
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
codemie sdk datasources create xray --data '{
|
|
308
|
+
"name": "xray-tests",
|
|
309
|
+
"project_name": "QA",
|
|
310
|
+
"jql": "project=QA AND issuetype in testExecutions()",
|
|
311
|
+
"description": "Xray test execution data",
|
|
312
|
+
"shared_with_project": true
|
|
313
|
+
}'
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**Xray-specific fields:**
|
|
317
|
+
|
|
318
|
+
| Field | Required | Description |
|
|
319
|
+
|-------|----------|-------------|
|
|
320
|
+
| `jql` | ✅ | Jira Query Language to filter Xray test issues |
|
|
321
|
+
|
|
322
|
+
### SharePoint
|
|
323
|
+
|
|
324
|
+
> Requires a **SharePoint integration** or OAuth credentials.
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
codemie sdk datasources create sharepoint --data '{
|
|
328
|
+
"name": "sharepoint-docs",
|
|
329
|
+
"project_name": "Engineering",
|
|
330
|
+
"site_url": "https://company.sharepoint.com/sites/team",
|
|
331
|
+
"include_pages": true,
|
|
332
|
+
"include_documents": true,
|
|
333
|
+
"description": "SharePoint team site",
|
|
334
|
+
"shared_with_project": true
|
|
335
|
+
}'
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**SharePoint-specific fields:**
|
|
339
|
+
|
|
340
|
+
| Field | Required | Description |
|
|
341
|
+
|-------|----------|-------------|
|
|
342
|
+
| `site_url` | ✅ | SharePoint site URL (must start with `https://`) |
|
|
343
|
+
| `include_pages` | — | Index SharePoint site pages |
|
|
344
|
+
| `include_documents` | — | Index document libraries |
|
|
345
|
+
| `include_lists` | — | Index list items |
|
|
346
|
+
| `max_file_size_mb` | — | Maximum file size in MB to index (1–500, default 50) |
|
|
347
|
+
| `files_filter` | — | Gitignore-style file/path filter |
|
|
348
|
+
| `auth_type` | — | Authentication method: `integration`, `oauth_codemie`, or `oauth_custom` |
|
|
349
|
+
| `access_token` | — | OAuth access token (required for `oauth_codemie` and `oauth_custom`) |
|
|
350
|
+
| `oauth_client_id` | — | Azure app client ID (`oauth_custom` only) |
|
|
351
|
+
| `oauth_tenant_id` | — | Azure AD tenant ID (`oauth_custom` only) |
|
|
352
|
+
| `embedding_model` | — | Override default embedding model |
|
|
353
|
+
| `cron_expression` | — | Cron expression for scheduled reindexing |
|
|
354
|
+
|
|
355
|
+
**Full SharePoint example:**
|
|
356
|
+
```json
|
|
357
|
+
{
|
|
358
|
+
"name": "team-sharepoint",
|
|
359
|
+
"project_name": "Engineering",
|
|
360
|
+
"site_url": "https://company.sharepoint.com/sites/engineering",
|
|
361
|
+
"include_pages": true,
|
|
362
|
+
"include_documents": true,
|
|
363
|
+
"include_lists": false,
|
|
364
|
+
"max_file_size_mb": 50,
|
|
365
|
+
"auth_type": "integration",
|
|
366
|
+
"description": "Engineering SharePoint site",
|
|
367
|
+
"shared_with_project": true
|
|
368
|
+
}
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### JSON Knowledge Base
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
codemie sdk datasources create json --data '{
|
|
375
|
+
"name": "json-data",
|
|
376
|
+
"project_name": "Team",
|
|
377
|
+
"description": "JSON knowledge base",
|
|
378
|
+
"shared_with_project": true
|
|
379
|
+
}'
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### Provider
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
codemie sdk datasources create provider --data '{
|
|
386
|
+
"name": "my-provider",
|
|
387
|
+
"project_name": "Team",
|
|
388
|
+
"description": "Provider datasource",
|
|
389
|
+
"shared_with_project": true
|
|
390
|
+
}'
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
## Scripting
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
# Check for failed datasources
|
|
397
|
+
codemie sdk datasources list --status failed --json | jq -r '.[] | "\(.name) (\(.project_name)): \(.error_message)"'
|
|
398
|
+
|
|
399
|
+
# List by type
|
|
400
|
+
codemie sdk datasources list --datasource-types knowledge_base_confluence --json
|
|
401
|
+
```
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# Integrations Examples
|
|
2
|
+
|
|
3
|
+
## List
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
# User-level integrations (default)
|
|
7
|
+
codemie sdk integrations list
|
|
8
|
+
|
|
9
|
+
# Project-level integrations
|
|
10
|
+
codemie sdk integrations list --setting-type project
|
|
11
|
+
|
|
12
|
+
# Search and filter
|
|
13
|
+
codemie sdk integrations list --search 'jira'
|
|
14
|
+
codemie sdk integrations list --projects Engineering
|
|
15
|
+
codemie sdk integrations list --page 0 --per-page 25 --json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**setting-type:** `user` (default) or `project`
|
|
19
|
+
|
|
20
|
+
**List columns:** ID, Alias, Type, Project
|
|
21
|
+
|
|
22
|
+
## Get
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# By ID
|
|
26
|
+
codemie sdk integrations get 6fcbb938-239c-40c4-b304-b1f3cec3d501
|
|
27
|
+
codemie sdk integrations get 6fcbb938-239c-40c4-b304-b1f3cec3d501 --setting-type project --json
|
|
28
|
+
|
|
29
|
+
# By alias (more convenient)
|
|
30
|
+
codemie sdk integrations get-by-alias jira-main
|
|
31
|
+
codemie sdk integrations get-by-alias jira-main --json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**JSON fields:** `id`, `alias`, `credential_type`, `project_name`, `setting_type`, `default`, `is_global`, `credential_values`, `date`, `update_date`, `user_id`, `created_by`
|
|
35
|
+
|
|
36
|
+
> Note: Sensitive credential values are masked as `**********` in output.
|
|
37
|
+
|
|
38
|
+
## Create
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Inline JSON
|
|
42
|
+
codemie sdk integrations create --data '{
|
|
43
|
+
"credential_type": "Jira",
|
|
44
|
+
"project_name": "Engineering",
|
|
45
|
+
"alias": "jira-main",
|
|
46
|
+
"setting_type": "user",
|
|
47
|
+
"credential_values": [
|
|
48
|
+
{"key": "url", "value": "https://company.atlassian.net"},
|
|
49
|
+
{"key": "token", "value": "your-api-token"},
|
|
50
|
+
{"key": "username", "value": "bot@company.com"},
|
|
51
|
+
{"key": "alias", "value": "jira-main"}
|
|
52
|
+
]
|
|
53
|
+
}'
|
|
54
|
+
|
|
55
|
+
# From file
|
|
56
|
+
codemie sdk integrations create --json jira-integration.json
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Field reference:**
|
|
60
|
+
|
|
61
|
+
| Field | Required | Description |
|
|
62
|
+
|-------|----------|-------------|
|
|
63
|
+
| `credential_type` | ✅ | Integration type — e.g. `"Jira"`, `"Confluence"`, `"Git"`, `"LiteLLM"` |
|
|
64
|
+
| `project_name` | ✅ | Project to associate the integration with |
|
|
65
|
+
| `credential_values` | ✅ | Array of `{"key": "...", "value": "..."}` credential pairs — **must include `alias` key** |
|
|
66
|
+
| `setting_type` | — | `"user"` (default, personal) or `"project"` (team-shared) |
|
|
67
|
+
| `alias` | — | Human-readable identifier used with `get-by-alias` |
|
|
68
|
+
| `default` | — | `true` = mark as the default integration of this type for the project |
|
|
69
|
+
| `enabled` | — | `false` = disable the integration without deleting it (default: `true`) |
|
|
70
|
+
| `external_id` | — | External system identifier for cross-referencing with other tools |
|
|
71
|
+
|
|
72
|
+
**All supported `credential_type` values:** `Jira`, `Confluence`, `Git`, `Kubernetes`, `AWS`, `GCP`, `Azure`, `Keycloak`, `Elastic`, `OpenAPI`, `Plugin`, `FileSystem`, `Scheduler`, `Webhook`, `Email`, `AzureDevOps`, `Sonar`, `SQL`, `Telegram`, `ZephyrScale`, `ZephyrSquad`, `ServiceNow`, `DIAL`, `A2A`, `MCP`, `LiteLLM`, `ReportPortal`, `Xray`, `SharePoint`
|
|
73
|
+
|
|
74
|
+
> **Important:** `credential_values` **must include an `alias` key** with the same value as the top-level `alias` field, otherwise the API returns an error. Always add `{"key": "alias", "value": "<alias>"}` to the array.
|
|
75
|
+
|
|
76
|
+
### Type examples
|
|
77
|
+
|
|
78
|
+
**Confluence:**
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"credential_type": "Confluence",
|
|
82
|
+
"project_name": "Documentation",
|
|
83
|
+
"alias": "confluence-main",
|
|
84
|
+
"setting_type": "user",
|
|
85
|
+
"credential_values": [
|
|
86
|
+
{"key": "url", "value": "https://company.atlassian.net/wiki"},
|
|
87
|
+
{"key": "token", "value": "api-token"},
|
|
88
|
+
{"key": "username", "value": "admin@company.com"},
|
|
89
|
+
{"key": "alias", "value": "confluence-main"}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Git:**
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"credential_type": "Git",
|
|
98
|
+
"project_name": "Engineering",
|
|
99
|
+
"alias": "github-main",
|
|
100
|
+
"setting_type": "project",
|
|
101
|
+
"credential_values": [
|
|
102
|
+
{"key": "url", "value": "https://github.com/org/repo"},
|
|
103
|
+
{"key": "token", "value": "ghp_yourToken"},
|
|
104
|
+
{"key": "alias", "value": "github-main"}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**LiteLLM:**
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"credential_type": "LiteLLM",
|
|
113
|
+
"project_name": "AI",
|
|
114
|
+
"alias": "litellm-proxy",
|
|
115
|
+
"setting_type": "user",
|
|
116
|
+
"credential_values": [
|
|
117
|
+
{"key": "base_url", "value": "http://localhost:4000"},
|
|
118
|
+
{"key": "api_key", "value": "sk-master-key"},
|
|
119
|
+
{"key": "alias", "value": "litellm-proxy"}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**AzureDevOps:**
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"credential_type": "AzureDevOps",
|
|
128
|
+
"project_name": "Engineering",
|
|
129
|
+
"alias": "ado-main",
|
|
130
|
+
"setting_type": "project",
|
|
131
|
+
"credential_values": [
|
|
132
|
+
{"key": "url", "value": "https://dev.azure.com/my-org"},
|
|
133
|
+
{"key": "token", "value": "your-pat-token"},
|
|
134
|
+
{"key": "alias", "value": "ado-main"}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**SharePoint:**
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"credential_type": "SharePoint",
|
|
143
|
+
"project_name": "Engineering",
|
|
144
|
+
"alias": "sharepoint-main",
|
|
145
|
+
"setting_type": "project",
|
|
146
|
+
"credential_values": [
|
|
147
|
+
{"key": "site_url", "value": "https://company.sharepoint.com/sites/team"},
|
|
148
|
+
{"key": "client_id", "value": "your-client-id"},
|
|
149
|
+
{"key": "client_secret", "value": "your-client-secret"},
|
|
150
|
+
{"key": "tenant_id", "value": "your-tenant-id"},
|
|
151
|
+
{"key": "alias", "value": "sharepoint-main"}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Xray:**
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"credential_type": "Xray",
|
|
160
|
+
"project_name": "QA",
|
|
161
|
+
"alias": "xray-main",
|
|
162
|
+
"setting_type": "project",
|
|
163
|
+
"credential_values": [
|
|
164
|
+
{"key": "client_id", "value": "your-xray-client-id"},
|
|
165
|
+
{"key": "client_secret", "value": "your-xray-client-secret"},
|
|
166
|
+
{"key": "alias", "value": "xray-main"}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**ZephyrScale:**
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"credential_type": "ZephyrScale",
|
|
175
|
+
"project_name": "QA",
|
|
176
|
+
"alias": "zephyr-scale",
|
|
177
|
+
"setting_type": "user",
|
|
178
|
+
"credential_values": [
|
|
179
|
+
{"key": "url", "value": "https://company.atlassian.net"},
|
|
180
|
+
{"key": "token", "value": "your-zephyr-api-token"},
|
|
181
|
+
{"key": "alias", "value": "zephyr-scale"}
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**ServiceNow:**
|
|
187
|
+
```json
|
|
188
|
+
{
|
|
189
|
+
"credential_type": "ServiceNow",
|
|
190
|
+
"project_name": "ITSM",
|
|
191
|
+
"alias": "servicenow-main",
|
|
192
|
+
"setting_type": "project",
|
|
193
|
+
"credential_values": [
|
|
194
|
+
{"key": "url", "value": "https://company.service-now.com"},
|
|
195
|
+
{"key": "username", "value": "api-user"},
|
|
196
|
+
{"key": "password", "value": "api-password"},
|
|
197
|
+
{"key": "alias", "value": "servicenow-main"}
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**MCP:**
|
|
203
|
+
```json
|
|
204
|
+
{
|
|
205
|
+
"credential_type": "MCP",
|
|
206
|
+
"project_name": "AI",
|
|
207
|
+
"alias": "mcp-server",
|
|
208
|
+
"setting_type": "user",
|
|
209
|
+
"credential_values": [
|
|
210
|
+
{"key": "url", "value": "http://localhost:3000"},
|
|
211
|
+
{"key": "alias", "value": "mcp-server"}
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Output: `✓ Specified credentials saved`
|
|
217
|
+
|
|
218
|
+
## Update
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
codemie sdk integrations update <id> --data '{
|
|
222
|
+
"credential_type": "Jira",
|
|
223
|
+
"project_name": "Engineering",
|
|
224
|
+
"alias": "jira-main",
|
|
225
|
+
"credential_values": [
|
|
226
|
+
{"key": "url", "value": "https://company.atlassian.net"},
|
|
227
|
+
{"key": "token", "value": "new-rotated-token"},
|
|
228
|
+
{"key": "username", "value": "bot@company.com"}
|
|
229
|
+
]
|
|
230
|
+
}'
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Output: `✓ Specified credentials updated`
|
|
234
|
+
|
|
235
|
+
## Delete
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
codemie sdk integrations delete <id>
|
|
239
|
+
codemie sdk integrations delete <id> --setting-type project
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Output: `✓ Integration <id> deleted.`
|