> ## Documentation Index
> Fetch the complete documentation index at: https://docs.curvelabs.org/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI and agents

> Use the ThinkFeel package for local development, coding agents, and safe key setup.

The npm package includes the TypeScript SDK, the `thinkfeel` CLI, and a `SKILL.md` file that tells coding agents how to use ThinkFeel safely. Use it for local development, coding-agent setup, and safe key creation after Playground access is approved.

## Install for Codex

Most Codex users should add the ThinkFeel marketplace and install the plugin:

```bash theme={null}
codex plugin marketplace add artificial-affect/thinkfeel-codex-dev-plugin
codex plugin add thinkfeel-codex-dev-plugin@thinkfeel
```

Start a new Codex thread after installation so Codex loads the ThinkFeel plugin skill and MCP server.

## Install the package or run one-off

```bash theme={null}
npm i @curvelabs.org/thinkfeel

# One-off usage without adding the package to a project
npx --package @curvelabs.org/thinkfeel thinkfeel --help
```

## Login, name keys, and switch profiles

```bash theme={null}
npx thinkfeel login
npx thinkfeel login --persona-id YOUR_THINKFEEL_PERSONA_ID
npx thinkfeel login --name "Local dev key" --persona-id YOUR_THINKFEEL_PERSONA_ID
npx thinkfeel login --profile work --persona-id YOUR_THINKFEEL_PERSONA_ID
npx thinkfeel profiles
npx thinkfeel use work
```

## Configure CI or local scripts

```bash theme={null}
printf '%s\n' "$THINKFEEL_API_KEY" | npx thinkfeel configure --api-key-stdin --persona-id YOUR_THINKFEEL_PERSONA_ID
npx thinkfeel configure --api-key-env THINKFEEL_API_KEY --persona-id YOUR_THINKFEEL_PERSONA_ID
npx thinkfeel configure --profile work --api-key-env WORK_THINKFEEL_API_KEY --persona-id YOUR_THINKFEEL_PERSONA_ID
npx thinkfeel configure --show
```

## Generate, personify, inspect JSON, and clear config

```bash theme={null}
npx thinkfeel generate "Can we talk later?"
npx thinkfeel generate "Can we talk later?" --variations
npx thinkfeel generate "Can we talk later?" --json
npx thinkfeel personify "Thanks for reaching out. Send me the details when you have them."
npx thinkfeel configure --clear --profile work
```

## Inspect the package skill

```bash theme={null}
cat node_modules/@curvelabs.org/thinkfeel/SKILL.md
```

```markdown theme={null}
---
name: thinkfeel-sdk
description: Use when a coding agent needs to install, configure, or call the ThinkFeel SDK or CLI for generate/personify work.
---

# ThinkFeel SDK

Use this skill when a project needs ThinkFeel API access through @curvelabs.org/thinkfeel or the thinkfeel CLI.

Rules:

- Never ask the user to paste an API key into chat.
- Prefer npx thinkfeel login for approved Playground users.
- Use the persona ID the user already has; do not invent one.
- Verify setup with npx thinkfeel configure --show without exposing secrets.
```

## Browser login URL details

```text theme={null}
GET /api/thinkfeel/cli/login?state=...&name=...&source=cli&redirect_uri=http://127.0.0.1:PORT/thinkfeel/callback&recipient_public_key_jwk=...

Required query params:
- state: random value generated by the caller to protect the login session
- redirect_uri: http loopback URL only (127.0.0.1, localhost, or ::1)
- recipient_public_key_jwk: base64url-encoded RSA public JWK

Optional query params:
- name: display name for the generated API key
- source: cli or codex

Do not use this route as a general key-creation API. The browser-authenticated confirmation page returns only an encrypted `encrypted_api_key` value to the local callback.
```

<Warning>
  Automated setup should use `npx thinkfeel login`, not a custom script that asks users to paste API keys into chat. If
  browser login is unavailable, use `configure --api-key-env` or `configure --api-key-stdin`.
</Warning>
