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

# deepline run

> Run a tool, a play, a play file, or inline code.

## run

```text theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
Usage: deepline run [options] [name]

Run a tool, a play, a play file, or inline code.

Options:
  -e, --eval <code>        Code to run as a play body, instead of a name
  --input <json>           Input as a JSON object
  --input-file <path>      Input from a JSON file; - reads stdin
  --example <name>         Start from a named example input the play declares
  --json-out <path>        Save the result as JSON to this new file
  --csv-out <[list=]path>  Save rows as CSV to this new file; repeat for more
                           lists
  --fields <paths>         Only these dotted paths, comma-separated
  --dry-run                Check the input and show the price; runs nothing
  --timeout <duration>     Stop waiting after 90s, 10m, 1h; 0 returns at once
  --max-credits <credits>  Stop a play run that would spend more
  --fresh                  Call providers again instead of reusing saved results
  --json                   Print the receipt as JSON unless --receipt-out is set
  --full                   Show every field of the result
  --lines <n>              Lines of values in the receipt (default 32)
  --receipt-out <path>     Write the JSON receipt only to this new file
  --logs-out <path>        Save a play's live logs here; - prints them
  -h, --help               display help for command
```

```text theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
Explanation:
  Purpose:
    Run a tool, a play, a play file, or a few lines of code. One command for
    all of them.
  When:
    After describe, once you know the inputs. For paid work, add --dry-run
    first to check the input and see the price.
  Input:
    The id from search, and one JSON object: --input '{...}' or
    --input-file input.json. A play that reads a CSV takes its path:
    --input '{"csv":"leads.csv"}'. -e '<code>' runs code as a play body.
    <play>@latest runs the newest revision; deepline/<id> runs Deepline's
    version when your org has one with the same name. --example <name> starts
    from a named example input the play declares (describe lists them);
    --input fields replace the example's.
  Examples:
    deepline run hunter_email_verifier --input '{"email":"a@b.com"}'
    deepline run person-to-email-batch --input '{"csv":"leads.csv"}' --dry-run
    deepline run person-to-email-batch --input '{"csv":"leads.csv"}' --csv-out emails.csv
    deepline run my.play.ts --input-file input.json --json-out result.json
    deepline run -e 'return { doubled: input.n * 2 };' --input '{"n":21}'
  Output:
    A receipt: what ran, its status and cost, where the data was saved, and
    the first values. A tool call's credentialSource says which provider key it
    ran on (or, with --dry-run, would run on): managed is Deepline's key, user
    is your own connected key. --receipt-out <path> writes the JSON receipt only
    to that new file, even with --json. File errors go to stderr. Use --json-out - or
    --csv-out - to pipe result data to stdout.
    --fields picks values and CSV columns. Exit code 0 completed, 1 failed or
    still running, 2 nothing ran.
    A failed tool call's receipt error matches deepline tools execute:
    error.retry says whether sending the same call again can succeed, and
    error.upstreamResponse holds a connected provider's status and body.
  Cost:
    What the tool or play charges. --max-credits caps a play run's posted
    charges; parallel calls in flight can end it somewhat over (plays run
    --help). Running an interrupted call again replays it without paying twice.
  Next:
    Read the saved file. deepline runs get <id> shows the run again.
```


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