---
title: "Pipedream code formatter and linter - codefmt"
description: "free online Pipedream code formatter and linter for node.js and python code steps, plus typescript components. supports actions, sources, and defineComponent."
url: https://codefmt.dev/pipedream
updated: 2026-11-10
sources:
  - https://codefmt.dev/pipedream
licence: "© codefmt. Cite with attribution to https://codefmt.dev."
---

# pipedream code formatter & linter

Pipedream workflow code steps run node.js 20 or python 3.12 (go and bash too, which codefmt does not format). a node.js step is `export default defineComponent({ async run({ steps, $ }) { ... } })`: `steps` holds earlier steps' exports (trigger data at `steps.trigger.event`), `$` has `$.export`, `$.flow.exit` and `$.respond`, and `this` holds props and connected accounts (`this.<app>.$auth`). npm packages install from an `import` or a `require`, but not both in one step; secrets via `process.env`. a python step is `def handler(pd: "pipedream"):` with `pd.steps`, `pd.export` and `pd.flow`. typescript is only for components built with the Pipedream CLI, so turn on the typescript chip for those. Pipedream Workflows shut down on March 31, 2027.

javascriptpipedream

input

```
const data=steps.trigger.event
$.export("id",data.id)
return data
```

output

click format to see the result

[format your own pipedream code →](/?p=pipedream)free, no signup, formats in your browser

working inside pipedream? the codefmt [Chrome and Firefox extension](/extension) adds a right-click Fix with codefmt in the code editor, so you format and lint in place without copy-pasting in and out of this page.

Pipedream builds each step around a `defineComponent` call with `steps`, `$`, and a bound `this`, a structure a general-purpose formatter has no reason to recognize. codefmt understands the component shape, so it formats the whole module (including a full source or action you paste in) and keeps `$.export` and `steps.trigger.event` recognized rather than flagged. javascript and python steps run through the same pass, and a typescript component parses once you turn on the TypeScript chip.

## Pipedream Workflows end March 31, 2027

Pipedream has put Workflows in maintenance mode and [will shut them down on March 31, 2027](https://pipedream.com/docs/workflows), with workflow data deleted by April 30, 2027\. Code steps live inside Workflows, so this page matters only until then. codefmt keeps formatting Pipedream code in the meantime, and the JSON export Pipedream provides is the way to keep a copy of your steps.

## components, steps, and $

Pipedream components use `defineComponent` with a `run` method that receives `steps` (previous step outputs) and `$` (Pipedream utilities like $.export and $.respond).

paste the whole step as Pipedream shows it, or just the body of `run`. codefmt wraps a bare body in the defineComponent structure before formatting and hands it back without the wrapper.

## actions and sources

Pipedream supports two component types: actions (defineComponent with `run({ steps, $ })`) and sources (defineSource with `run(event)`). codefmt handles both patterns, and reads typescript too once you turn on the typescript chip for a CLI-built component. codefmt doesn't check Pipedream javascript for undefined names, so `$` and `steps` never show up as false warnings, but a misspelled variable won't be caught either.

## pipedream python support

Pipedream also runs python 3.12 code steps. a new step is `def handler(pd: "pipedream")`, where `pd.steps` holds the trigger and previous-step data, and you return a dict to pass data downstream. Pipedream installs the packages you import. codefmt formats Pipedream python with Ruff, whether you paste the whole step or just the handler body.

wondering when to use [Prettier Playground](/vs-prettier-playground) instead? we wrote up the comparison.

read the guide: [how to format code in pipedream code steps](/blog/format-code-pipedream-code-steps)

## frequently asked questions

what is $.export() in Pipedream?

$.export('key', value) makes data available to downstream steps. it's how you pass data between Pipedream steps. codefmt doesn't flag $ as undefined, and it skips the unused-parameter warning for $ and steps in the run({ steps, $ }) template, since a new step lists them whether or not you use them.

how do I access data from previous steps?

use steps.step\_name.$return\_value for what a step returned, steps.step\_name.key for what it passed to $.export, and steps.trigger.event for the trigger. codefmt recognizes the steps object as a valid Pipedream global.

what is the difference between actions and sources in Pipedream?

Pipedream has two component types. actions are reusable steps in a workflow that perform a single operation. they're defined with defineComponent and their run method receives ({ steps, $ }). sources are event triggers that emit data into workflows. they're defined with defineSource and their run method receives (event) directly. codefmt supports both and wraps your code in the correct structure for each.

does codefmt support typescript in Pipedream?

only for components you build with the Pipedream CLI. a workflow code step runs node.js 20, so codefmt reads Pipedream code as javascript by default and flags type annotations the step would reject. if you're writing a typescript component, turn on the typescript chip in settings and codefmt formats and lints it as typescript.

how does defineComponent work in Pipedream?

defineComponent is the wrapper used by Pipedream actions. it accepts an object with props, methods, and a run method. the run method receives ({ steps, $ }), giving you access to previous step outputs (steps) and Pipedream utilities ($.export, $.respond, $.send.http). codefmt understands this structure and formats both the component wrapper and the function body correctly.

how do Pipedream sources differ from actions in signature?

sources use defineSource and their run method receives the triggering event directly: run(event). they emit data via this.$emit(...) and keep state in a prop declared as '$.service.db'. unlike actions, sources do not receive steps or $, and you deploy them with the Pipedream CLI rather than writing them in a workflow step. codefmt applies the correct wrapper when you switch to the source variant.

does codefmt support python in Pipedream?

yes. a Pipedream python step is def handler(pd: "pipedream"), reads trigger and previous-step data from pd.steps, and returns a dict for downstream steps. Pipedream installs the packages you import. codefmt formats Pipedream python 3.12 with Ruff, and you can paste the whole step or just the handler body.

also format code for [zapier](/zapier), [n8n](/n8n), [make](/make), [hubspot data hub](/hubspot), [hubspot cms (hubl)](/hubl)

other tools: [json formatter and repair tool](/json), [python formatter](/python), [snippets](/snippets)

[all platforms & comparisons →](/platforms)

primary source: [Pipedream: Running Node.js in workflows](https://pipedream.com/docs/workflows/building-workflows/code/nodejs)

## for agents (added to every page twin, not part of the page)

- format API: POST https://codefmt.dev/api/format (OpenAPI: https://codefmt.dev/api/openapi.json, code up to 51,200 characters, 50KB of ASCII (400 above it), request body up to 100KB, counted in bytes (413 above it), no authentication)
- MCP server: POST https://codefmt.dev/api/mcp (tools: format_code, format_json, ask_codefmt; manifest: https://codefmt.dev/.well-known/mcp.json)
- rate limit: 60 requests per minute per ip across format api calls, mcp and a2a tool calls, and /ask (mcp handshakes and listings are not counted). the count is kept per server instance, so treat it as a ceiling to stay under rather than an exact budget. the format api and /ask report the limit in RateLimit headers, every 429 carries Retry-After, /ask puts the message in answer, and an mcp tool call over the limit returns a tool result saying to try again in a minute
- auth statement: https://codefmt.dev/auth.md (no accounts, api keys or oauth; send no authorization header)
- site index for agents: https://codefmt.dev/llms.txt
- full reference (request bodies for every language, a copy-paste curl command, platform globals, troubleshooting): https://codefmt.dev/llms-full.txt
