arrow
Documentation

API Reference

Complete reference for Arrow configuration, CLI commands, and runtime behavior.

Configuration

Arrow looks for arrow.config.ts in the project root. It must export a default config object created with defineConfig.

arrow.config.ts
import { defineConfig } from '@arrow/cli'

export default defineConfig({
  project: 'my-app',
  tasks: { /* ... */ },
  pipelines: { /* ... */ },
})

CLI commands

CommandDescription
arrow init <name>Create a new project from a template.
arrow run <task>Execute a single task.
arrow pipeline <name>Run a defined pipeline.
arrow watchStart watch mode for the default pipeline.
arrow listList available tasks and pipelines.
arrow infoPrint project and environment diagnostics.
arrow plugin add <name>Install an Arrow plugin.
arrow self-updateUpdate Arrow to the latest version.
arrow --versionPrint the installed version.

Task schema

Task interface
interface Task {
  /** The shell command to execute */
  command: string
  /** Working directory for the task (relative to project root) */
  cwd?: string
  /** Environment variables specific to this task */
  env?: Record<string, string>
  /** Input file globs for cache invalidation */
  inputs?: string[]
  /** Output file globs for cache storage */
  outputs?: string[]
  /** Whether the task can run in parallel with others */
  parallel?: boolean
  /** Tasks that must complete before this one runs */
  dependsOn?: string[]
  /** Timeout in milliseconds (default: 300000) */
  timeout?: number
  /** Continue pipeline even if this task fails */
  continueOnError?: boolean
}

Pipeline schema

Pipeline interface
interface Pipeline {
  /** Ordered list of task names to execute */
  tasks: string[]
  /** Whether to stop on first failure */
  failFast?: boolean
}

Pipelines can reference other pipelines by prefixing with pipeline:.

ts
pipelines: {
  build: ['lint', 'test', 'build'],
  deploy: ['pipeline:build', 'deploy:staging'],
}

Environment variables

VariableDescription
ARROW_ENVTarget environment: development, staging, production.
ARROW_CACHESet to 0 to disable task caching.
ARROW_PARALLELMaximum concurrent tasks (default: CPU count).
ARROW_LOG_LEVELOutput verbosity: silent, error, warn, info, debug.