## Description
Remove deprecated config from `gitpod.yaml`
The output when it is run in Gitpod
```
HISTFILE=/workspace/.gitpod/cmd-0 history -r; {
npm i &&
npm run dx:up &&
cp .env.example .env &&
set -a; source .env &&
export NEXTAUTH_URL="$(gp url 3000)" &&
export NEXT_PUBLIC_WEBAPP_URL="$(gp url 3000)" &&
export NEXT_PUBLIC_MARKETING_URL="$(gp url 3001)"
} && {
npm run d
}
gitpod /workspace/documenso (chore/update-gitpod) $ HISTFILE=/workspace/.gitpod/cmd-0 history -r; {
> npm i &&
> npm run dx:up &&
> cp .env.example .env &&
> set -a; source .env &&
> export NEXTAUTH_URL="$(gp url 3000)" &&
> export NEXT_PUBLIC_WEBAPP_URL="$(gp url 3000)" &&
> export NEXT_PUBLIC_MARKETING_URL="$(gp url 3001)"
>
> } && {
> npm run d
> }
> prepare
> husky install
install command is deprecated
added 1842 packages, and audited 1859 packages in 1m
438 packages are looking for funding
run `npm fund` for details
16 vulnerabilities (1 low, 11 moderate, 3 high, 1 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
npm notice
npm notice New minor version of npm available! 10.5.2 -> 10.8.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.0
npm notice Run npm install -g npm@10.8.0 to update!
npm notice
> dx:up
> docker compose -f docker/development/compose.yml up -d
[+] Running 33/3
✔ minio Pulled 6.6s
✔ database Pulled 11.3s
✔ inbucket Pulled 6.1s
[+] Running 5/5
✔ Network documenso-development_default Created 0.1s
✔ Volume "documenso-development_minio" Created 0.0s
✔ Container database Started 1.0s
✔ Container minio Started 1.0s
✔ Container mailserver Started 1.0s
> d
> npm run dx && npm run dev
> dx
> npm i && npm run dx:up && npm run prisma:migrate-dev && npm run prisma:seed
> prepare
> husky install
install command is deprecated
up to date, audited 1859 packages in 4s
438 packages are looking for funding
run `npm fund` for details
18 vulnerabilities (1 low, 11 moderate, 5 high, 1 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
> dx:up
> docker compose -f docker/development/compose.yml up -d
[+] Running 3/0
✔ Container mailserver Running 0.0s
✔ Container minio Running 0.0s
✔ Container database Running 0.0s
> prisma:migrate-dev
> npm run with:env -- npm run prisma:migrate-dev -w @documenso/prisma
> with:env
> dotenv -e .env -e .env.local -- npm run prisma:migrate-dev -w @documenso/prisma
> @documenso/prisma@1.0.0 prisma:migrate-dev
> prisma migrate dev --skip-seed
Prisma schema loaded from schema.prisma
Datasource "db": PostgreSQL database "documenso", schema "public" at "127.0.0.1:54320"
Applying migration `20230404095503_initial_migration`
Applying migration `20230411134605_doc_208`
Applying migration `20230421134018_doc_214_add_signed_at_field`
Applying migration `20230505085625_create_subscription_table`
Applying migration `20230505085908_update_unique_constraint`
Applying migration `20230505091928_add_past_due_value`
Applying migration `20230605122017_password_reset`
Applying migration `20230605164015_expire_password_reset_token`
Applying migration `20230617040606_add_name_field`
Applying migration `20230617041623_add_email_field`
Applying migration `20230621130930_add_width_and_height_for_fields`
Applying migration `20230621131348_add_document_id_and_email_index`
Applying migration `20230621133446_migrate_field_position_to_float`
Applying migration `20230829165148_user_sharing_link`
Applying migration `20230829180915_recipient_id_for_user_id`
Applying migration `20230830053354_add_service_user`
Applying migration `20230901083000_add_user_signature_column`
Applying migration `20230907041233_add_document_data_table`
Applying migration `20230907074451_insert_old_data_into_document_data_table`
Applying migration `20230907075057_user_roles`
Applying migration `20230907080056_add_created_at_and_updated_at_columns`
Applying migration `20230907082622_remove_old_document_data`
Applying migration `20230912011344_reverse_document_data_relation`
Applying migration `20230914031347_remove_redundant_created_column`
Applying migration `20230917190854_password_reset_token`
Applying migration `20230918111438_update_subscription_constraints_and_columns`
Applying migration `20230920052232_document_meta`
Applying migration `20230920060743_update_share_link_schema`
Applying migration `20230920124941_fix_documentmeta_relation`
Applying migration `20230922121421_fix_document_meta_schema`
Applying migration `20231013012902_add_document_share_link_delete_cascade`
Applying migration `20231025074705_add_email_confirmation_registration`
Applying migration `20231028094931_add_user_timestamp_columns`
Applying migration `20231028095542_use_now_for_last_signed_in`
Applying migration `20231030055821_add_database_indexes`
Applying migration `20231031072857_verify_existing_users`
Applying migration `20231103044612_add_completed_date`
Applying migration `20231105184518_add_2fa`
Applying migration `20231123132053_public_api_api_token`
Applying migration `20231202134005_deletedocuments`
Applying migration `20231202220928_add_recipient_roles`
Applying migration `20231205000309_add_cascade_delete_for_verification_tokens`
Applying migration `20231206073509_add_multple_subscriptions`
Applying migration `20231207134820_add_document_meta_dateformat_timezone`
Applying migration `20231220124343_add_cascade_delete_user_apitoken`
Applying migration `20231221101005_add_templates`
Applying migration `20240115031508_add_password_to_document_meta`
Applying migration `20240131004516_add_user_security_audit_logs`
Applying migration `20240131132916_verify_paid_users`
Applying migration `20240205040421_add_teams`
Applying migration `20240205120648_create_delete_account`
Applying migration `20240206051948_add_teams_templates`
Applying migration `20240206111230_add_document_meta_redirect_url`
Applying migration `20240206131417_add_user_webhooks`
Applying migration `20240208135802_make_expiry_date_optional_api_tokens`
Applying migration `20240209023519_add_document_audit_logs`
Applying migration `20240220115435_add_public_profile_url_bio`
Applying migration `20240221055920_support_team_tokens`
Applying migration `20240222183156_display_banner`
Applying migration `20240222183231_banner_show`
Applying migration `20240222185936_remove_custom`
Applying migration `20240222230527_change_banner_to_site_settings_model`
Applying migration `20240222230604_add_site_banner_to_site_settings`
Applying migration `20240224085633_extend_webhook_trigger_events`
Applying migration `20240226035048_add_recipient_referential_action_for_fields`
Applying migration `20240227003622_migrate_to_cuids_for_webhooks`
Applying migration `20240227015420_add_webhook_call_table`
Applying migration `20240227023747_add_team_webhooks`
Applying migration `20240227031228_add_event_to_webhook_call_model`
Applying migration `20240227111633_rework_user_profiles`
Applying migration `20240306060259_add_passkeys`
Applying migration `20240311113243_add_document_auth`
Applying migration `20240327074701_add_secondary_verification_id`
Applying migration `20240408083413_add_form_values_column`
Applying migration `20240408142543_add_recipient_document_delete`
Applying migration `20240418140819_remove_impossible_field_optional_states`
Applying migration `20240424072655_update_foreign_key_constraints`
The following migration(s) have been applied:
migrations/
└─ 20230404095503_initial_migration/
└─ migration.sql
└─ 20230411134605_doc_208/
└─ migration.sql
└─ 20230421134018_doc_214_add_signed_at_field/
└─ migration.sql
└─ 20230505085625_create_subscription_table/
└─ migration.sql
└─ 20230505085908_update_unique_constraint/
└─ migration.sql
└─ 20230505091928_add_past_due_value/
└─ migration.sql
└─ 20230605122017_password_reset/
└─ migration.sql
└─ 20230605164015_expire_password_reset_token/
└─ migration.sql
└─ 20230617040606_add_name_field/
└─ migration.sql
└─ 20230617041623_add_email_field/
└─ migration.sql
└─ 20230621130930_add_width_and_height_for_fields/
└─ migration.sql
└─ 20230621131348_add_document_id_and_email_index/
└─ migration.sql
└─ 20230621133446_migrate_field_position_to_float/
└─ migration.sql
└─ 20230829165148_user_sharing_link/
└─ migration.sql
└─ 20230829180915_recipient_id_for_user_id/
└─ migration.sql
└─ 20230830053354_add_service_user/
└─ migration.sql
└─ 20230901083000_add_user_signature_column/
└─ migration.sql
└─ 20230907041233_add_document_data_table/
└─ migration.sql
└─ 20230907074451_insert_old_data_into_document_data_table/
└─ migration.sql
└─ 20230907075057_user_roles/
└─ migration.sql
└─ 20230907080056_add_created_at_and_updated_at_columns/
└─ migration.sql
└─ 20230907082622_remove_old_document_data/
└─ migration.sql
└─ 20230912011344_reverse_document_data_relation/
└─ migration.sql
└─ 20230914031347_remove_redundant_created_column/
└─ migration.sql
└─ 20230917190854_password_reset_token/
└─ migration.sql
└─ 20230918111438_update_subscription_constraints_and_columns/
└─ migration.sql
└─ 20230920052232_document_meta/
└─ migration.sql
└─ 20230920060743_update_share_link_schema/
└─ migration.sql
└─ 20230920124941_fix_documentmeta_relation/
└─ migration.sql
└─ 20230922121421_fix_document_meta_schema/
└─ migration.sql
└─ 20231013012902_add_document_share_link_delete_cascade/
└─ migration.sql
└─ 20231025074705_add_email_confirmation_registration/
└─ migration.sql
└─ 20231028094931_add_user_timestamp_columns/
└─ migration.sql
└─ 20231028095542_use_now_for_last_signed_in/
└─ migration.sql
└─ 20231030055821_add_database_indexes/
└─ migration.sql
└─ 20231031072857_verify_existing_users/
└─ migration.sql
└─ 20231103044612_add_completed_date/
└─ migration.sql
└─ 20231105184518_add_2fa/
└─ migration.sql
└─ 20231123132053_public_api_api_token/
└─ migration.sql
└─ 20231202134005_deletedocuments/
└─ migration.sql
└─ 20231202220928_add_recipient_roles/
└─ migration.sql
└─ 20231205000309_add_cascade_delete_for_verification_tokens/
└─ migration.sql
└─ 20231206073509_add_multple_subscriptions/
└─ migration.sql
└─ 20231207134820_add_document_meta_dateformat_timezone/
└─ migration.sql
└─ 20231220124343_add_cascade_delete_user_apitoken/
└─ migration.sql
└─ 20231221101005_add_templates/
└─ migration.sql
└─ 20240115031508_add_password_to_document_meta/
└─ migration.sql
└─ 20240131004516_add_user_security_audit_logs/
└─ migration.sql
└─ 20240131132916_verify_paid_users/
└─ migration.sql
└─ 20240205040421_add_teams/
└─ migration.sql
└─ 20240205120648_create_delete_account/
└─ migration.sql
└─ 20240206051948_add_teams_templates/
└─ migration.sql
└─ 20240206111230_add_document_meta_redirect_url/
└─ migration.sql
└─ 20240206131417_add_user_webhooks/
└─ migration.sql
└─ 20240208135802_make_expiry_date_optional_api_tokens/
└─ migration.sql
└─ 20240209023519_add_document_audit_logs/
└─ migration.sql
└─ 20240220115435_add_public_profile_url_bio/
└─ migration.sql
└─ 20240221055920_support_team_tokens/
└─ migration.sql
└─ 20240222183156_display_banner/
└─ migration.sql
└─ 20240222183231_banner_show/
└─ migration.sql
└─ 20240222185936_remove_custom/
└─ migration.sql
└─ 20240222230527_change_banner_to_site_settings_model/
└─ migration.sql
└─ 20240222230604_add_site_banner_to_site_settings/
└─ migration.sql
└─ 20240224085633_extend_webhook_trigger_events/
└─ migration.sql
└─ 20240226035048_add_recipient_referential_action_for_fields/
└─ migration.sql
└─ 20240227003622_migrate_to_cuids_for_webhooks/
└─ migration.sql
└─ 20240227015420_add_webhook_call_table/
└─ migration.sql
└─ 20240227023747_add_team_webhooks/
└─ migration.sql
└─ 20240227031228_add_event_to_webhook_call_model/
└─ migration.sql
└─ 20240227111633_rework_user_profiles/
└─ migration.sql
└─ 20240306060259_add_passkeys/
└─ migration.sql
└─ 20240311113243_add_document_auth/
└─ migration.sql
└─ 20240327074701_add_secondary_verification_id/
└─ migration.sql
└─ 20240408083413_add_form_values_column/
└─ migration.sql
└─ 20240408142543_add_recipient_document_delete/
└─ migration.sql
└─ 20240418140819_remove_impossible_field_optional_states/
└─ migration.sql
└─ 20240424072655_update_foreign_key_constraints/
└─ migration.sql
Your database is now in sync with your schema.
✔ Generated Prisma Client (v5.4.2) to ./../../node_modules/@prisma/client in 433ms
> prisma:seed
> npm run with:env -- npm run prisma:seed -w @documenso/prisma
> with:env
> dotenv -e .env -e .env.local -- npm run prisma:seed -w @documenso/prisma
> @documenso/prisma@1.0.0 prisma:seed
> prisma db seed
Running seed command `ts-node --transpileOnly --project ./tsconfig.seed.json ./seed-database.ts` ...
[SEEDING]: initial-seed.ts
Database seeded
🌱 The seed command has been executed.
┌─────────────────────────────────────────────────────────┐
│ Update available 5.4.2 -> 5.14.0 │
│ Run the following to update │
│ npm i --save-dev prisma@latest │
│ npm i @prisma/client@latest │
└─────────────────────────────────────────────────────────┘
> dev
> turbo run dev --filter=@documenso/web --filter=@documenso/marketing
Turborepo did not find the correct binary for your platform.
We will attempt to install it now.
Installation has succeeded.
• Packages in scope: @documenso/marketing, @documenso/web
• Running dev in 2 packages
• Remote caching disabled
@documenso/marketing:dev: cache bypass, force executing 8e2b04584367b8ee
@documenso/web:dev: cache bypass, force executing 62825fff83b7cfc4
@documenso/marketing:dev:
@documenso/marketing:dev: > @documenso/marketing@1.2.3 dev
@documenso/marketing:dev: > next dev -p 3001
@documenso/marketing:dev:
@documenso/web:dev:
@documenso/web:dev: > @documenso/web@1.2.3 dev
@documenso/web:dev: > next dev -p 3000
@documenso/web:dev:
@documenso/web:dev: ▲ Next.js 14.0.3
@documenso/web:dev: - Local: http://localhost:3000
@documenso/web:dev: - Experiments (use at your own risk):
@documenso/web:dev: · outputFileTracingRoot
@documenso/web:dev:
@documenso/marketing:dev: ▲ Next.js 14.0.3
@documenso/marketing:dev: - Local: http://localhost:3001
@documenso/marketing:dev: - Experiments (use at your own risk):
@documenso/marketing:dev: · outputFileTracingRoot
@documenso/marketing:dev:
@documenso/web:dev: Attention: Next.js now collects completely anonymous telemetry regarding usage.
@documenso/web:dev: This information is used to shape Next.js' roadmap and prioritize features.
@documenso/web:dev: You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
@documenso/web:dev: https://nextjs.org/telemetry
@documenso/web:dev:
@documenso/web:dev: ✓ Ready in 1868ms
@documenso/marketing:dev: Contentlayer config change detected. Updating type definitions and data...
@documenso/marketing:dev: ✓ Ready in 2.9s
@documenso/marketing:dev: ○ Compiling / ...
@documenso/marketing:dev: Generated 28 documents in .contentlayer
@documenso/marketing:dev: Browserslist: caniuse-lite is outdated. Please run:
@documenso/marketing:dev: npx update-browserslist-db@latest
@documenso/marketing:dev: Why you should do it regularly: https://github.com/browserslist/update-db#readme
@documenso/marketing:dev: ✓ Compiled / in 10.8s (2046 modules)
@documenso/web:dev: ○ Compiling /src/middleware ...
@documenso/web:dev: ✓ Compiled /src/middleware in 973ms (257 modules)
@documenso/web:dev: ○ Compiling /documents ...
@documenso/web:dev: Browserslist: caniuse-lite is outdated. Please run:
@documenso/web:dev: npx update-browserslist-db@latest
@documenso/web:dev: Why you should do it regularly: https://github.com/browserslist/update-db#readme
@documenso/web:dev: ✓ Compiled /documents in 17.7s (4376 modules)
@documenso/web:dev: *********************************************************************
@documenso/web:dev: *
@documenso/web:dev: *
@documenso/web:dev: Please change the encryption key from the default value of "CAFEBABE"
@documenso/web:dev: *
@documenso/web:dev: *
@documenso/web:dev: *********************************************************************
@documenso/web:dev: ○ Compiling /signin ...
@documenso/web:dev: ✓ Compiled /signin in 10.3s (4380 modules)
@documenso/web:dev: *********************************************************************
@documenso/web:dev: *
@documenso/web:dev: *
@documenso/web:dev: Please change the encryption key from the default value of "CAFEBABE"
@documenso/web:dev: *
@documenso/web:dev: *
@documenso/web:dev: *********************************************************************
```
The Open Source DocuSign Alternative.
Learn more »
Discord
·
Website
·
Issues
·
Upcoming Releases
·
Roadmap
About this project
Signing documents digitally should be fast and easy and should be the best practice for every document signed worldwide.
This is technically quite easy today, but it also introduces a new party to every signature: The signing tool providers. While this is not a problem in itself, it should make us think about how we want these providers of trust to work.
Documenso aims to be the world's most trusted document-signing tool. This trust is built by empowering you to self-host Documenso and review how it works under the hood.
Join us in creating the next generation of open trust infrastructure.
Recognition
Community and Next Steps 🎯
We're currently working on a redesign of the application, including a revamp of the codebase, so Documenso can be more intuitive to use and robust to develop upon.
- Check out the first source code release in this repository and test it.
- Tell us what you think in the Discussions.
- Join the Discord server for any questions and getting to know to other community members.
- ⭐ the repository to help us raise awareness.
- Spread the word on Twitter that Documenso is working towards a more open signing tool.
- Fix or create issues, that are needed for the first production release.
Contributing
- To contribute, please see our contribution guide.
Contact us
Contact us if you are interested in our Enterprise plan for large organizations that need extra flexibility and control.
Tech Stack
- Typescript - Language
- Next.js - Framework
- Prisma - ORM
- Tailwind - CSS
- shadcn/ui - Component Library
- NextAuth.js - Authentication
- react-email - Email Templates
- tRPC - API
- @documenso/pdf-sign - PDF Signatures
- React-PDF - Viewing PDFs
- PDF-Lib - PDF manipulation
- Stripe - Payments
- Vercel - Hosting
Local Development
Requirements
To run Documenso locally, you will need
- Node.js (v18 or above)
- Postgres SQL Database
- Docker (optional)
Developer Quickstart
Note
: This is a quickstart for developers. It assumes that you have both docker and docker-compose installed on your machine.
Want to get up and running quickly? Follow these steps:
- Fork this repository to your GitHub account.
After forking the repository, clone it to your local device by using the following command:
git clone https://github.com/<your-username>/documenso
-
Set up your
.envfile using the recommendations in the.env.examplefile. Alternatively, just runcp .env.example .envto get started with our handpicked defaults. -
Run
npm run dxin the root directory- This will spin up a postgres database and inbucket mailserver in a docker container.
-
Run
npm run devin the root directory -
Want it even faster? Just use
npm run d
Access Points for Your Application
-
App - http://localhost:3000
-
Incoming Mail Access - http://localhost:9000
-
Database Connection Details
- Port: 54320
- Connection: Use your favorite database client to connect using the provided port.
-
S3 Storage Dashboard - http://localhost:9001
Developer Setup
Manual Setup
Follow these steps to setup Documenso on your local machine:
- Fork this repository to your GitHub account.
After forking the repository, clone it to your local device by using the following command:
git clone https://github.com/<your-username>/documenso
-
Run
npm iin the root directory -
Create your
.envfrom the.env.example. You can usecp .env.example .envto get started with our handpicked defaults. -
Set the following environment variables:
- NEXTAUTH_URL
- NEXTAUTH_SECRET
- NEXT_PUBLIC_WEBAPP_URL
- NEXT_PUBLIC_MARKETING_URL
- NEXT_PRIVATE_DATABASE_URL
- NEXT_PRIVATE_DIRECT_DATABASE_URL
- NEXT_PRIVATE_SMTP_FROM_NAME
- NEXT_PRIVATE_SMTP_FROM_ADDRESS
-
Create the database schema by running
npm run prisma:migrate-dev -
Run
npm run devin the root directory to start -
Register a new user at http://localhost:3000/signup
- Optional: Seed the database using
npm run prisma:seed -w @documenso/prismato create a test user and document. - Optional: Create your own signing certificate.
- To generate your own using these steps and a Linux Terminal or Windows Subsystem for Linux (WSL), see Create your own signing certificate.
Run in Gitpod
- Click below to launch a ready-to-use Gitpod workspace in your browser.
Run in DevContainer
We support DevContainers for VSCode. Click here to get started.
Video walkthrough
If you're a visual learner and prefer to watch a video walkthrough of setting up Documenso locally, check out this video:
Docker
We provide a Docker container for Documenso, which is published on both DockerHub and GitHub Container Registry.
- DockerHub: https://hub.docker.com/r/documenso/documenso
- GitHub Container Registry: https://ghcr.io/documenso/documenso
You can pull the Docker image from either of these registries and run it with your preferred container hosting provider.
Please note that you will need to provide environment variables for connecting to the database, mailserver, and so forth.
For detailed instructions on how to configure and run the Docker container, please refer to the Docker README in the docker directory.
Self Hosting
We support a variety of deployment methods, and are actively working on adding more. Stay tuned for updates!
Please note that the below deployment methods are for v0.9, we will update these to v1.0 once it has been released.
Fetch, configure, and build
First, clone the code from Github:
git clone https://github.com/documenso/documenso.git
Then, inside the documenso folder, copy the example env file:
cp .env.example .env
The following environment variables must be set:
NEXTAUTH_URLNEXTAUTH_SECRETNEXT_PUBLIC_WEBAPP_URLNEXT_PUBLIC_MARKETING_URLNEXT_PRIVATE_DATABASE_URLNEXT_PRIVATE_DIRECT_DATABASE_URLNEXT_PRIVATE_SMTP_FROM_NAMENEXT_PRIVATE_SMTP_FROM_ADDRESS
If you are using a reverse proxy in front of Documenso, don't forget to provide the public URL for both
NEXTAUTH_URLandNEXT_PUBLIC_WEBAPP_URLvariables!
Now you can install the dependencies and build it:
npm i
npm run build:web
npm run prisma:migrate-deploy
Finally, you can start it with:
npm run start
This will start the server on localhost:3000. For now, any reverse proxy can then do the frontend and SSL termination.
If you want to run with another port than 3000, you can start the application with
next -p <ANY PORT>from theapps/webfolder.
Run as a service
You can use a systemd service file to run the app. Here is a simple example of the service running on port 3500 (using 3000 by default):
[Unit]
Description=documenso
After=network.target
[Service]
Environment=PATH=/path/to/your/node/binaries
Type=simple
User=www-data
WorkingDirectory=/var/www/documenso/apps/web
ExecStart=/usr/bin/next start -p 3500
TimeoutSec=15
Restart=always
[Install]
WantedBy=multi-user.target
Railway
Render
Koyeb
Troubleshooting
I'm not receiving any emails when using the developer quickstart.
When using the developer quickstart, an Inbucket server will be spun up in a docker container that will store all outgoing emails locally for you to view.
The Web UI can be found at http://localhost:9000, while the SMTP port will be on localhost:2500.
Support IPv6
If you are deploying to a cluster that uses only IPv6, You can use a custom command to pass a parameter to the Next.js start command
For local docker run
docker run -it documenso:latest npm run start -- -H ::
For k8s or docker-compose
containers:
- name: documenso
image: documenso:latest
imagePullPolicy: IfNotPresent
command:
- npm
args:
- run
- start
- --
- -H
- '::'
I can't see environment variables in my package scripts.
Wrap your package script with the with:env script like such:
npm run with:env -- npm run myscript
The same can be done when using npx for one of the bin scripts:
npm run with:env -- npx myscript
This will load environment variables from your .env and .env.local files.
