# CLI and coding agents

AI coding agents work best when they understand the systems and tools available to them. The superglue CLI includes a skill that teaches agents how to authenticate, use `sg` commands, build tools, and investigate failures.

## Install the CLI

Install the CLI, sign in, and confirm the active account:

```bash
npm install -g @superglue/cli
sg login
sg whoami
```

For CI or another non-interactive environment, configure an API key instead:

```bash
export SUPERGLUE_API_KEY="your-api-key"
export SUPERGLUE_API_ENDPOINT="https://api.superglue.cloud"
```

See the [CLI overview](/docs/cli/overview/) for authentication and usage, or the [command reference](/docs/cli/commands/) for every available command.

## Install the skill

Install the superglue skill for any supported coding agent:

```bash
npx skills add superglue-ai/cli
```

The installer detects supported agents automatically. To target one agent globally, run `npx skills add superglue-ai/cli -g -a <agent>`.

## What the skill provides

- CLI commands, flags, and authentication patterns
- System, credential, tool, and execution schemas
- Workflows for testing systems and investigating failed runs
- Focused references for HTTP APIs, databases, file servers, transforms, and integrations

## Add project context

The skill teaches an agent how to use superglue. Add a short instruction to `AGENTS.md`, `CLAUDE.md`, or your agent's equivalent file so it also discovers the current project setup:

```markdown
## Using superglue

Before working with superglue:

1. Read the superglue skill and the references relevant to the task.
2. Confirm that the CLI is authenticated.
3. Run `sg system list` and `sg tool list` before building or changing anything.
4. Discover system and tool IDs instead of hardcoding them.
```

## LLM-readable documentation

Agents that do not support skills can use [llms.txt](/llms.txt) as a lightweight documentation index or [llms-full.txt](/llms-full.txt) for the complete documentation in one file.

## More resources

- [skills.sh](https://skills.sh) — install the superglue skill for supported AI agents
- [CLI repository](https://github.com/superglue-ai/cli) — source code and release information
- [GitHub Issues](https://github.com/superglue-ai/cli/issues) — report bugs or request features