Tools & Worktrees
Experimental surface: the tool registry, the resource list, plain git worktrees, and the managed worktrees that carry parent/child links.
Send these requests to your own running server. Values stay in this browser.
How this works
Start a server with nikcli serve --hostname 127.0.0.1 --port 4096. Requests go
straight from this page to that address — the browser allows it because loopback counts as a
secure origin, and the server allows it because nikcli-ai.dev is in its CORS
allowlist.
To try things without touching your real sessions or config, start the server with
NIKCLI_TEST_HOME pointed at a throwaway directory — see
the guided tour.
Operations
13 endpoints, generated from the
server's own OpenAPI document. Every path also accepts the
directory and workspace query parameters that select which instance
handles the request.
| get | /experimental/tool/ids | tool.ids |
| get | /experimental/tool | tool.list |
| get | /experimental/worktree | worktree.list |
| post | /experimental/worktree | worktree.create |
| delete | /experimental/worktree | worktree.remove |
| post | /experimental/worktree/reset | worktree.reset |
| get | /experimental/resource | experimental.resource.list |
| get | /experimental/managed-worktree | managed-worktree.list |
| post | /experimental/managed-worktree | managed-worktree.create |
| delete | /experimental/managed-worktree | managed-worktree.remove |
| post | /experimental/managed-worktree/link | managed-worktree.link |
| get | /experimental/managed-worktree/children | managed-worktree.children |
| get | /experimental/managed-worktree/ancestors | managed-worktree.ancestors |
tool.ids | Name | In | Type | Required |
|---|---|---|---|
| directory | query | string | optional |
| workspace | query | string | optional |
string[]
Example response captured
[
"invalid",
"question",
"bash",
"monitor",
"read",
"tree",
"glob",
"grep",
"edit",
"write",
"multiedit",
"task",
"delegation",
"context_collect",
"context_related",
"context_diagnostics",
"memory_search",
"generate_image",
"artifact",
"webfetch",
"todowrite",
"todoread",
"create_goal",
"get_goal",
"update_goal",
"websearch",
"codesearch",
"repo_clone",
"repo_overview",
"skill",
"apply_patch",
"lsp",
"plan_exit",
"plan_enter",
"speak",
"voice",
"opentui",
"plugin",
"advisor",
"delegator",
"search_tools",
"code_mode",
"browser_control",
"computer",
"herdr"
] SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.tool.ids({
...
}) Try it
tool.list | Name | In | Type | Required |
|---|---|---|---|
| provider | query | string | required |
| model | query | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
ToolListItem[]
Example response from schema
[
{
"id": "",
"description": "",
"parameters": null
}
] Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.tool.list({
...
}) Try it
worktree.list | Name | In | Type | Required |
|---|---|---|---|
| directory | query | string | optional |
| workspace | query | string | optional |
string[]
Example response from schema
[ "" ]
Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.worktree.list({
...
}) Try it
worktree.create | Name | In | Type | Required |
|---|---|---|---|
| directory | query | string | optional |
| workspace | query | string | optional |
{ name?: string | null branch?: string | null branchPrefix?: string | null baseBranch?: string | null remote?: string | null startCommand?: string | null }
{ name: string branch?: string | null directory: string }
Example response from schema
{
"name": "",
"branch": "",
"directory": ""
} Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.worktree.create({
...
}) Try it
worktree.remove | Name | In | Type | Required |
|---|---|---|---|
| directory | query | string | optional |
| workspace | query | string | optional |
{ directory: string }
boolean Example response from schema
false
Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.worktree.remove({
...
}) Try it
This changes or removes server state, against whatever base URL is set above.
worktree.reset | Name | In | Type | Required |
|---|---|---|---|
| directory | query | string | optional |
| workspace | query | string | optional |
{ directory: string }
boolean Example response from schema
false
Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.worktree.reset({
...
}) Try it
experimental.resource.list | Name | In | Type | Required |
|---|---|---|---|
| directory | query | string | optional |
| workspace | query | string | optional |
{ [key: string]: McpResource }
Example response from schema
{} Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.experimental.resource.list({
...
}) Try it
managed-worktree.list | Name | In | Type | Required |
|---|---|---|---|
| directory | query | string | optional |
| workspace | query | string | optional |
ManagedWorktreeInfo[]
Example response from schema
[
{
"id": "",
"parentId": "",
"name": "",
"branch": "",
"directory": "",
"createdAt": 0
}
] Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.managed-worktree.list({
...
}) Try it
managed-worktree.create | Name | In | Type | Required |
|---|---|---|---|
| directory | query | string | optional |
| workspace | query | string | optional |
{ from: string name?: string | null into?: string | null }
{ id: string parentId: string | null name: string branch: string directory: string createdAt: | number | "Infinity" | "-Infinity" | "NaN" }
Example response from schema
{
"id": "",
"parentId": "",
"name": "",
"branch": "",
"directory": "",
"createdAt": 0
} Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.managed-worktree.create({
...
}) Try it
managed-worktree.remove | Name | In | Type | Required |
|---|---|---|---|
| directory | query | string | optional |
| workspace | query | string | optional |
{ at: string }
null Example response from schema
null
Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.managed-worktree.remove({
...
}) Try it
This changes or removes server state, against whatever base URL is set above.
managed-worktree.link | Name | In | Type | Required |
|---|---|---|---|
| directory | query | string | optional |
| workspace | query | string | optional |
{ at: string to?: string | null }
{ id: string parentId: string | null name: string branch: string directory: string createdAt: | number | "Infinity" | "-Infinity" | "NaN" }
Example response from schema
{
"id": "",
"parentId": "",
"name": "",
"branch": "",
"directory": "",
"createdAt": 0
} Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.managed-worktree.link({
...
}) Try it
managed-worktree.children | Name | In | Type | Required |
|---|---|---|---|
| of | query | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
ManagedWorktreeInfo[]
Example response from schema
[
{
"id": "",
"parentId": "",
"name": "",
"branch": "",
"directory": "",
"createdAt": 0
}
] Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.managed-worktree.children({
...
}) Try it
managed-worktree.ancestors | Name | In | Type | Required |
|---|---|---|---|
| of | query | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
ManagedWorktreeInfo[]
Example response from schema
[
{
"id": "",
"parentId": "",
"name": "",
"branch": "",
"directory": "",
"createdAt": 0
}
] Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.managed-worktree.ancestors({
...
}) Try it
Schemas
The 14 schemas reachable from these endpoints. Each is shown one level
deep; nested types link to their own entry below.
Names ending in _2, _3 and so on are the OpenAPI emitter
disambiguating same-named schemas declared by different HttpApi groups — they are distinct
shapes, not duplicates.
{ from: string name?: string | null into?: string | null }
{ id: string parentId: string | null name: string branch: string directory: string createdAt: | number | "Infinity" | "-Infinity" | "NaN" }
{ at: string to?: string | null }
ManagedWorktreeInfo[]
{ at: string }
{ name: string uri: string description?: string | null mimeType?: string | null client: string }
{ [key: string]: McpResource }
string[]
ToolListItem[]
{ id: string description: string parameters: unknown }
{ name: string branch?: string | null directory: string }
{ name?: string | null branch?: string | null branchPrefix?: string | null baseBranch?: string | null remote?: string | null startCommand?: string | null }
{ directory: string }
string[]