# NoIdea Agent Setup

One-file setup guide for AI agents. Install the NoIdea skill first, then install and authenticate the CLI the skill uses to call marketplace APIs.

## Step 1: Install the skill

```bash
npx skills add ReScienceLab/noidea-skill
```

If your installer requires an explicit skill name:

```bash
npx skills add ReScienceLab/noidea-skill --skill noidea
```

## Step 2: Install the CLI

Recommended install:

```bash
curl -fsSL https://dev.noidea.rescience.com/cli | sh -s -- --dev
```

Checksum-verified manual install for raw binary releases:

macOS arm64 example:

```bash
curl -fsSL https://github.com/ReScienceLab/noidea-skill/releases/latest/download/noidea-darwin-arm64 \
  -o /tmp/noidea-darwin-arm64
curl -fsSL https://github.com/ReScienceLab/noidea-skill/releases/latest/download/noidea-darwin-arm64.sha256 \
  -o /tmp/noidea-darwin-arm64.sha256

cd /tmp
shasum -a 256 -c noidea-darwin-arm64.sha256
chmod +x /tmp/noidea-darwin-arm64 && sudo mv /tmp/noidea-darwin-arm64 /usr/local/bin/noidea
```

Linux users can use `sha256sum --check <asset>.sha256` instead of `shasum`.

## Step 3: Authenticate

```bash
noidea auth logout 2>/dev/null || true
NOIDEA_API_URL="https://calculating-weasel-388.convex.site" NOIDEA_WEB_URL="https://dev.noidea.rescience.com" noidea auth login
```

This clears any previously saved CLI environment, then pins both the CLI API URL and the web URL to this environment.

This opens a browser/device-code flow. For headless or CI environments, use the same environment-pinned login:

```bash
noidea auth logout 2>/dev/null || true
NOIDEA_API_URL="https://calculating-weasel-388.convex.site" NOIDEA_WEB_URL="https://dev.noidea.rescience.com" noidea auth login --api-key <API_KEY>
```

Create API keys from NoIdea under Settings -> API Keys.

## Step 4: Verify setup

```bash
noidea --version
noidea status
noidea assets browse --limit 1
```

Setup is complete when `status` returns your account and `assets browse` returns an asset list or an empty list without errors.

## Agent usage

After setup, ask your agent to use NoIdea rather than manually operating the CLI. CLI output is TOON by default for token-efficient agent use. Add `--json` only when strict JSON parsing is required.

Common agent-facing commands:

| Command | Purpose |
|---------|---------|
| `noidea assets search "<query>" --mode hybrid --limit 10` | Search marketplace assets |
| `noidea discover trending --limit 5` | View trending assets |
| `noidea assets view <id>` | Preview an asset before buying |
| `noidea wallet balance` | Check spendable balance |
| `noidea buy <id> --expected-price-cents <cents>` | Purchase after explicit user confirmation |
| `noidea assets read <id>` | Read purchased or owned content |
| `noidea assets draft save --body @file.md ...` | Save a seller draft from a file |
| `noidea assets draft publish <id>` | Submit a reviewed seller draft |
| `noidea seller dashboard` | View seller earnings |
| `noidea seller payouts --limit 20` | View seller payout history |

## Troubleshooting

1. Confirm this file opens without a 404 at your domain's `/setup.md`.
2. Run `noidea auth whoami` to confirm credentials are present and valid.
3. Refresh your agent session after installing the skill.
4. Make sure your agent supports custom skills.

## Further reading

- OpenAPI spec: https://calculating-weasel-388.convex.site/api/doc
