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

# sauce init

> Scaffold a project that uses @eco-incorp/sauce, set up for writing programs in an editor and with a coding agent.

`sauce init` creates a project that uses `@eco-incorp/sauce`. You can also use it to generate only the editor `tsconfig.json` for SauceScript programs.

## Synopsis

```bash theme={null}
sauce init [<dir>] [--agent <agent>,…] [--force] [--install]
sauce init <dir> --tsconfig [--force]
```

## Description

`sauce init <dir>` writes a project into `<dir>`, the current directory when you give none:

| File | Contents |
| - | - |
| `package.json` | `@eco-incorp/sauce` pinned to exactly the version that ran `init`, `viem` pinned to exactly the version installed beside it, `typescript` and `@types/node` as dev dependencies, `"type": "module"` and Node.js 24 or newer in `engines`. The SDK's TypeScript API uses viem's types. |
| `AGENTS.md` | The project's instructions for coding agents: which skills to read, how to run `sauce`, where programs go, how to give your own endpoints. |
| `CLAUDE.md` | `@AGENTS.md`, so Claude Code reads `AGENTS.md`. Written when the agents include `claude`. |
| `GEMINI.md` | `@./AGENTS.md`, so Gemini CLI reads `AGENTS.md`. Written when the agents include `gemini`. |
| `.gitignore` | `node_modules/`, and the local configuration: `sauce.config.json`, `.env`, `.env.*`. |
| `sauce.config.example.json` | An endpoint file with placeholders only. Copy it to `sauce.config.json` and replace each placeholder ([Chains, endpoints and fees](https://docs.eco.com/sauce-sdk/cli/chains-and-endpoints.md#the-config-file)). |
| `programs/tsconfig.json` | The SauceScript project for `programs/*.sauce.ts`: SauceScript's names and the package's TypeScript plugin, kept apart from the project's other TypeScript. |

It then installs the agent skills as [`sauce skills install`](https://docs.eco.com/sauce-sdk/cli/skills) does, for every agent unless `--agent` names some.

`init` overwrites nothing without `--force`. When a file it would write already exists with other content, it lists the files and refuses the whole scaffold, before writing anything. A file that already has the same content is reported `unchanged`. `init` runs no package manager unless you pass `--install`, which runs `npm install` in the project.

`sauce init <dir> --tsconfig` writes only `<dir>/tsconfig.json`, the same SauceScript project as `programs/tsconfig.json`. Use it for programs in a project `init` did not write, or in another directory: an editor takes a file's nearest `tsconfig.json`, so every `*.sauce.ts` under `<dir>` gets SauceScript's names and the plugin. Where the project's own `tsconfig.json` also covers those files, add `"exclude": ["**/*.sauce.ts"]` to it so its TypeScript does not check them too. `--tsconfig` refuses `--agent` and `--install`. The plugin loads where the editor runs the project's own TypeScript.

## Options

| Option | Description |
| - | - |
| `--agent <agent>` | Whose skills to install: `claude`, `codex`, `cursor`, `copilot`, `gemini`, `agents-md` or `all`, comma-separated. |
| `--force` | Overwrite files that already exist with other content. |
| `--install` | Run `npm install` in the project afterwards. |
| `--tsconfig` | Write only `<dir>/tsconfig.json`: an editor's SauceScript project for the programs there. |
| `-h, --help` | Show the help. |
| `--no-update-check` | Print no notice of a newer `sauce`, and do not read the registry for one. |

## Output

`init` prints each file with its state (`wrote`, `unchanged`), then the skills installed, then the next commands to run. It exits 1 when it refuses to overwrite a file, and 1 when `npm install` fails under `--install`.

## Examples

### Scaffold a project

```bash theme={null}
sauce init app
```

```text theme={null}
Scaffolded app:
  wrote      package.json
  wrote      AGENTS.md
  wrote      CLAUDE.md
  wrote      GEMINI.md
  wrote      .gitignore
  wrote      sauce.config.example.json
  wrote      programs/tsconfig.json
  installed claude (.claude/skills)
  installed codex, cursor, copilot, gemini (.agents/skills)
Next:
  cd app
  npm install
  sauce --help
```

Besides the skills directories `.claude/skills/` and `.agents/skills/`, the project holds:

```text theme={null}
app/
├── .gitignore
├── AGENTS.md
├── CLAUDE.md
├── GEMINI.md
├── package.json
├── programs/
│   └── tsconfig.json
└── sauce.config.example.json
```

The `package.json` it wrote:

```json package.json theme={null}
{
  "name": "app",
  "version": "<version>",
  "private": true,
  "type": "module",
  "engines": {
    "node": ">=24"
  },
  "dependencies": {
    "@eco-incorp/sauce": "<version>",
    "viem": "<version>"
  },
  "devDependencies": {
    "typescript": "^<version>",
    "@types/node": "^<version>"
  }
}
```

The config example:

```json sauce.config.example.json theme={null}
{
  "rpcUrls": {
    "1": "<RPC_URL for Ethereum>",
    "8453": "<RPC_URL for Base>"
  }
}
```

### Refuse to overwrite

After `CLAUDE.md` was edited, a second `init` refuses and writes nothing.

```bash theme={null}
sauce init app
```

```text theme={null}
sauce init: app already has files init would overwrite:
  CLAUDE.md
Pass --force to overwrite them.
```

The command exits 1.

### Scaffold for one agent

```bash theme={null}
sauce init app2 --agent codex
```

```text theme={null}
Scaffolded app2:
  wrote      package.json
  wrote      AGENTS.md
  wrote      .gitignore
  wrote      sauce.config.example.json
  wrote      programs/tsconfig.json
  installed codex (.agents/skills)
    wrote      .agents/skills/sauce-actions/SKILL.md
    …
Next:
  cd app2
  npm install
  sauce --help
```

With `codex` alone, `init` writes no `CLAUDE.md` and no `GEMINI.md`.

### Write only an editor tsconfig

```bash theme={null}
sauce init progs --tsconfig
```

```text theme={null}
wrote      progs/tsconfig.json
Every *.sauce.ts under it now has SauceScript's names in an editor. If the project's
own tsconfig.json covers these files too, add "exclude": ["**/*.sauce.ts"] to it.
```

## Next steps

* [`sauce skills`](https://docs.eco.com/sauce-sdk/cli/skills)
* [`sauce mcp`](https://docs.eco.com/sauce-sdk/cli/mcp)
* [Chains, endpoints and fees](https://docs.eco.com/sauce-sdk/cli/chains-and-endpoints.md)
* [Installation](https://docs.eco.com/sauce-sdk/installation.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.