---
title: 'flexkit dev'
description: 'Run your custom tools and code skills locally while you develop them.'
---

# `flexkit dev`

Runs the tools and skills from your local `flexkit.tools.ts` as your personal local runtime. While it is connected, Chat turns and manual automation runs that you start use these local tools instead of the project's production tools URL. Other members and background triggers are not affected.

## Synopsis

```bash
flexkit dev [options]
```

## Behavior

- Resolves the project from `flexkit.config.ts` (use `--project` when the config defines several).
- Loads `.env.local` and `.env` from the current directory when present, then bundles and imports `flexkit.tools.ts` (`.js` and `.mjs` are also accepted). The file must `export default defineTools(...)`.
- Registers with Flexkit as your local runtime and advertises the tool catalog and code skills. Code skills are synced for your account on every change.
- Polls for tool calls, runs them on your machine, and prints one line per call with its duration.
- Watches the tools file and its imports; a change re-registers the updated catalog.
- Stops on Ctrl+C. The Dashboard shows the runtime as disconnected shortly after.

`flexkit dev` needs a user session from `flexkit login` with the owner or developer role. API tokens cannot register a local runtime and the command exits with an error when one is used.

## Options

- `--project <id>`: Project to connect when `flexkit.config.ts` defines several.
- `--tools-file <path>`: Path to the tools file. Defaults to `flexkit.tools.ts` in the current directory.
- `--env-file <path>`: Environment file to load before importing the tools. Repeatable; replaces the default `.env.local` and `.env`.
- `--no-watch`: Do not watch the tools file for changes.
- See also the [global options](/docs/cli/global-options).

## Examples

```bash
# Run the local runtime from the folder with flexkit.config.ts and flexkit.tools.ts
flexkit dev

# Connect one project of a multi-project config with a specific env file
flexkit dev --project abcdefghij --env-file .env.development
```

See [custom tools](/docs/automations/custom-tools) for the end-to-end workflow.


---

[View full sitemap](/docs/sitemap.md)
