# @psnext/slingcli

A coding agent CLI powered by Publicis Sapient's **Slingshot**.

Installs the `sling` command globally.

## Prerequisites

- macOS or Linux or Windows
- Node.js `>= 20` (check with `node -v`)

## Install

```bash
npm install -g @psnext/slingcli
```

Verify:

```bash
sling --version
```

## First-time login

```bash
sling
```

Then inside the TUI:

1. Type `/login slingshot` and complete login in the browser window that opens
2. Type `/model` to pick a model
3. Start chatting
4. Type `/quit` to exit

If you already have a Slingshot access token, you can skip the interactive login:

```bash
export SLINGSHOT_TOKEN="your-access-token-here"
sling
```

## Useful commands

| Command            | Description                                     |
| ------------------ | ----------------------------------------------- |
| `/login slingshot` | Log in to Slingshot                             |
| `/model`           | Switch model                                    |
| `/compact`         | Compact conversation history                    |
| `/clear`           | Clear current session                           |
| `/quit`            | Exit the application                            |
| `/help`            | Show all commands                               |
| `Escape`           | Interrupt a running response                    |
| `Ctrl+C`           | Clear editor (first press), exit (second press) |

## sling commands

| Sling Command       | Description                              |
| ------------------- | ---------------------------------------- |
| `/s:debug`          | Toggle Slingshot debug logging           |
| `/s:footer`         | Toggle custom footer with Slingshot info |
| `/s:skills-manager` | Open Skill Manager                       |
| `/s:filechanges`    | Toggle file changes tracking             |
| `/s:context`        | Visualize context                        |
| `/s:acm`            | Toggle Agentic Context Management        |

## Available models

| Model                      | Reasoning |
| -------------------------- | --------- |
| gpt-5.4-nano               | Yes       |
| gpt-4.1                    | No        |
| gpt-5                      | Yes       |
| gpt-5-mini                 | Yes       |
| gpt-5-nano                 | Yes       |
| gpt-5.1                    | Yes       |
| gpt-5.2                    | Yes       |
| gpt-5.4-mini               | Yes       |
| gpt-5.4                    | Yes       |
| gpt-5.5                    | Yes       |
| gpt-5.2-codex              | Yes       |
| gpt-5.3-codex              | Yes       |
| claude-opus-4@20250514     | Yes       |
| claude-sonnet-4@20250514   | Yes       |
| claude-sonnet-4-5@20250929 | Yes       |
| claude-sonnet-4-6          | Yes       |
| claude-opus-4-6            | Yes       |
| o3                         | Yes       |
| o3-mini                    | Yes       |
| o4-mini                    | Yes       |
| gemini-2.5-flash           | Yes       |

## Environment variables

| Variable                  | Purpose                                         |
| ------------------------- | ----------------------------------------------- |
| `SLINGSHOT_TOKEN`         | Pre-set access token (skips OAuth)              |
| `SLINGSHOT_PROJECT_ID`    | Project ID for analytics                        |
| `SLINGSHOT_WORKSPACE_ID`  | Workspace ID for analytics                      |
| `SLINGSHOT_DEBUG`         | Enable Slingshot debug logging (`true`/`false`) |
| `SKIP_SLING_AUTO_INSTALL` | Skip first-run auto-install of default packages |

Slingshot debug logs are written to `~/.sling/logs/analytics/<timestamp>.log`.

## Updating

```bash
npm install -g @psnext/slingcli@latest
```

## Uninstall

```bash
npm uninstall -g @psnext/slingcli
```

To also remove saved sessions and auth tokens:

```bash
rm -rf ~/.sling
```

## License

Licensing for `@psnext/slingcli` is to be determined.

This package bundles `@earendil-works/pi-*` (MIT, © 2025 Mario Zechner). The upstream MIT license is preserved in the `LICENSE` file.
