Skip to navigation

Set up a coding agent

Setting up an agent takes four steps: install the CLI where the agent executes commands, give it a token, pin the environment, and add an instruction block.

1

Install the CLI where the agent runs

The CLI must be on the PATH of the shell the agent uses. That shell is not always your own machine.

Agent runsInstall with
On your machine (Claude Code, Cursor, Codex CLI)The installer: curl -fsSL https://cli.deel.com/install.sh | sh
In a container or hosted sandboxThe same installer; the binary needs no runtime
In CIThe installer pinned to a release: curl -fsSL https://cli.deel.com/YOUR_CLI_VERSION/install.sh | sh, or npm install -g @deel-org/cli@YOUR_CLI_VERSION
On Windowsnpm install -g @deel-org/cli

To check the installation, run:

deel --version
2

Provide a token

Create a personal access token, if not already created; see Quickstart for how. Scope it to only what the agent’s tasks require.

Use the pattern from Tokens for agents, CI, and scripts: the OS keychain on a developer machine, an injected secret in containers or CI.

deel auth login --env demo
export DEEL_TOKEN="$DEEL_PAT_SECRET" # injected from your secret store

The agent runs deel commands; the CLI resolves the token, and the agent is not exposed to the token value.

3

Pin the environment

Agents explore by running commands. Keep them in the demo environment until a workflow is proven.

export DEEL_ENV=demo

When the workflow is ready for production, set DEEL_ENV=prod for that agent explicitly, or instruct the agent to pass --env prod on the commands that need it.

4

Add the instruction block

Agents follow project instruction files. Add the block below to the file your agent reads.

Append to CLAUDE.md in the repository root (or ~/.claude/CLAUDE.md for every project).

CLAUDE.md
## Deel CLI
- Use the `deel` command to work with Deel. Run `deel --help` to list command groups.
- Before calling a command, run `deel <group> <action> [--variant] --help --json` and
`deel <group> <action> [--variant] --generate-input` to learn the request body. Never
guess field names or allowed values.
- Pass request bodies with `--input file://<path>` or inline JSON. Read results from stdout
as JSON; errors are JSON on stderr with an `error.code` field.
- Stay in the demo environment (`--env demo`) unless told otherwise. `create` and
`create-bulk` commands have real effects.
- Use `--fields` or `--jq` to keep output small. Bulk commands return a `job_id`; follow it
with `deel job status <job_id>`.
5

Verify

Ask the agent to confirm its setup before giving it real work, using the same two checks from Quickstart:

  • “Run deel auth status --fields valid,source and tell me the result.”
  • “Describe the request body of deel adjustments create --invoice using its --help --json output.”

Checklist for hosted and shared environments

Beyond the general guardrails, hosted and shared environments also require:

  • Use the installer in containers; the binary needs no runtime.
  • Set DEEL_TOKEN from the platform’s secret store, never from a file in the workspace.

Next steps