---
number: 33613
slug: 33613-deploy-edge-functions-from-cli-without-needing-docker-import-files-outside-of-su
published: 2025-02-14
discussion: https://github.com/orgs/supabase/discussions/33613
labels:
  - cli
  - edge functions
page: https://supabase.com/changelog/33613-deploy-edge-functions-from-cli-without-needing-docker-import-files-outside-of-su
---

# Deploy Edge Functions from CLI without needing Docker + import files outside of supabase directory

We've introduced an experimental flag to the Supabase CLI, which allows you to deploy Edge Functions without running Docker.

### How to use

```bash
npx supabase@beta functions deploy --use-api
```

This also simplifies importing files outside the `supabase/` directory within Edge Functions. Useful for monorepo setups where you want to share code between your frontend and Edge Functions.

For example, Given the directory layout below, you can import `my-lib` from either `index.ts` or `deno.json`.

```
my-repo/
├─ my-app/
│  ├─ supabase/
│  │  │  functions/
│  │  │  │  slug/
│  │  │  │  ├─ index.ts
│  │  │  │  ├─ deno.json
├─ my-lib/
│  ├─ src/
│  │  ├─ index.ts
├─ README.md
```

The new flag is available from the Supabase CLI beta releases [2.13.3](https://github.com/supabase/cli/releases/tag/v2.13.3). Please check [CLI upgrade guide](https://supabase.com/docs/guides/local-development/cli/getting-started?queryGroups=platform&platform=linux#updating-the-supabase-cli) on how to use the beta releases on your machine.

### CI

We also recommend using the `--use-api` flag if you [deploy Edge Functions via CI](https://supabase.com/docs/guides/functions/cicd-workflow). This should speed up the deploys as it no longer requires Docker and also solves a race condition previously occurred when deploying multiple functions in parallel.

Here's an example GitHub Action config:

```yaml
name: Deploy Function

on:
  push:
    branches:
      - main
  workflow_dispatch:

jobs:
  deploy:
    runs-on: ubuntu-latest

    env:
      SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
      PROJECT_ID: your-project-id

    steps:
      - uses: actions/checkout@v3

      - uses: supabase/setup-cli@v1
        with:
          version: 2.13.3

      - run: supabase functions deploy --use-api --project-ref $PROJECT_ID
````

**Note**:  If you run into any issues with the `--use-api`, you can drop the flag to use the default Docker-based deploy mechanism.

**Note 2**: To run/ test Edge Functions locally (`supabase functions serve`), you will still need Docker. This only modifies deploy behavior.
