Skip to content
nikcli
Docs
Documentation

Profile

The declared user profile and the habits the Brain learned, plus the preview of what actually reaches the system prompt.

Playground

Send these requests to your own running server. Values stay in this browser.

Not connected
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

6 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 /profile profile.get
patch /profile profile.patch
delete /profile profile.clear
get /profile/habits profile.habits
delete /profile/habits profile.clearHabits
get /profile/preview profile.preview
get /profile # profile.get
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Responses
200 ProfileInfoOrNull application/json
ProfileInfo | null
Example response from schema
{
  "version": 0,
  "key": "",
  "name": "",
  "role": "",
  "about": "",
  "stack": [
    ""
  ],
  "expertise": [
    ""
  ],
  "learning": [
    ""
  ],
  "skills": [
    ""
  ],
  "tools": {
    "preferred": [
      ""
    ],
    "avoid": [
      ""
    ]
  },
  "conventions": [
    ""
  ],
  "communication": {
    "verbosity": "concise",
    "language": "",
    "explain": false
  },
  "custom": "",
  "habits": false,
  "updatedAt": 0
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
profile.get
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.profile.get({
  ...
})
Try it
patch /profile # profile.patch
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  name?: string | null
  role?: string | null
  about?: string | null
  stack?: string[] | null
  expertise?: string[] | null
  learning?: string[] | null
  skills?: string[] | null
  tools?: 
    | {
    preferred?: string[] | null
    avoid?: string[] | null
  }
    | null
  conventions?: string[] | null
  communication?: 
    | {
    verbosity?: 
      | "concise" | "balanced" | "detailed"
      | null
    language?: string | null
    explain?: boolean | null
  }
    | null
  custom?: string | null
  habits?: boolean | null
}
Responses
200 ProfileInfo application/json
{
  version: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  key: string
  name?: string | null
  role?: string | null
  about?: string | null
  stack?: string[] | null
  expertise?: string[] | null
  learning?: string[] | null
  skills?: string[] | null
  tools?: 
    | {
    preferred?: string[] | null
    avoid?: string[] | null
  }
    | null
  conventions?: string[] | null
  communication?: 
    | {
    verbosity?: 
      | "concise" | "balanced" | "detailed"
      | null
    language?: string | null
    explain?: boolean | null
  }
    | null
  custom?: string | null
  habits?: boolean | null
  updatedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
Example response from schema
{
  "version": 0,
  "key": "",
  "name": "",
  "role": "",
  "about": "",
  "stack": [
    ""
  ],
  "expertise": [
    ""
  ],
  "learning": [
    ""
  ],
  "skills": [
    ""
  ],
  "tools": {
    "preferred": [
      ""
    ],
    "avoid": [
      ""
    ]
  },
  "conventions": [
    ""
  ],
  "communication": {
    "verbosity": "concise",
    "language": "",
    "explain": false
  },
  "custom": "",
  "habits": false,
  "updatedAt": 0
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
profile.patch
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.profile.patch({
  ...
})
Try it
delete /profile # profile.clear
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Responses
200 ProfileDeleted application/json
{
  deleted: boolean
}
Example response from schema
{
  "deleted": false
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
profile.clear
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.profile.clear({
  ...
})
Try it

This changes or removes server state, against whatever base URL is set above.

get /profile/habits # profile.habits
Parameters
Name In Type Required
worktree query string | null optional
directory query string optional
workspace query string optional
Responses
200 ProfileHabits application/json
{
  content: string
}
Example response from schema
{
  "content": ""
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
profile.habits
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.profile.habits({
  ...
})
Try it
delete /profile/habits # profile.clearHabits
Parameters
Name In Type Required
worktree query string | null optional
directory query string optional
workspace query string optional
Responses
200 ProfileDeleted application/json
{
  deleted: boolean
}
Example response from schema
{
  "deleted": false
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
profile.clearHabits
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.profile.clearHabits({
  ...
})
Try it

This changes or removes server state, against whatever base URL is set above.

get /profile/preview # profile.preview
Parameters
Name In Type Required
worktree query string | null optional
directory query string optional
workspace query string optional
Responses
200 ProfilePreview application/json
{
  lines: string[]
  habitsFile: string
}
Example response from schema
{
  "lines": [
    ""
  ],
  "habitsFile": ""
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
profile.preview
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.profile.preview({
  ...
})
Try it

Schemas

The 6 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.

ProfileDeleted
{
  deleted: boolean
}
ProfileHabits
{
  content: string
}
ProfileInfo
{
  version: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  key: string
  name?: string | null
  role?: string | null
  about?: string | null
  stack?: string[] | null
  expertise?: string[] | null
  learning?: string[] | null
  skills?: string[] | null
  tools?: 
    | {
    preferred?: string[] | null
    avoid?: string[] | null
  }
    | null
  conventions?: string[] | null
  communication?: 
    | {
    verbosity?: 
      | "concise" | "balanced" | "detailed"
      | null
    language?: string | null
    explain?: boolean | null
  }
    | null
  custom?: string | null
  habits?: boolean | null
  updatedAt: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
ProfileInfoOrNull
ProfileInfo | null
ProfilePatchInput
{
  name?: string | null
  role?: string | null
  about?: string | null
  stack?: string[] | null
  expertise?: string[] | null
  learning?: string[] | null
  skills?: string[] | null
  tools?: 
    | {
    preferred?: string[] | null
    avoid?: string[] | null
  }
    | null
  conventions?: string[] | null
  communication?: 
    | {
    verbosity?: 
      | "concise" | "balanced" | "detailed"
      | null
    language?: string | null
    explain?: boolean | null
  }
    | null
  custom?: string | null
  habits?: boolean | null
}
ProfilePreview
{
  lines: string[]
  habitsFile: string
}