├── .envrc ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── 01-bug.yaml │ ├── 02-feature.yaml │ ├── 03-package-bug.yaml │ └── 04-package-request.yaml ├── pull_request_template.md └── workflows │ ├── cache-upload.yml │ ├── cli-post-release.yml │ ├── cli-release.yml │ ├── cli-tests.yaml │ ├── debug.yaml │ ├── docker-image-release.yml │ ├── stale-issue-cleanup.yml │ └── vscode-ext-release.yaml ├── .gitignore ├── .golangci.yml ├── .goreleaser.yaml ├── .schema ├── devbox-plugin.schema.json └── devbox.schema.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── cmd └── devbox │ └── main.go ├── devbox.go ├── devbox.json ├── devbox.lock ├── devbox.md ├── docs ├── .dockerignore ├── .gitignore ├── .markdownlint.yaml ├── Dockerfile ├── README.md ├── app │ ├── .envrc │ ├── .gitignore │ ├── .yarnrc.yml │ ├── babel.config.js │ ├── cloud │ │ ├── _category_.json │ │ ├── cache │ │ │ ├── authenticating.md │ │ │ ├── index.md │ │ │ ├── prebuilt_cache.md │ │ │ └── usage.md │ │ ├── dashboard │ │ │ ├── _category_.json │ │ │ ├── creating_your_team.md │ │ │ ├── index.md │ │ │ └── inviting_members.md │ │ ├── deploys │ │ │ ├── _category_.json │ │ │ ├── custom_domains.md │ │ │ ├── index.md │ │ │ ├── integrations │ │ │ │ ├── _category_.json │ │ │ │ ├── index.md │ │ │ │ ├── s3.md │ │ │ │ ├── supabase.md │ │ │ │ └── upstash.md │ │ │ ├── monitoring_deploys.md │ │ │ ├── secrets.md │ │ │ └── setup.md │ │ ├── faq.md │ │ ├── index.md │ │ ├── secrets │ │ │ ├── _category_.json │ │ │ ├── dashboard_secrets.md │ │ │ ├── index.md │ │ │ └── secrets_cli.md │ │ └── sidebar.ts │ ├── cloud_sidebars.js │ ├── devbox.json │ ├── devbox.lock │ ├── docs │ │ ├── cli_reference │ │ │ ├── _category_.json │ │ │ ├── devbox.md │ │ │ ├── devbox_add.md │ │ │ ├── devbox_cache.md │ │ │ ├── devbox_cache_configure.md │ │ │ ├── devbox_cache_info.md │ │ │ ├── devbox_cache_upload.md │ │ │ ├── devbox_completion.md │ │ │ ├── devbox_completion_bash.md │ │ │ ├── devbox_completion_fish.md │ │ │ ├── devbox_completion_zsh.md │ │ │ ├── devbox_create.md │ │ │ ├── devbox_generate.md │ │ │ ├── devbox_generate_devcontainer.md │ │ │ ├── devbox_generate_direnv.md │ │ │ ├── devbox_generate_dockerfile.md │ │ │ ├── devbox_generate_readme.md │ │ │ ├── devbox_global.md │ │ │ ├── devbox_global_add.md │ │ │ ├── devbox_global_install.md │ │ │ ├── devbox_global_list.md │ │ │ ├── devbox_global_pull.md │ │ │ ├── devbox_global_push.md │ │ │ ├── devbox_global_rm.md │ │ │ ├── devbox_global_run.md │ │ │ ├── devbox_global_services.md │ │ │ ├── devbox_global_shellenv.md │ │ │ ├── devbox_global_update.md │ │ │ ├── devbox_info.md │ │ │ ├── devbox_init.md │ │ │ ├── devbox_install.md │ │ │ ├── devbox_rm.md │ │ │ ├── devbox_run.md │ │ │ ├── devbox_search.md │ │ │ ├── devbox_secrets.md │ │ │ ├── devbox_secrets_download.md │ │ │ ├── devbox_secrets_init.md │ │ │ ├── devbox_secrets_list.md │ │ │ ├── devbox_secrets_rm.md │ │ │ ├── devbox_secrets_set.md │ │ │ ├── devbox_secrets_upload.md │ │ │ ├── devbox_services.md │ │ │ ├── devbox_services_attach.md │ │ │ ├── devbox_services_ls.md │ │ │ ├── devbox_services_restart.md │ │ │ ├── devbox_services_start.md │ │ │ ├── devbox_services_stop.md │ │ │ ├── devbox_services_up.md │ │ │ ├── devbox_shell.md │ │ │ ├── devbox_shellenv.md │ │ │ ├── devbox_update.md │ │ │ ├── devbox_version.md │ │ │ └── devbox_version_update.md │ │ ├── configuration.md │ │ ├── continuous_integration │ │ │ └── github_action.md │ │ ├── contributor-quickstart.md │ │ ├── devbox_examples │ │ │ ├── databases │ │ │ │ ├── mariadb.md │ │ │ │ ├── mongodb.md │ │ │ │ ├── mysql.md │ │ │ │ ├── postgres.md │ │ │ │ ├── rabbitmq.md │ │ │ │ ├── redis.md │ │ │ │ └── valkey.md │ │ │ ├── index.md │ │ │ ├── languages │ │ │ │ ├── csharp.md │ │ │ │ ├── elixir.md │ │ │ │ ├── fsharp.md │ │ │ │ ├── go.md │ │ │ │ ├── haskell.md │ │ │ │ ├── java.md │ │ │ │ ├── nim.md │ │ │ │ ├── nodejs.md │ │ │ │ ├── php.md │ │ │ │ ├── python.md │ │ │ │ ├── ruby.md │ │ │ │ ├── rust.md │ │ │ │ └── zig.md │ │ │ ├── servers │ │ │ │ ├── apache.md │ │ │ │ ├── caddy.md │ │ │ │ └── nginx.md │ │ │ └── stacks │ │ │ │ ├── django.md │ │ │ │ ├── drupal.md │ │ │ │ ├── jekyll.md │ │ │ │ ├── lapp.md │ │ │ │ ├── laravel.md │ │ │ │ ├── lepp.md │ │ │ │ ├── rails.md │ │ │ │ └── spring.md │ │ ├── devbox_global.md │ │ ├── env_variables.md │ │ ├── faq.md │ │ ├── guides │ │ │ ├── creating_plugins.md │ │ │ ├── pinning_packages.md │ │ │ ├── platform_specific_packages.md │ │ │ ├── plugins.md │ │ │ ├── scripts.md │ │ │ ├── secrets.md │ │ │ ├── services.md │ │ │ └── using_flakes.md │ │ ├── ide_configuration │ │ │ ├── direnv.md │ │ │ ├── eclipse.md │ │ │ ├── vscode.md │ │ │ └── zed.md │ │ ├── index.md │ │ ├── installing_devbox.mdx │ │ ├── quickstart.mdx │ │ └── telemetry.md │ ├── docusaurus.config.js │ ├── nixhub │ │ ├── get-a-package.api.mdx │ │ ├── index.mdx │ │ ├── resolve-a-package-version.api.mdx │ │ ├── search-packages.api.mdx │ │ └── sidebar.ts │ ├── nixhub_sidebars.js │ ├── package.json │ ├── pnpm-lock.yaml │ ├── sidebars.js │ ├── specs │ │ └── nixhub.yaml │ ├── src │ │ ├── css │ │ │ └── custom.css │ │ └── pages │ │ │ └── index.module.css │ ├── static │ │ ├── .nojekyll │ │ └── img │ │ │ ├── active_member.png │ │ │ ├── auth_page.png │ │ │ ├── build-logs.jpeg │ │ │ ├── cloud.svg │ │ │ ├── connection_parameters.png │ │ │ ├── create-project.png │ │ │ ├── create_team_form.png │ │ │ ├── custom-domain-issued.png │ │ │ ├── custom-domain-unknown.png │ │ │ ├── custom-domain.png │ │ │ ├── dashboard_create_new_devspace.png │ │ │ ├── delete_member.png │ │ │ ├── deploy-in-progress.png │ │ │ ├── deploy-success.png │ │ │ ├── devbox_cloud_browser.png │ │ │ ├── devbox_cloud_editor.png │ │ │ ├── devbox_docs_logo_dark.svg │ │ │ ├── devbox_docs_logo_light.svg │ │ │ ├── devbox_global.svg │ │ │ ├── devbox_logo_dark.svg │ │ │ ├── devbox_logo_light.svg │ │ │ ├── devbox_sh.png │ │ │ ├── devbox_symbol_dark.svg │ │ │ ├── devbox_symbol_light.svg │ │ │ ├── discord.svg │ │ │ ├── eclipse_background_2.png │ │ │ ├── edit_secrets.png │ │ │ ├── enable-deployments.jpeg │ │ │ ├── favicon.ico │ │ │ ├── github-dark.svg │ │ │ ├── github-light.svg │ │ │ ├── invited_member.png │ │ │ ├── inviting_member.png │ │ │ ├── jetify-docs-logo-dark.svg │ │ │ ├── jetify-docs-logo-light.svg │ │ │ ├── jetify-social-card.png │ │ │ ├── jetify_auth.jpeg │ │ │ ├── jetify_cloud_dashboard.jpeg │ │ │ ├── jetpack_docs_logo_dark.svg │ │ │ ├── jetpack_docs_logo_light.svg │ │ │ ├── jetpack_logo_dark.svg │ │ │ ├── jetpack_logo_light.svg │ │ │ ├── members_tab.png │ │ │ ├── newproject-tworepos.png │ │ │ ├── newproject.png │ │ │ ├── nix-term-dark.svg │ │ │ ├── nix-term-light.svg │ │ │ ├── nix_snowflake_dark.svg │ │ │ ├── nix_snowflake_light.svg │ │ │ ├── open-in-devspace.svg │ │ │ ├── open_in_devbox.svg │ │ │ ├── postgres-secrets.png │ │ │ ├── process-compose-tui.png │ │ │ ├── project-page.png │ │ │ ├── runtime-logs.png │ │ │ ├── s3-secrets.png │ │ │ ├── secrets.gif │ │ │ ├── secrets_tab.png │ │ │ ├── shield_galaxy.svg │ │ │ ├── shield_moon.svg │ │ │ ├── shield_white.svg │ │ │ ├── supabase-API.png │ │ │ ├── supabase-secrets.png │ │ │ ├── team_selector.png │ │ │ ├── upstash-secrets.png │ │ │ └── upstash.png │ ├── tsconfig.json │ └── vercel.json ├── launchpad.yaml ├── nginx.conf └── translation │ ├── README-ko-KR.md │ └── README-zh-CN.md ├── examples ├── .gitignore ├── README.md ├── cloud_development │ ├── argo-workflows │ │ ├── README.md │ │ ├── argo-patch.sh │ │ ├── devbox.json │ │ └── devbox.lock │ ├── maelstrom │ │ ├── README.md │ │ ├── devbox.json │ │ └── devbox.lock │ ├── minikube │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── home │ │ │ └── .gitignore │ └── temporal │ │ ├── .envrc │ │ ├── .gitignore │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── hello │ │ ├── .gitignore │ │ ├── __init__.py │ │ ├── hello_activity.py │ │ └── hello_cron.py │ │ ├── requirements.txt │ │ ├── tests │ │ └── __init__.py │ │ └── venvShellHook.sh ├── data_science │ ├── R │ │ ├── .gitignore │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── src │ │ │ └── examplePlot.R │ ├── README.md │ ├── jupyter │ │ ├── .envrc │ │ ├── .pdm.toml │ │ ├── __pypackages__ │ │ │ └── .gitignore │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── main.py │ │ ├── pdm.lock │ │ └── pyproject.toml │ ├── llama │ │ ├── README.md │ │ ├── devbox.json │ │ └── devbox.lock │ ├── pytorch │ │ ├── basic-example │ │ │ ├── README.md │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── main.py │ │ │ ├── poetry.lock │ │ │ └── pyproject.toml │ │ └── gradio │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── class_names.txt │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── pytorch_model.bin │ │ │ ├── requirements.txt │ │ │ └── run.py │ └── tensorflow │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── main.py │ │ └── requirements.txt ├── databases │ ├── mariadb │ │ ├── .gitignore │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── setup_db.sql │ ├── mysql │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── setup_db.sql │ ├── postgres │ │ ├── .gitignore │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── setup_postgres_db.sql │ ├── redis │ │ ├── README.md │ │ ├── devbox.d │ │ │ └── redis │ │ │ │ └── redis.conf │ │ ├── devbox.json │ │ └── devbox.lock │ └── valkey │ │ ├── README.md │ │ ├── devbox.d │ │ └── valkey │ │ │ └── valkey.conf │ │ ├── devbox.json │ │ └── devbox.lock ├── development │ ├── bun │ │ ├── .gitignore │ │ ├── README.md │ │ ├── bun.lockb │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── index.test.ts │ │ ├── index.ts │ │ ├── package.json │ │ └── tsconfig.json │ ├── csharp │ │ └── hello-world │ │ │ ├── .gitignore │ │ │ ├── Program.cs │ │ │ ├── README.md │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ └── hello-world.csproj │ ├── elixir │ │ └── elixir_hello │ │ │ ├── .formatter.exs │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── lib │ │ │ ├── elixir_hello.ex │ │ │ └── kv.exs │ │ │ ├── mix.exs │ │ │ ├── mix.lock │ │ │ └── test │ │ │ ├── elixir_hello_test.exs │ │ │ └── test_helper.exs │ ├── fsharp │ │ └── hello-world │ │ │ ├── .gitignore │ │ │ ├── Program.fs │ │ │ ├── README.md │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ └── hello-world.fsproj │ ├── go │ │ └── hello-world │ │ │ ├── .envrc │ │ │ ├── README.md │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── go.mod │ │ │ └── main.go │ ├── haskell │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── my-project │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── Setup.hs │ │ │ ├── app │ │ │ └── Main.hs │ │ │ ├── my-project.cabal │ │ │ ├── package.yaml │ │ │ ├── src │ │ │ └── Lib.hs │ │ │ ├── stack.yaml │ │ │ ├── stack.yaml.lock │ │ │ └── test │ │ │ └── Spec.hs │ ├── java │ │ ├── README.md │ │ ├── gradle │ │ │ ├── .gitignore │ │ │ └── hello-world │ │ │ │ ├── README.md │ │ │ │ ├── build.gradle │ │ │ │ ├── devbox.json │ │ │ │ ├── devbox.lock │ │ │ │ ├── gradlew │ │ │ │ ├── settings.gradle │ │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── hello │ │ │ │ └── HelloWorld.java │ │ └── maven │ │ │ ├── .gitignore │ │ │ └── hello-world │ │ │ ├── README.md │ │ │ ├── devbox-maven-app │ │ │ └── pom.xml │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── pom.xml │ │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── devbox │ │ │ │ └── mavenapp │ │ │ │ └── App.java │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── devbox │ │ │ └── mavenapp │ │ │ └── AppTest.java │ ├── nim │ │ └── spinnytest │ │ │ ├── README.md │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── spinnytest │ │ │ ├── spinnytest.nim │ │ │ └── spinnytest.nimble │ ├── nodejs │ │ ├── .gitignore │ │ ├── nodejs-npm │ │ │ ├── README.md │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── index.js │ │ │ ├── package-lock.json │ │ │ └── package.json │ │ ├── nodejs-pnpm │ │ │ ├── README.md │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── pnpm-lock.yaml │ │ ├── nodejs-typescript │ │ │ ├── .gitignore │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── index.js │ │ │ ├── index.ts │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── tsconfig.json │ │ │ └── yarn.lock │ │ └── nodejs-yarn │ │ │ ├── .yarnrc.yml │ │ │ ├── README.md │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── yarn.lock │ ├── php │ │ ├── latest │ │ │ ├── .envrc │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── composer.json │ │ │ ├── composer.lock │ │ │ ├── devbox.d │ │ │ │ └── php │ │ │ │ │ ├── php-fpm.conf │ │ │ │ │ └── php.ini │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ └── public │ │ │ │ └── index.php │ │ └── php8.1 │ ├── python │ │ ├── pip │ │ │ ├── .envrc │ │ │ ├── README.md │ │ │ ├── devbox.d │ │ │ │ └── python310Packages.pip │ │ │ │ │ └── venvShellHook.sh │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── main.py │ │ │ └── requirements.txt │ │ ├── pipenv │ │ │ ├── Pipfile │ │ │ ├── Pipfile.lock │ │ │ ├── README.md │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── main.py │ │ │ ├── requirements.txt │ │ │ └── yarn.lock │ │ └── poetry │ │ │ ├── poetry-demo │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── poetry.lock │ │ │ ├── poetry_demo │ │ │ │ ├── __init__.py │ │ │ │ └── __main__.py │ │ │ ├── pyproject.toml │ │ │ └── tests │ │ │ │ ├── __init__.py │ │ │ │ └── test_poetry_demo.py │ │ │ └── poetry-pyproject-subdir │ │ │ ├── README.md │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ ├── frontend │ │ │ └── .empty │ │ │ └── service │ │ │ ├── poetry.lock │ │ │ ├── pyproject.toml │ │ │ └── test_with_pytest.py │ ├── ruby │ │ ├── .envrc │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── hello.rb │ ├── rust │ │ ├── README.md │ │ └── rust-stable-hello-world │ │ │ ├── .gitignore │ │ │ ├── Cargo.lock │ │ │ ├── Cargo.toml │ │ │ ├── conf │ │ │ └── set-env.sh │ │ │ ├── devbox.json │ │ │ ├── devbox.lock │ │ │ └── src │ │ │ └── main.rs │ └── zig │ │ ├── README.md │ │ └── zig-hello-world │ │ ├── .gitignore │ │ ├── build.zig │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── src │ │ └── main.zig ├── flakes │ ├── README.md │ ├── go-mod │ │ ├── .gitignore │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── ory-cli │ │ │ ├── flake.lock │ │ │ └── flake.nix │ ├── overlay │ │ ├── .nvmrc │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── package.json │ │ ├── yarn-overlay │ │ │ ├── flake.lock │ │ │ └── flake.nix │ │ └── yarn.lock │ ├── php-extension │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── my-php-flake │ │ │ ├── flake.lock │ │ │ ├── flake.nix │ │ │ └── skeleton.so │ ├── php │ │ ├── README.md │ │ ├── devbox.d │ │ │ └── php │ │ │ │ ├── php-fpm.conf │ │ │ │ └── php.ini │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── my-php-flake │ │ │ ├── flake.lock │ │ │ └── flake.nix │ └── remote │ │ ├── devbox.json │ │ └── devbox.lock ├── insecure │ ├── devbox.json │ └── devbox.lock ├── plugins │ ├── builtin │ │ ├── devbox.d │ │ │ └── php82 │ │ │ │ ├── php-fpm.conf │ │ │ │ └── php.ini │ │ ├── devbox.json │ │ └── devbox.lock │ ├── github-with-revision │ │ ├── devbox.d │ │ │ └── jetpack-io-devbox-plugin-example │ │ │ │ └── some-file.txt │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── test.sh │ ├── github │ │ ├── devbox.d │ │ │ ├── jetify-com.devbox-plugin-example.my-github-plugin │ │ │ │ └── some-file.txt │ │ │ └── jetpack-io-devbox-plugin-example │ │ │ │ └── some-file.txt │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── test.sh │ ├── local │ │ ├── README.md │ │ ├── devbox.d │ │ │ └── my-plugin │ │ │ │ └── some-file.txt │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── my-plugin │ │ │ ├── plugin.json │ │ │ ├── process-compose.yaml │ │ │ └── some-file.txt │ │ └── test.sh │ ├── v2-github │ │ ├── devbox.d │ │ │ └── jetpack-io-devbox-plugin-example │ │ │ │ └── some-file.txt │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── test.sh │ └── v2-local │ │ ├── devbox.d │ │ └── plugin1 │ │ │ └── foo.txt │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── plugin1 │ │ ├── foo.txt │ │ ├── plugin.json │ │ ├── plugin1a │ │ │ └── plugin.json │ │ └── process-compose.yaml │ │ ├── plugin2 │ │ ├── plugin.json │ │ └── process-compose.yaml │ │ └── plugin3 │ │ └── plugin.json ├── servers │ ├── apache │ │ ├── .gitignore │ │ ├── README.md │ │ ├── devbox.d │ │ │ ├── apacheHttpd │ │ │ │ └── httpd.conf │ │ │ └── web │ │ │ │ └── index.html │ │ ├── devbox.json │ │ └── devbox.lock │ ├── caddy │ │ ├── README.md │ │ ├── devbox.d │ │ │ ├── caddy │ │ │ │ └── Caddyfile │ │ │ └── web │ │ │ │ └── index.html │ │ ├── devbox.json │ │ └── devbox.lock │ └── nginx │ │ ├── .envrc │ │ ├── .gitignore │ │ ├── README.md │ │ ├── devbox.d │ │ ├── nginx │ │ │ ├── fastcgi.conf │ │ │ ├── nginx.conf │ │ │ └── nginx.template │ │ └── web │ │ │ └── index.html │ │ ├── devbox.json │ │ └── devbox.lock ├── stacks │ ├── django │ │ ├── .gitignore │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── process-compose.yml │ │ ├── requirements.txt │ │ └── todo_project │ │ │ ├── manage.py │ │ │ ├── todo_app │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates │ │ │ │ └── todo_app │ │ │ │ │ ├── create_todo.html │ │ │ │ │ └── todo_list.html │ │ │ ├── tests.py │ │ │ └── views.py │ │ │ └── todo_project │ │ │ ├── __init__.py │ │ │ ├── asgi.py │ │ │ ├── settings.py │ │ │ ├── urls.py │ │ │ └── wsgi.py │ ├── drupal │ │ ├── .editorconfig │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── README.md │ │ ├── composer.json │ │ ├── composer.lock │ │ ├── devbox.d │ │ │ ├── .gitignore │ │ │ ├── nginx │ │ │ │ ├── fastcgi.conf │ │ │ │ ├── mime.conf │ │ │ │ ├── nginx.conf │ │ │ │ └── nginx.template │ │ │ ├── php │ │ │ │ ├── php-fpm.conf │ │ │ │ └── php.ini │ │ │ └── web │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── install-drupal.sh │ │ ├── setup_db.sql │ │ └── web │ │ │ ├── .csslintrc │ │ │ ├── .eslintignore │ │ │ ├── .eslintrc.json │ │ │ ├── .gitignore │ │ │ ├── .ht.router.php │ │ │ ├── .htaccess │ │ │ ├── INSTALL.txt │ │ │ ├── README.md │ │ │ ├── example.gitignore │ │ │ ├── index.html │ │ │ ├── index.php │ │ │ ├── modules │ │ │ └── README.txt │ │ │ ├── profiles │ │ │ └── README.txt │ │ │ ├── robots.txt │ │ │ ├── sites │ │ │ ├── README.txt │ │ │ ├── default │ │ │ │ ├── default.services.yml │ │ │ │ └── default.settings.php │ │ │ ├── development.services.yml │ │ │ ├── example.settings.local.php │ │ │ └── example.sites.php │ │ │ ├── themes │ │ │ └── README.txt │ │ │ ├── update.php │ │ │ └── web.config │ ├── jekyll │ │ ├── .envrc │ │ ├── README.md │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── myblog │ │ │ ├── .bundle │ │ │ │ └── config │ │ │ ├── .gitignore │ │ │ ├── 404.html │ │ │ ├── Gemfile │ │ │ ├── Gemfile.lock │ │ │ ├── _config.yml │ │ │ ├── _posts │ │ │ │ └── 2023-01-15-welcome-to-jekyll.markdown │ │ │ ├── about.md │ │ │ └── index.md │ │ └── process-compose.yml │ ├── lapp-stack │ │ ├── .gitignore │ │ ├── .testrc │ │ ├── README.md │ │ ├── devbox.d │ │ │ ├── apache │ │ │ │ └── httpd.conf │ │ │ ├── php │ │ │ │ ├── php-fpm.conf │ │ │ │ └── php.ini │ │ │ └── web │ │ │ │ └── index.html │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── my_app │ │ │ ├── config.php │ │ │ ├── index.php │ │ │ └── info.php │ │ └── setup_postgres_db.sql │ ├── laravel │ │ ├── README.md │ │ ├── devbox.d │ │ │ ├── php │ │ │ │ ├── php-fpm.conf │ │ │ │ └── php.ini │ │ │ └── redis │ │ │ │ └── redis.conf │ │ ├── devbox.json │ │ └── devbox.lock │ ├── lepp-stack │ │ ├── .gitignore │ │ ├── README.md │ │ ├── devbox.d │ │ │ ├── nginx │ │ │ │ ├── fastcgi.conf │ │ │ │ ├── nginx.conf │ │ │ │ └── nginx.template │ │ │ ├── php │ │ │ │ ├── php-fpm.conf │ │ │ │ └── php.ini │ │ │ └── web │ │ │ │ └── index.html │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── my_app │ │ │ ├── config.php │ │ │ ├── index.php │ │ │ └── info.php │ │ └── setup_postgres_db.sql │ ├── rails │ │ ├── .ruby-version │ │ ├── README.md │ │ ├── blog │ │ │ ├── .gitignore │ │ │ ├── .ruby-version │ │ │ ├── Gemfile │ │ │ ├── Gemfile.lock │ │ │ ├── Rakefile │ │ │ ├── app │ │ │ │ ├── assets │ │ │ │ │ ├── config │ │ │ │ │ │ └── manifest.js │ │ │ │ │ ├── images │ │ │ │ │ │ └── .keep │ │ │ │ │ └── stylesheets │ │ │ │ │ │ └── application.css │ │ │ │ ├── channels │ │ │ │ │ └── application_cable │ │ │ │ │ │ ├── channel.rb │ │ │ │ │ │ └── connection.rb │ │ │ │ ├── controllers │ │ │ │ │ ├── application_controller.rb │ │ │ │ │ └── concerns │ │ │ │ │ │ └── .keep │ │ │ │ ├── helpers │ │ │ │ │ └── application_helper.rb │ │ │ │ ├── jobs │ │ │ │ │ └── application_job.rb │ │ │ │ ├── mailers │ │ │ │ │ └── application_mailer.rb │ │ │ │ ├── models │ │ │ │ │ ├── application_record.rb │ │ │ │ │ └── concerns │ │ │ │ │ │ └── .keep │ │ │ │ └── views │ │ │ │ │ └── layouts │ │ │ │ │ ├── application.html.erb │ │ │ │ │ ├── mailer.html.erb │ │ │ │ │ └── mailer.text.erb │ │ │ ├── bin │ │ │ │ ├── bundle │ │ │ │ ├── rails │ │ │ │ ├── rake │ │ │ │ └── setup │ │ │ ├── config.ru │ │ │ ├── config │ │ │ │ ├── application.rb │ │ │ │ ├── boot.rb │ │ │ │ ├── cable.yml │ │ │ │ ├── credentials.yml.enc │ │ │ │ ├── database.yml │ │ │ │ ├── environment.rb │ │ │ │ ├── environments │ │ │ │ │ ├── development.rb │ │ │ │ │ ├── production.rb │ │ │ │ │ └── test.rb │ │ │ │ ├── initializers │ │ │ │ │ ├── assets.rb │ │ │ │ │ ├── content_security_policy.rb │ │ │ │ │ ├── filter_parameter_logging.rb │ │ │ │ │ ├── inflections.rb │ │ │ │ │ └── permissions_policy.rb │ │ │ │ ├── locales │ │ │ │ │ └── en.yml │ │ │ │ ├── puma.rb │ │ │ │ ├── routes.rb │ │ │ │ └── storage.yml │ │ │ ├── db │ │ │ │ ├── schema.rb │ │ │ │ └── seeds.rb │ │ │ ├── lib │ │ │ │ ├── assets │ │ │ │ │ └── .keep │ │ │ │ └── tasks │ │ │ │ │ └── .keep │ │ │ ├── log │ │ │ │ └── .keep │ │ │ ├── public │ │ │ │ ├── 404.html │ │ │ │ ├── 422.html │ │ │ │ ├── 500.html │ │ │ │ ├── apple-touch-icon-precomposed.png │ │ │ │ ├── apple-touch-icon.png │ │ │ │ ├── favicon.ico │ │ │ │ └── robots.txt │ │ │ ├── storage │ │ │ │ └── .keep │ │ │ ├── test │ │ │ │ ├── application_system_test_case.rb │ │ │ │ ├── channels │ │ │ │ │ └── application_cable │ │ │ │ │ │ └── connection_test.rb │ │ │ │ ├── controllers │ │ │ │ │ └── .keep │ │ │ │ ├── fixtures │ │ │ │ │ └── files │ │ │ │ │ │ └── .keep │ │ │ │ ├── helpers │ │ │ │ │ └── .keep │ │ │ │ ├── integration │ │ │ │ │ └── .keep │ │ │ │ ├── mailers │ │ │ │ │ └── .keep │ │ │ │ ├── models │ │ │ │ │ └── .keep │ │ │ │ ├── system │ │ │ │ │ └── .keep │ │ │ │ └── test_helper.rb │ │ │ ├── tmp │ │ │ │ ├── .keep │ │ │ │ ├── pids │ │ │ │ │ └── .keep │ │ │ │ └── storage │ │ │ │ │ └── .keep │ │ │ └── vendor │ │ │ │ └── .keep │ │ ├── devbox.json │ │ ├── devbox.lock │ │ └── process-compose.yml │ └── spring │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.gradle │ │ ├── devbox.json │ │ ├── devbox.lock │ │ ├── gradle.properties │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── settings.gradle │ │ ├── setup_db.sql │ │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── devbox │ │ │ │ └── example │ │ │ │ └── spring │ │ │ │ └── spring │ │ │ │ ├── Application.java │ │ │ │ ├── MainController.java │ │ │ │ ├── User.java │ │ │ │ └── UserRepository.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── devbox │ │ └── example │ │ └── spring │ │ └── spring │ │ └── ApplicationTests.java └── tutorial │ ├── README.md │ ├── devbox.json │ └── devbox.lock ├── flake.lock ├── flake.nix ├── go.mod ├── go.sum ├── internal ├── boxcli │ ├── add.go │ ├── args.go │ ├── auth.go │ ├── cache.go │ ├── config.go │ ├── create.go │ ├── env.go │ ├── featureflag │ │ ├── auth.go │ │ ├── feature.go │ │ ├── feature_test.go │ │ ├── impure_print_dev_env.go │ │ ├── resolvev2.go │ │ ├── script_exit_on_error.go │ │ └── tidywarning.go │ ├── gen-docs.go │ ├── generate.go │ ├── global.go │ ├── info.go │ ├── init.go │ ├── install.go │ ├── integrate.go │ ├── list.go │ ├── log.go │ ├── midcobra │ │ ├── debug.go │ │ ├── midcobra.go │ │ ├── telemetry.go │ │ ├── telemetry_test.go │ │ └── trace.go │ ├── multi │ │ ├── multi.go │ │ └── sync.go │ ├── patch.go │ ├── path.go │ ├── pull.go │ ├── push.go │ ├── rm.go │ ├── root.go │ ├── run.go │ ├── search.go │ ├── secrets.go │ ├── services.go │ ├── setup.go │ ├── shell.go │ ├── shellenv.go │ ├── update.go │ ├── usererr │ │ ├── exiterr.go │ │ └── usererr.go │ └── version.go ├── build │ └── build.go ├── cachehash │ ├── hash.go │ └── hash_test.go ├── cmdutil │ ├── cmdutil.go │ └── exec.go ├── conf │ ├── doc.go │ └── env.go ├── cuecfg │ ├── cuecfg.go │ ├── doc.go │ ├── json.go │ ├── toml.go │ ├── xml.go │ └── yaml.go ├── debug │ ├── debug.go │ └── time.go ├── devbox │ ├── cache.go │ ├── devbox.go │ ├── devbox_test.go │ ├── devopt │ │ └── devboxopts.go │ ├── docgen │ │ ├── docgen.go │ │ └── readme.tmpl │ ├── envpath │ │ ├── pathlists.go │ │ ├── pathlists_test.go │ │ ├── stack.go │ │ └── stack_test.go │ ├── envvars.go │ ├── errors.go │ ├── flakes.go │ ├── generate │ │ ├── devcontainer_util.go │ │ └── tmpl │ │ │ ├── DevboxImageDockerfile │ │ │ ├── DevboxImageDockerfileRootUser │ │ │ ├── Dockerfile.dockerignore.tmpl │ │ │ ├── dev.Dockerfile.tmpl │ │ │ ├── envrc.tmpl │ │ │ ├── envrcContent.tmpl │ │ │ └── prod.Dockerfile.tmpl │ ├── global.go │ ├── nixprofile.go │ ├── packages.go │ ├── providers │ │ ├── identity │ │ │ └── identity.go │ │ └── nixcache │ │ │ ├── nixcache.go │ │ │ └── setup.go │ ├── pure_shell.go │ ├── pushpull.go │ ├── refresh.go │ ├── secrets.go │ ├── services.go │ ├── shell.go │ ├── shell_test.go │ ├── shellcmd │ │ ├── command.go │ │ └── command_test.go │ ├── shellrc.tmpl │ ├── shellrc_fish.tmpl │ ├── testdata │ │ └── shellrc │ │ │ ├── basic │ │ │ ├── env │ │ │ ├── shellrc │ │ │ └── shellrc.golden │ │ │ └── noshellrc │ │ │ └── shellrc.golden │ ├── update.go │ ├── update_test.go │ └── util.go ├── devconfig │ ├── config.go │ ├── config_test.go │ ├── configfile │ │ ├── ast.go │ │ ├── env.go │ │ ├── field.go │ │ ├── file.go │ │ ├── file_test.go │ │ ├── packages.go │ │ ├── packages_test.go │ │ └── scripts.go │ └── init.go ├── devpkg │ ├── narinfo_cache.go │ ├── outputs.go │ ├── package.go │ ├── package_test.go │ ├── pkgtype │ │ ├── flake.go │ │ └── runx.go │ └── validation.go ├── envir │ ├── env.go │ └── util.go ├── fileutil │ ├── dir.go │ ├── fileutil.go │ └── untar.go ├── goutil │ ├── goutil.go │ └── sync.go ├── lock │ ├── interfaces.go │ ├── lockfile.go │ ├── package.go │ ├── resolve.go │ └── statehash.go ├── nix │ ├── build.go │ ├── cache.go │ ├── command.go │ ├── config.go │ ├── config_test.go │ ├── doc.go │ ├── eval.go │ ├── flake.go │ ├── install.go │ ├── instance.go │ ├── nix.go │ ├── nix_test.go │ ├── nixpkgs.go │ ├── nixprofile │ │ ├── item.go │ │ ├── profile.go │ │ ├── profile_test.go │ │ └── upgrade.go │ ├── profiles.go │ ├── run.go │ ├── search.go │ ├── search_test.go │ ├── shim.go │ ├── store.go │ ├── store_test.go │ ├── storepath.go │ ├── storepath_test.go │ ├── upgrade.go │ └── writer.go ├── patchpkg │ ├── builder.go │ ├── elf.go │ ├── glibc-patch.bash │ ├── patch.go │ └── search.go ├── plugin │ ├── files.go │ ├── github.go │ ├── github_test.go │ ├── includable.go │ ├── includes.go │ ├── info.go │ ├── local.go │ ├── manager.go │ ├── plugin.go │ ├── rm.go │ ├── services.go │ └── update.go ├── pullbox │ ├── config.go │ ├── download.go │ ├── files.go │ ├── git │ │ ├── git.go │ │ └── push.go │ ├── pullbox.go │ ├── s3 │ │ ├── config.go │ │ ├── pull.go │ │ └── push.go │ └── tar │ │ └── tar.go ├── redact │ ├── redact.go │ └── redact_test.go ├── searcher │ ├── client.go │ ├── model.go │ ├── parse.go │ └── parse_test.go ├── services │ ├── client.go │ ├── config.go │ ├── manager.go │ ├── ports.go │ ├── services.go │ └── status.go ├── setup │ ├── setup.go │ └── setup_test.go ├── shellgen │ ├── doc.go │ ├── flake_input.go │ ├── flake_plan.go │ ├── flake_plan_test.go │ ├── generate.go │ ├── generate_test.go │ ├── nixpkgs.go │ ├── path.go │ ├── scripts.go │ ├── testdata │ │ ├── flake-empty.nix.golden │ │ └── flake.nix.golden │ └── tmpl │ │ ├── .gitignore.tmpl │ │ ├── flake.nix.tmpl │ │ ├── glibc-patch.nix.tmpl │ │ ├── script-wrapper.tmpl │ │ └── shell.nix.tmpl ├── telemetry │ ├── segment.go │ ├── sentry.go │ ├── telemetry.go │ └── telemetry_test.go ├── templates │ ├── template.go │ ├── templates.go │ └── templates_test.go ├── ux │ └── messages.go ├── vercheck │ ├── vercheck.go │ └── vercheck_test.go └── xdg │ └── xdg.go ├── nix ├── command.go ├── flake │ ├── flakeref.go │ └── flakeref_test.go ├── install.go ├── nix.go └── nix_test.go ├── pkg └── autodetect │ ├── autodetect.go │ └── detector │ ├── detector.go │ ├── go.go │ ├── go_test.go │ ├── nodejs.go │ ├── nodejs_test.go │ ├── php.go │ ├── php_test.go │ ├── poetry.go │ └── python.go ├── plugins ├── README.md ├── apache │ ├── httpd.conf │ └── process-compose.yaml ├── apacheHttpd.json ├── builtins.go ├── builtins_test.go ├── caddy.json ├── caddy │ ├── Caddyfile │ └── process-compose.yaml ├── elixir.json ├── gradle.json ├── haskell.json ├── haskell │ └── flake.nix ├── mariadb.json ├── mariadb │ ├── flake.nix │ ├── my.cnf │ ├── process-compose.yaml │ └── setup_db.sh ├── mysql.json ├── mysql │ ├── flake.nix │ ├── my.cnf │ ├── process-compose.yaml │ └── setup_db.sh ├── nginx.json ├── nginx │ ├── fastcgi.conf │ ├── nginx.conf │ ├── nginx.template │ └── process-compose.yaml ├── nodejs.json ├── php.json ├── php │ ├── flake.nix │ ├── php-fpm.conf │ ├── php.ini │ └── process-compose.yaml ├── poetry.json ├── poetry │ └── initHook.sh ├── postgresql.json ├── postgresql │ └── process-compose.yaml ├── python.json ├── python │ └── venvShellHook.sh ├── redis.json ├── redis │ ├── process-compose.yaml │ └── redis.conf ├── ruby.json ├── rustc.json ├── rustup.json ├── valkey.json ├── valkey │ ├── process-compose.yaml │ └── valkey.conf └── web │ └── index.html ├── scripts └── gofumpt.sh ├── testscripts ├── Dockerfile ├── README.md ├── add │ ├── add.test.txt │ ├── add_insecure.tst.txt │ ├── add_outputs.test.txt │ ├── add_platforms.test.txt │ ├── add_platforms_flakeref.test.txt │ ├── add_replace.test.txt │ └── global_add.test.txt ├── assert │ └── assert.test.txt ├── basic │ ├── default_test_env.test.txt │ ├── install_hello.test.txt │ └── path_whitespace.test.txt ├── generate │ ├── devcontainer.test.txt │ ├── direnv.test.txt │ └── dockerfile.test.txt ├── info │ └── info.test.txt ├── init │ └── empty.test.txt ├── languages │ ├── php.test.txt │ ├── python_patch_cuda.test.txt │ ├── python_patch_missing_ref.test.txt │ ├── python_patch_missing_so.test.txt │ └── python_patch_old_glibc.test.txt ├── lockfile │ ├── lockfile_tidy.test.txt │ └── nopaths.txt ├── packages │ ├── flakes.test.txt │ └── unfree.test.txt ├── plugin │ ├── disable-plugin.test.txt │ ├── plugin.cycle.test.txt │ └── plugin.test.txt ├── rm │ ├── add-rm.test.txt │ ├── manual.test.txt │ ├── multi.test.txt │ └── rm.test.txt ├── run │ ├── args.test.txt │ ├── env.test.txt │ ├── envfrom.test.txt │ ├── path.test.txt │ ├── pure.test.txt │ ├── quote_escaping.test.txt │ ├── script.test.txt │ ├── script_exit_on_error.test.txt │ └── shellception.test.txt ├── shell │ └── shellenv.test.txt ├── shellenv │ └── node │ │ ├── README.md │ │ ├── devbox.json │ │ ├── less-out │ │ └── style.css │ │ ├── less-src │ │ └── style.less │ │ ├── package-lock.json │ │ └── package.json ├── testrunner │ ├── assert.go │ ├── examplesrunner.go │ ├── run_test.test.txt │ ├── setupenv.go │ ├── source.go │ ├── testrunner.go │ └── updater │ │ └── main.go ├── testscripts_test.go └── update │ └── update.test.txt ├── typos.toml ├── vendor-hash └── vscode-extension ├── .eslintrc.json ├── .gitignore ├── .vscodeignore ├── .yarnrc ├── CHANGELOG.md ├── LICENSE ├── README.md ├── assets └── icon.png ├── package.json ├── src ├── devbox.ts ├── extension.ts ├── openinvscode.ts └── test │ ├── runTest.ts │ └── suite │ ├── extension.test.ts │ └── index.ts ├── tsconfig.json └── yarn.lock /.envrc: -------------------------------------------------------------------------------- 1 | # Automatically sets up your devbox environment whenever you cd into this 2 | # directory via our direnv integration: 3 | 4 | eval "$(devbox generate direnv --print-envrc)" 5 | 6 | # check out https://www.jetify.com/devbox/docs/ide_configuration/direnv/ 7 | # for more details 8 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.go diff=golang 2 | *.sh diff=bash 3 | *.md diff=markdown 4 | *.py diff=python 5 | *.sql diff=sql 6 | 7 | devbox.json linguist-language=json5 8 | 9 | go.sum -diff linguist-generated 10 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Summary 2 | 3 | ## How was it tested? 4 | 5 | ## Community Contribution License 6 | 7 | All community contributions in this pull request are licensed to the project 8 | maintainers under the terms of the 9 | [Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0). 10 | 11 | By creating this pull request, I represent that I have the right to license the 12 | contributions to the project maintainers under the Apache 2 License as stated in 13 | the 14 | [Community Contribution License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license). 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Global gitignore for the entire monorepo. Only add things here that truly 2 | # need to always be ignored regardless of project. 3 | # 4 | # If something is more specific to a particular project, add a gitignore in the 5 | # corresponding subdirectory. 6 | 7 | # MacOS filesystem 8 | .DS_Store 9 | 10 | # Editors 11 | .idea 12 | .vscode 13 | .zed 14 | 15 | # NodeJS 16 | node_modules 17 | .yalc 18 | dist 19 | 20 | 21 | # Python 22 | *.pyc 23 | __pycache__/ 24 | *.py[cod] 25 | *$py.class 26 | 27 | 28 | # Java 29 | *.class 30 | *.jar 31 | 32 | # devcontainer 33 | *.devcontainer 34 | 35 | # test specific files 36 | .test_tmp_* 37 | 38 | # deployment 39 | .vercel 40 | .yarn 41 | 42 | # Nix 43 | vendor/ 44 | result 45 | -------------------------------------------------------------------------------- /cmd/devbox/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package main 5 | 6 | import ( 7 | "go.jetify.com/devbox/internal/boxcli" 8 | ) 9 | 10 | func main() { 11 | boxcli.Main() 12 | } 13 | -------------------------------------------------------------------------------- /docs/.dockerignore: -------------------------------------------------------------------------------- 1 | app/build/Release 2 | app/.docusaurus 3 | app/node_modules 4 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | app/node_modules/ 3 | 4 | # Production 5 | app/build/ 6 | 7 | # Generated files 8 | app/.docusaurus/ 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | 22 | app/.yarn/* 23 | !app/.yarn/patches 24 | !app/.yarn/plugins 25 | !app/.yarn/releases 26 | !app/.yarn/sdks 27 | !app/.yarn/versions 28 | # If we want to start checking in the cache to enable 'zero install': 29 | # !app/.yarn/cache 30 | -------------------------------------------------------------------------------- /docs/.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | # Autoformatter friendly markdownlint config (all formatting rules disabled) 2 | default: true 3 | blank_lines: false 4 | bullet: false 5 | html: false 6 | indentation: false 7 | line_length: false 8 | spaces: false 9 | url: false 10 | whitespace: false 11 | -------------------------------------------------------------------------------- /docs/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | FROM nginx:stable-alpine as deploy 3 | WORKDIR /app 4 | EXPOSE 80 5 | COPY ./app/build/devbox/docs ./static/devbox/docs/ 6 | COPY ./nginx.conf /etc/nginx/nginx.conf 7 | -------------------------------------------------------------------------------- /docs/app/.envrc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Automatically sets up your devbox environment whenever you cd into this 4 | # directory via our direnv integration: 5 | 6 | eval "$(devbox generate direnv --print-envrc)" 7 | 8 | # check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/ 9 | # for more details 10 | -------------------------------------------------------------------------------- /docs/app/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | .vercel 22 | -------------------------------------------------------------------------------- /docs/app/.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | -------------------------------------------------------------------------------- /docs/app/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 3 | }; 4 | -------------------------------------------------------------------------------- /docs/app/cloud/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Jetify Cloud", 3 | "position": 3 4 | } -------------------------------------------------------------------------------- /docs/app/cloud/dashboard/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Dashboard", 3 | "position": 3 4 | } -------------------------------------------------------------------------------- /docs/app/cloud/dashboard/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction 3 | sidebar_position: 1 4 | --- 5 | 6 | The [Jetify Dashboard](https://cloud.jetify.com) lets you manage your team, projects, and secrets from a single interface. You can use the Dashboard to manage your own hobby projects, or to collaborate with other team members. 7 | 8 | ![Jetify Dashboard](../../static/img/jetify_cloud_dashboard.jpeg) 9 | 10 | You can visit the Jetify Dashboard at [cloud.jetify.com](https://cloud.jetify.com) 11 | 12 | ## Guides 13 | 14 | - [Creating Your Team](./creating_your_team.md) 15 | - [Inviting Members](./inviting_members.md) 16 | - [Managing Jetify Secrets from the Dashboard](../secrets/dashboard_secrets.md) 17 | -------------------------------------------------------------------------------- /docs/app/cloud/deploys/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Deployments", 3 | "position": 4 4 | 5 | } -------------------------------------------------------------------------------- /docs/app/cloud/deploys/integrations/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Integrations", 3 | "position": 5 4 | } -------------------------------------------------------------------------------- /docs/app/cloud/deploys/integrations/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Integration Guides 3 | --- 4 | 5 | This section contains guides on how to integrate common services with your Jetify deployments. 6 | 7 | * [PostgresQL with Supabase](./supabase.md) 8 | * [Redis with Upstash](./upstash.md) 9 | * [Object Storage with S3](./s3.md) -------------------------------------------------------------------------------- /docs/app/cloud/deploys/secrets.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Using Jetify Secrets with your Deployment 3 | sidebar_position: 4 4 | --- 5 | 6 | Projects deployed with Jetify Cloud are automatically configured to use [Jetify Secrets](../secrets/index.md) when deploying your project. You do not need to authenticate, or add any additional configuration to use your secrets. Your project will deploy using the `prod` environment for your secrets by default. 7 | 8 | For more details on how to configure secrets, see: 9 | 10 | * [Jetify Secrets Overview](../secrets/index.md) 11 | * [Setting Secrets from the CLI](../secrets/secrets_cli.md) 12 | * [Setting Secrets from the Dashboard](../secrets/dashboard_secrets.md) 13 | 14 | -------------------------------------------------------------------------------- /docs/app/cloud/secrets/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Secrets", 3 | "position": 3 4 | } -------------------------------------------------------------------------------- /docs/app/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "nodejs@20.12.2", 4 | ], 5 | "env": { 6 | "DEVBOX_COREPACK_ENABLED": "true", 7 | }, 8 | "shell": { 9 | "init_hook": [ 10 | "test \"$SKIP_INIT_HOOK\" = \"1\" || pnpm install", 11 | ], 12 | "scripts": { 13 | "build": "pnpm run build", 14 | "start": "pnpm run start", 15 | "serve": "pnpm run serve", 16 | }, 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "CLI Reference", 3 | "position": 5 4 | } -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_cache.md: -------------------------------------------------------------------------------- 1 | # devbox cache 2 | 3 | A collection of commands to interact with the Jetify Cache or other Nix caches. 4 | 5 | ```bash 6 | devbox cache [command] 7 | ``` 8 | 9 | ## Subcommands 10 | info Output information about the nix cache 11 | upload upload specified or nix packages in current project to cache 12 | 13 | ## Options 14 | | Option | Description | 15 | | --- | --- | 16 | | `-h, --help` | help for cache | 17 | | `-q, --quiet` | suppresses logs | 18 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_cache_info.md: -------------------------------------------------------------------------------- 1 | # devbox cache info 2 | 3 | Output information about the nix cache 4 | 5 | ```bash 6 | devbox cache info [flags] 7 | ``` 8 | 9 | ## Options 10 | 11 | | Option | Description | 12 | | --- | --- | 13 | | `-h, --help` | help for info | 14 | | `-q, --quiet` | suppresses logs | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_generate_readme.md: -------------------------------------------------------------------------------- 1 | # devbox generate readme 2 | 3 | Generate a markdown readme file for this project. You must specify a name for the Readme file when running the command: 4 | 5 | ```bash 6 | devbox generate readme [filename] [flags] 7 | ``` 8 | 9 | ## Options 10 | 11 | 12 | | Option | Description | 13 | | --- | --- | 14 | | `-c, --config string` | path to directory containing a devbox.json config file | 15 | | `-h, --help` | help for readme | 16 | | `-q, --quiet` | Quiet mode: Suppresses logs. | 17 | 18 | 19 | ## SEE ALSO 20 | 21 | * [devbox generate](devbox_generate.md) - Generate supporting files for your project 22 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_global_install.md: -------------------------------------------------------------------------------- 1 | # devbox global install 2 | 3 | Install all packages mentioned in your global devbox.json. 4 | 5 | ```bash 6 | devbox global install ... [flags] 7 | ``` 8 | 9 | ## Options 10 | 11 | 12 | | Option | Description | 13 | | --- | --- | 14 | | `-h, --help` | help for global install | 15 | | `-q, --quiet` | suppresses logs | 16 | 17 | ## SEE ALSO 18 | 19 | * [devbox global](devbox_global.md) - Manages global Devbox packages 20 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_global_list.md: -------------------------------------------------------------------------------- 1 | # devbox global list 2 | 3 | Lists all the packages you have installed globally 4 | 5 | ```bash 6 | devbox global list ... [flags] 7 | ``` 8 | ## Aliases 9 | 10 | list, ls 11 | 12 | ## Options 13 | 14 | 15 | | Option | Description | 16 | | --- | --- | 17 | | `-h, --help` | help for list | 18 | | `-q, --quiet` | suppresses logs | 19 | 20 | ## SEE ALSO 21 | 22 | * [devbox global](devbox_global.md) - Manages global Devbox packages 23 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_global_pull.md: -------------------------------------------------------------------------------- 1 | # devbox global pull 2 | 3 | Pulls a global config from a file or URL. URLs must be prefixed with 'http://' or 'https://'. 4 | 5 | ```bash 6 | devbox global pull | [flags] 7 | ``` 8 | 9 | ## Options 10 | 11 | 12 | | Option | Description | 13 | | --- | --- | 14 | | `-h, --help` | help for pull | 15 | | `-q, --quiet` | suppresses logs | 16 | 17 | ## SEE ALSO 18 | 19 | * [devbox global](devbox_global.md) - Manages global Devbox packages 20 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_global_push.md: -------------------------------------------------------------------------------- 1 | # devbox global push 2 | 3 | Push a [global] config. Leave empty to use Jetify sync. Can be a git repo for self storage. 4 | 5 | ```bash 6 | devbox global push [flags] 7 | ``` 8 | 9 | ## Options 10 | 11 | 12 | | Option | Description | 13 | | --- | --- | 14 | | `-h, --help` | help for pull | 15 | | `-q, --quiet` | suppresses logs | 16 | 17 | ## SEE ALSO 18 | 19 | * [devbox global](devbox_global.md) - Manages global Devbox packages 20 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_global_rm.md: -------------------------------------------------------------------------------- 1 | # devbox global rm 2 | 3 | Removes a package from your global config 4 | 5 | ```bash 6 | devbox global rm [flags] 7 | ``` 8 | 9 | ## Options 10 | 11 | 12 | | Option | Description | 13 | | --- | --- | 14 | | `-h, --help` | help for rm | 15 | | `-q, --quiet` | suppresses logs | 16 | 17 | ## SEE ALSO 18 | 19 | * [devbox global](devbox_global.md) - Manages global Devbox packages 20 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_init.md: -------------------------------------------------------------------------------- 1 | # devbox init 2 | 3 | Initialize a directory as a devbox project 4 | 5 | ## Synopsis 6 | 7 | Initialize a directory as a devbox project. This will create an empty devbox.json in the current directory. You can then add packages using `devbox add` 8 | 9 | ```bash 10 | devbox init [] [flags] 11 | ``` 12 | 13 | ## Options 14 | 15 | 16 | | Option | Description | 17 | | --- | --- | 18 | | `-h, --help` | help for init | 19 | | `-q, --quiet` | Quiet mode: Suppresses logs. | 20 | 21 | ## SEE ALSO 22 | 23 | * [devbox](./devbox.md) - Instant, easy, predictable shells and containers 24 | 25 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_install.md: -------------------------------------------------------------------------------- 1 | # devbox install 2 | 3 | Starts a new devbox shell and installs all packages mentioned in devbox.json in current directory or a directory specified via --config. 4 | 5 | Then exits the shell when packages are done installing. 6 | 7 | ```bash 8 | devbox install [flags] 9 | ``` 10 | 11 | ## Options 12 | 13 | 14 | | Option | Description | 15 | | --- | --- | 16 | | `-c, --config string` | path to directory containing a devbox.json config file | 17 | | `-h, --help` | help for install | 18 | | `-q, --quiet` | suppresses logs | 19 | 20 | ## SEE ALSO 21 | 22 | * [devbox](devbox.md) - Instant, easy, predictable development environments 23 | 24 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_rm.md: -------------------------------------------------------------------------------- 1 | # devbox rm 2 | 3 | Remove a package from your devbox 4 | 5 | ```bash 6 | devbox rm ... [flags] 7 | ``` 8 | 9 | ## Options 10 | 11 | 12 | | Option | Description | 13 | | --- | --- | 14 | | `-h, --help` | help for rm | 15 | | `-q, --quiet` | Quiet mode: Suppresses logs. | 16 | 17 | ## SEE ALSO 18 | 19 | * [devbox](./devbox.md) - Instant, easy, predictable shells and containers 20 | 21 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_secrets_init.md: -------------------------------------------------------------------------------- 1 | # devbox secrets init 2 | 3 | Initialize devbox secrets in the project directory. This setup step creates/connects to an existing jetify cloud project 4 | 5 | ```bash 6 | devbox secrets init [flags] 7 | ``` 8 | 9 | ## Options 10 | 11 | ```bash 12 | -h, --help help for init 13 | ``` 14 | 15 | ## SEE ALSO 16 | 17 | * [devbox_secrets](./devbox_secrets.md) - Manage environment variables and secrets 18 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_secrets_rm.md: -------------------------------------------------------------------------------- 1 | # devbox secrets rm 2 | 3 | Delete one or more environment variables 4 | 5 | ## Synopsis 6 | 7 | Delete one or more environment variables that are stored. 8 | 9 | ```bash 10 | devbox secrets rm []... [flags] 11 | ``` 12 | 13 | ## Options 14 | 15 | ```bash 16 | --environment string Environment name, such as dev or prod (default "dev") 17 | -h, --help help for rm 18 | --org-id string Organization id to namespace secrets by 19 | --project-id string Project id to namespace secrets by 20 | ``` 21 | 22 | ## SEE ALSO 23 | 24 | * [devbox_secrets](./devbox_secrets.md) - Manage environment variables and secrets 25 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_services_ls.md: -------------------------------------------------------------------------------- 1 | # devbox services ls 2 | 3 | List available services 4 | 5 | ```bash 6 | devbox services ls [flags] 7 | ``` 8 | 9 | ## Options 10 | 11 | 12 | | Option | Description | 13 | | --- | --- | 14 | | `-h, --help` | help for ls | 15 | | `-q, --quiet` | Quiet mode: Suppresses logs. | 16 | 17 | ### SEE ALSO 18 | 19 | * [devbox services](devbox_services.md) - Interact with devbox services 20 | 21 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_version.md: -------------------------------------------------------------------------------- 1 | # devbox version 2 | 3 | Print version information 4 | 5 | ```bash 6 | devbox version [update] [flags] 7 | ``` 8 | 9 | ## Subcommands 10 | 11 | * [devbox version update](devbox_version_update.md) - Check for a new version of devbox and update if available 12 | 13 | 14 | ## Options 15 | 16 | 17 | | Option | Description | 18 | | --- | --- | 19 | | `-h, --help` | help for version | 20 | | `-v, --verbose` | Verbose: displays additional version information | 21 | | `-q, --quiet` | Quiet mode: Suppresses logs. | 22 | 23 | ## SEE ALSO 24 | 25 | * [devbox](./devbox.md) - Instant, easy, predictable shells and containers 26 | 27 | -------------------------------------------------------------------------------- /docs/app/docs/cli_reference/devbox_version_update.md: -------------------------------------------------------------------------------- 1 | # devbox version update 2 | 3 | Check for a new version of devbox and update if available 4 | 5 | ```bash 6 | devbox version update [flags] 7 | ``` 8 | 9 | ## Options 10 | 11 | 12 | | Option | Description | 13 | | --- | --- | 14 | | `-h, --help` | help for update | 15 | | `-q, --quiet` | Quiet mode: Suppresses logs. | 16 | 17 | ## SEE ALSO 18 | 19 | * [devbox](./devbox.md) - Instant, easy, predictable shells and containers 20 | 21 | -------------------------------------------------------------------------------- /docs/app/docs/devbox_examples/languages/zig.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Zig 3 | --- 4 | 5 | Zig projects can be run in Devbox by adding Zig and Nimble to your project. 6 | 7 | [**Example Repo**](https://github.com/jetify-com/devbox/tree/main/examples/development/zig/zig-hello-world) 8 | 9 | 10 | ## Adding Zig to your Project 11 | 12 | `devbox add zig`, or add the following to your `devbox.json` 13 | 14 | ```json 15 | "packages": [ 16 | "zig@latest", 17 | ] 18 | ``` 19 | 20 | This will install the latest version of Zig. You can find other installable versions of Zig by running `devbox search zig`. You can also view the available versions on [Nixhub](https://www.nixhub.io/packages/zig) 21 | -------------------------------------------------------------------------------- /docs/app/nixhub/sidebar.ts: -------------------------------------------------------------------------------- 1 | import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; 2 | 3 | const nixhubSidebar: SidebarsConfig = { 4 | sidebar: [ 5 | { 6 | type: "doc", 7 | id: "index", 8 | }, 9 | { 10 | type: "doc", 11 | label: "Get a Package", 12 | id: "get-a-package", 13 | }, 14 | { 15 | type: "doc", 16 | label: "Search Packages", 17 | id: "search-packages", 18 | }, 19 | { 20 | type: "doc", 21 | label: "Resolve a Package", 22 | id: "resolve-a-package-version", 23 | }, 24 | ], 25 | }; 26 | 27 | export default nixhubSidebar.sidebar; -------------------------------------------------------------------------------- /docs/app/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/.nojekyll -------------------------------------------------------------------------------- /docs/app/static/img/active_member.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/active_member.png -------------------------------------------------------------------------------- /docs/app/static/img/auth_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/auth_page.png -------------------------------------------------------------------------------- /docs/app/static/img/build-logs.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/build-logs.jpeg -------------------------------------------------------------------------------- /docs/app/static/img/connection_parameters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/connection_parameters.png -------------------------------------------------------------------------------- /docs/app/static/img/create-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/create-project.png -------------------------------------------------------------------------------- /docs/app/static/img/create_team_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/create_team_form.png -------------------------------------------------------------------------------- /docs/app/static/img/custom-domain-issued.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/custom-domain-issued.png -------------------------------------------------------------------------------- /docs/app/static/img/custom-domain-unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/custom-domain-unknown.png -------------------------------------------------------------------------------- /docs/app/static/img/custom-domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/custom-domain.png -------------------------------------------------------------------------------- /docs/app/static/img/dashboard_create_new_devspace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/dashboard_create_new_devspace.png -------------------------------------------------------------------------------- /docs/app/static/img/delete_member.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/delete_member.png -------------------------------------------------------------------------------- /docs/app/static/img/deploy-in-progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/deploy-in-progress.png -------------------------------------------------------------------------------- /docs/app/static/img/deploy-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/deploy-success.png -------------------------------------------------------------------------------- /docs/app/static/img/devbox_cloud_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/devbox_cloud_browser.png -------------------------------------------------------------------------------- /docs/app/static/img/devbox_cloud_editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/devbox_cloud_editor.png -------------------------------------------------------------------------------- /docs/app/static/img/devbox_sh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/devbox_sh.png -------------------------------------------------------------------------------- /docs/app/static/img/eclipse_background_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/eclipse_background_2.png -------------------------------------------------------------------------------- /docs/app/static/img/edit_secrets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/edit_secrets.png -------------------------------------------------------------------------------- /docs/app/static/img/enable-deployments.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/enable-deployments.jpeg -------------------------------------------------------------------------------- /docs/app/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/favicon.ico -------------------------------------------------------------------------------- /docs/app/static/img/invited_member.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/invited_member.png -------------------------------------------------------------------------------- /docs/app/static/img/inviting_member.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/inviting_member.png -------------------------------------------------------------------------------- /docs/app/static/img/jetify-social-card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/jetify-social-card.png -------------------------------------------------------------------------------- /docs/app/static/img/jetify_auth.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/jetify_auth.jpeg -------------------------------------------------------------------------------- /docs/app/static/img/jetify_cloud_dashboard.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/jetify_cloud_dashboard.jpeg -------------------------------------------------------------------------------- /docs/app/static/img/members_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/members_tab.png -------------------------------------------------------------------------------- /docs/app/static/img/newproject-tworepos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/newproject-tworepos.png -------------------------------------------------------------------------------- /docs/app/static/img/newproject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/newproject.png -------------------------------------------------------------------------------- /docs/app/static/img/postgres-secrets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/postgres-secrets.png -------------------------------------------------------------------------------- /docs/app/static/img/process-compose-tui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/process-compose-tui.png -------------------------------------------------------------------------------- /docs/app/static/img/project-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/project-page.png -------------------------------------------------------------------------------- /docs/app/static/img/runtime-logs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/runtime-logs.png -------------------------------------------------------------------------------- /docs/app/static/img/s3-secrets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/s3-secrets.png -------------------------------------------------------------------------------- /docs/app/static/img/secrets.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/secrets.gif -------------------------------------------------------------------------------- /docs/app/static/img/secrets_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/secrets_tab.png -------------------------------------------------------------------------------- /docs/app/static/img/supabase-API.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/supabase-API.png -------------------------------------------------------------------------------- /docs/app/static/img/supabase-secrets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/supabase-secrets.png -------------------------------------------------------------------------------- /docs/app/static/img/team_selector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/team_selector.png -------------------------------------------------------------------------------- /docs/app/static/img/upstash-secrets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/upstash-secrets.png -------------------------------------------------------------------------------- /docs/app/static/img/upstash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/docs/app/static/img/upstash.png -------------------------------------------------------------------------------- /docs/app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // This file is not used in compilation. It is here just for a nice editor experience. 3 | "extends": "@tsconfig/docusaurus/tsconfig.json", 4 | "exclude": ["node_modules", "build", ".docusaurus", ".devbox"], 5 | "compilerOptions": { 6 | "baseUrl": ".", 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /docs/app/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "trailingSlash": true 3 | } 4 | -------------------------------------------------------------------------------- /docs/launchpad.yaml: -------------------------------------------------------------------------------- 1 | configVersion: 0.1.2 2 | projectId: proj_wDDVK8L05shx83Wt1UVG1l1x 3 | name: devbox 4 | cluster: jetpack-cloud 5 | envsec: 6 | provider: jetpack 7 | services: 8 | devbox-web: 9 | type: web 10 | port: 80 11 | url: www.jetpack.io/devbox/docs/ 12 | -------------------------------------------------------------------------------- /docs/nginx.conf: -------------------------------------------------------------------------------- 1 | events {} 2 | http { 3 | include mime.types; 4 | sendfile on; 5 | 6 | server { 7 | listen 80; 8 | listen [::]:80; 9 | 10 | resolver 127.0.0.11; 11 | autoindex off; 12 | 13 | server_name _; 14 | server_tokens off; 15 | 16 | root /app/static; 17 | gzip_static on; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /examples/.gitignore: -------------------------------------------------------------------------------- 1 | .devbox/ 2 | .DS_STORE 3 | .vscode/settings.json 4 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | # Devbox Examples 2 | 3 | [![Built with Devbox](https://www.jetify.com/img/devbox/shield_moon.svg)](https://www.jetify.com/devbox/docs/contributor-quickstart/) 4 | 5 | Example dev environments built with Devbox: 6 | 7 | 1. `databases` - Examples of popular DBs (eg.,MariaDB, Postgres, Redis) 8 | 1. `development` - Shells for developing in different programming languages 9 | 1. `flakes` - Examples of using Nix Flakes with Devbox 10 | 1. `servers` - Examples of servers, like Apache + Nginx 11 | 1. `stacks` - Full projects and web stacks, like LAMP and Drupal 12 | -------------------------------------------------------------------------------- /examples/cloud_development/argo-workflows/argo-patch.sh: -------------------------------------------------------------------------------- 1 | # Patch so we don't need to login through the UI, for development purposes. See https://argoproj.github.io/argo-workflows/quick-start/ for details. 2 | 3 | kubectl patch deployment \ 4 | argo-server \ 5 | --namespace=argo \ 6 | --type='json' \ 7 | -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args", "value": [ 8 | "server", 9 | "--auth-mode=server" 10 | ]}]' -------------------------------------------------------------------------------- /examples/cloud_development/minikube/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "kubectl", 4 | "kubernetes-helm-wrapped", 5 | "docker", 6 | "minikube@latest" 7 | ], 8 | "env": { 9 | "MINIKUBE_HOME": "$PWD/home/.minkube", 10 | "KUBECONFIG": "$PWD/home/.kube/config" 11 | }, 12 | "shell": { 13 | "init_hook": [ 14 | "helm repo add my-repo https://charts.bitnami.com/bitnami" 15 | ], 16 | "scripts": { 17 | "minikube": [ 18 | "finish() { minikube stop; }", 19 | "trap finish SIGTERM SIGINT EXIT", 20 | "minikube start", 21 | "minikube logs -f" 22 | ] 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /examples/cloud_development/minikube/home/.gitignore: -------------------------------------------------------------------------------- 1 | */ -------------------------------------------------------------------------------- /examples/cloud_development/temporal/.envrc: -------------------------------------------------------------------------------- 1 | # Automatically sets up your devbox environment whenever you cd into this 2 | # directory via our direnv integration: 3 | 4 | use_devbox() { 5 | watch_file devbox.json 6 | if [ -f .devbox/gen/flake/flake.nix ]; then 7 | DEVBOX_SHELL_ENABLED_BACKUP=$DEVBOX_SHELL_ENABLED 8 | eval "$(devbox shellenv --init-hook)" 9 | export DEVBOX_SHELL_ENABLED=$DEVBOX_SHELL_ENABLED_BACKUP 10 | fi 11 | } 12 | use devbox 13 | 14 | # check out https://www.jetify.com/devbox/docs/ide_configuration/direnv/ 15 | # for more details 16 | -------------------------------------------------------------------------------- /examples/cloud_development/temporal/.gitignore: -------------------------------------------------------------------------------- 1 | .venv/ -------------------------------------------------------------------------------- /examples/cloud_development/temporal/hello/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | .poetry-cache/ -------------------------------------------------------------------------------- /examples/cloud_development/temporal/hello/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/cloud_development/temporal/hello/__init__.py -------------------------------------------------------------------------------- /examples/cloud_development/temporal/requirements.txt: -------------------------------------------------------------------------------- 1 | temporalio==0.1b4 2 | cython -------------------------------------------------------------------------------- /examples/cloud_development/temporal/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/cloud_development/temporal/tests/__init__.py -------------------------------------------------------------------------------- /examples/cloud_development/temporal/venvShellHook.sh: -------------------------------------------------------------------------------- 1 | SOURCE_DATE_EPOCH=$(date +%s) 2 | 3 | if [ -d "$VENV_DIR" ]; then 4 | echo "Skipping venv creation, '${VENV_DIR}' already exists" 5 | else 6 | echo "Creating new venv environment in path: '${VENV_DIR}'" 7 | # Note that the module venv was only introduced in python 3, so for 2.7 8 | # this needs to be replaced with a call to virtualenv 9 | which python3 10 | python3 -m venv "$VENV_DIR" 11 | fi 12 | -------------------------------------------------------------------------------- /examples/data_science/R/.gitignore: -------------------------------------------------------------------------------- 1 | .RData 2 | .Rhistory 3 | -------------------------------------------------------------------------------- /examples/data_science/R/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.10.6/.schema/devbox.schema.json", 3 | "packages": [ 4 | "R@4.4.1", 5 | "rPackages.data_table@latest", 6 | "rPackages.ggplot2@latest", 7 | "rPackages.tidyverse@latest", 8 | "rPackages.dplyr@latest" 9 | ], 10 | "shell": { 11 | "init_hook": [ 12 | "echo 'Welcome to devbox!' > /dev/null" 13 | ], 14 | "scripts": { 15 | "test": [ 16 | "echo \"Error: no test specified\" && exit 1" 17 | ] 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/data_science/R/src/examplePlot.R: -------------------------------------------------------------------------------- 1 | # Load the required libraries 2 | library(data.table) 3 | library(ggplot2) 4 | 5 | # Create example data 6 | data <- data.table( 7 | x = rnorm(100), # 100 random numbers from a normal distribution 8 | y = rnorm(100) # 100 random numbers from a normal distribution 9 | ) 10 | 11 | # Plot the data using ggplot2 12 | demoPlot <- ggplot(data, aes(x = x, y = y)) + 13 | geom_point() + # Create a scatter plot 14 | theme_minimal() + # Use a minimal theme 15 | labs(title = "Scatter Plot of Random Data", 16 | x = "X Axis", 17 | y = "Y Axis") 18 | 19 | print(demoPlot) 20 | -------------------------------------------------------------------------------- /examples/data_science/README.md: -------------------------------------------------------------------------------- 1 | # Data Science and ML Examples 2 | 3 | Basic data science and ML examples. These examples are WIP 4 | 5 | Note: Examples that require a GPU are currently configured for WSL2.0 only. Modifications are needed for them to use GPUs on Linux -------------------------------------------------------------------------------- /examples/data_science/jupyter/.envrc: -------------------------------------------------------------------------------- 1 | # Automatically sets up your devbox environment whenever you cd into this 2 | # directory via our direnv integration: 3 | 4 | use_devbox() { 5 | watch_file devbox.json 6 | if [ -f .devbox/gen/flake/flake.nix ]; then 7 | DEVBOX_SHELL_ENABLED_BACKUP=$DEVBOX_SHELL_ENABLED 8 | eval "$(devbox shellenv --init-hook)" 9 | export DEVBOX_SHELL_ENABLED=$DEVBOX_SHELL_ENABLED_BACKUP 10 | fi 11 | } 12 | use devbox 13 | 14 | # check out https://www.jetify.com/devbox/docs/ide_configuration/direnv/ 15 | # for more details 16 | -------------------------------------------------------------------------------- /examples/data_science/jupyter/.pdm.toml: -------------------------------------------------------------------------------- 1 | [python] 2 | path = "/nix/store/7rjqb838snvvxcmpvck1smfxhkwzqal5-python3-3.10.10/bin/python3.10" 3 | -------------------------------------------------------------------------------- /examples/data_science/jupyter/__pypackages__/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /examples/data_science/jupyter/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "pdm", 4 | "nodePackages.pyright", 5 | "python311Packages.jupyter", 6 | "python311Packages.virtualenv", 7 | "python311@latest" 8 | ], 9 | "env": { 10 | "PATH": "$PATH:$PWD/__pypackages__/3.11/bin", 11 | "PDM_CHECK_UPDATE": "0", 12 | "PYTHONPATH": "$PYTHONPATH:$PWD/__pypackages__/3.11/lib" 13 | }, 14 | "shell": { 15 | "init_hook": null 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/data_science/jupyter/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/data_science/jupyter/main.py -------------------------------------------------------------------------------- /examples/data_science/jupyter/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "" 3 | version = "" 4 | description = "" 5 | authors = [ 6 | {name = "John Lago", email = "750845+Lagoja@users.noreply.github.com"}, 7 | ] 8 | dependencies = [ 9 | "jupyter>=1.0.0", 10 | ] 11 | requires-python = ">=3.10" 12 | license = {text = "MIT"} 13 | 14 | 15 | [tool.pdm] 16 | -------------------------------------------------------------------------------- /examples/data_science/llama/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "github:ggerganov/llama.cpp", 4 | "wget@latest" 5 | ], 6 | "shell": { 7 | "init_hook": null, 8 | "scripts": { 9 | "get_model": [ 10 | "mkdir -p models/vic7B/", 11 | "cd models/vic7B", 12 | "wget https://huggingface.co/eachadea/ggml-vicuna-7b-1.1/resolve/main/ggml-vic7b-q5_0.bin" 13 | ], 14 | "llama": "llama -m ./models/vic7B/ggml-vic7b-q5_0.bin -n 512 -p \"hello world\"" 15 | } 16 | }, 17 | "nixpkgs": { 18 | "commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/data_science/pytorch/basic-example/README.md: -------------------------------------------------------------------------------- 1 | # Basic Pytorch Example 2 | 3 | This is a Devbox for running PyTorch. 4 | 5 | Note: This demo currently only works on WSL3 with Nvidia GPUs. For Linux, additional packages and configuration may be needed. -------------------------------------------------------------------------------- /examples/data_science/pytorch/basic-example/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": { 3 | "poetry": "", 4 | "stdenv.cc.cc.lib": "", 5 | "cudatoolkit": { 6 | "version": "latest", 7 | "excluded_platforms": ["aarch64-darwin", "x86_64-darwin"] 8 | } 9 | }, 10 | "env": {}, 11 | "shell": { 12 | "init_hook": [], 13 | "scripts": { 14 | "install": "poetry install", 15 | "main": "poetry run python main.py" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /examples/data_science/pytorch/basic-example/main.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | def create_arrays(n): 4 | x = torch.ones(n, n) 5 | y = torch.randn(n, n * 2) 6 | return x , y 7 | 8 | 9 | def main(): 10 | x, y = create_arrays(1000) 11 | x = x.to("cuda") 12 | y = y.to("cuda") 13 | z = x @ y 14 | print(z) 15 | 16 | if __name__ == "__main__": 17 | main() -------------------------------------------------------------------------------- /examples/data_science/pytorch/basic-example/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "devbox-cuda-dev" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["jetify.com"] 6 | readme = "README.md" 7 | packages = [{include = "devbox_cuda_dev"}] 8 | 9 | [tool.poetry.dependencies] 10 | python = "^3.10" 11 | torch = "^1.13.1" 12 | numpy = "^1.24.2" 13 | 14 | 15 | [build-system] 16 | requires = ["poetry-core"] 17 | build-backend = "poetry.core.masonry.api" 18 | -------------------------------------------------------------------------------- /examples/data_science/pytorch/gradio/.gitignore: -------------------------------------------------------------------------------- 1 | flagged/ -------------------------------------------------------------------------------- /examples/data_science/pytorch/gradio/README.md: -------------------------------------------------------------------------------- 1 | # Gradio + Pytorch 2 | 3 | This is a Devbox for running the [Pictionary](https://huggingface.co/spaces/gradio/pictionary/tree/main) demo by [@aliabd](https://github.com/aliabd) that can be found on Hugging Face Spaces. 4 | 5 | Note: This demo currently only works on WSL3 with Nvidia GPUs. For Linux, additional packages and configuration may be needed. -------------------------------------------------------------------------------- /examples/data_science/pytorch/gradio/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "python310Packages.pip", 4 | "stdenv.cc.cc.lib", 5 | "python310@latest" 6 | ], 7 | "env": {}, 8 | "shell": { 9 | "init_hook": [ 10 | ". $VENV_DIR/bin/activate", 11 | "pip install -r requirements.txt" 12 | ] 13 | }, 14 | "nixpkgs": { 15 | "commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/data_science/pytorch/gradio/pytorch_model.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/data_science/pytorch/gradio/pytorch_model.bin -------------------------------------------------------------------------------- /examples/data_science/pytorch/gradio/requirements.txt: -------------------------------------------------------------------------------- 1 | torch 2 | gradio 3 | pathlib 4 | gdown -------------------------------------------------------------------------------- /examples/data_science/tensorflow/README.md: -------------------------------------------------------------------------------- 1 | # Tensorflow application 2 | 3 | Simple Tensorflow sample project with Devbox. 4 | 5 | ## Setup 6 | 7 | - Make sure to have [devbox installed](https://www.jetify.com/devbox/docs/quickstart/#install-devbox) 8 | - Clone this repo: `git clone https://github.com/jetify-com/devbox.git` 9 | - `cd devbox/examples/data_science/tensorflow/` 10 | - `devbox shell` 11 | - `python3 main.py` 12 | -------------------------------------------------------------------------------- /examples/data_science/tensorflow/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "python310Packages.pip", 4 | "stdenv.cc.cc.lib", 5 | "python310@latest" 6 | ], 7 | "shell": { 8 | "init_hook": [ 9 | ". $VENV_DIR/bin/activate", 10 | "pip install -r requirements.txt" 11 | ] 12 | }, 13 | "nixpkgs": { 14 | "commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /examples/data_science/tensorflow/main.py: -------------------------------------------------------------------------------- 1 | import tensorflow as tf 2 | 3 | # Simple python script using Tensorflow 4 | print(tf.reduce_sum(tf.random.normal([1000, 1000]))) 5 | -------------------------------------------------------------------------------- /examples/data_science/tensorflow/requirements.txt: -------------------------------------------------------------------------------- 1 | tf-nightly -------------------------------------------------------------------------------- /examples/databases/mariadb/.gitignore: -------------------------------------------------------------------------------- 1 | conf/mysql/data 2 | *.log 3 | *.pid 4 | *.sock -------------------------------------------------------------------------------- /examples/databases/mariadb/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "mariadb@latest" 4 | ], 5 | "shell": { 6 | "init_hook": [], 7 | "scripts": { 8 | "connect_db": [ 9 | "mysql -u devbox_user -p -D devbox_lamp" 10 | ], 11 | "test_db_setup": [ 12 | "mkdir -p /tmp/devbox/mariadb/run", 13 | "devbox services up -b", 14 | "sleep 5", 15 | "mysql -u root --password='' < setup_db.sql", 16 | "devbox services stop" 17 | ] 18 | } 19 | }, 20 | "nixpkgs": { 21 | "commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62" 22 | }, 23 | "env": { 24 | "MYSQL_UNIX_PORT": "/tmp/devbox/mariadb/run/mysql.sock" 25 | } 26 | } -------------------------------------------------------------------------------- /examples/databases/mariadb/setup_db.sql: -------------------------------------------------------------------------------- 1 | --- You should run this query using `mysql -u root < setup_db.sql` 2 | 3 | DROP DATABASE IF EXISTS devbox_lamp; 4 | CREATE DATABASE devbox_lamp; 5 | 6 | USE devbox_lamp 7 | 8 | CREATE USER 'devbox_user'@'localhost' IDENTIFIED BY 'password'; 9 | GRANT ALL PRIVILEGES ON devbox_lamp.* TO 'devbox_user'@'localhost' IDENTIFIED BY 'password'; 10 | 11 | DROP TABLE IF EXISTS colors; 12 | CREATE TABLE colors ( 13 | id INT NOT NULL AUTO_INCREMENT, 14 | name VARCHAR(100) NOT NULL, 15 | hex VARCHAR(7) NOT NULL, 16 | PRIMARY KEY (id)); 17 | 18 | INSERT INTO colors (name, hex) VALUES ('red', '#FF0000'), ('blue', '#0000FF'), ('green', '#00FF00'); 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/databases/mysql/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "mysql80@latest" 4 | ], 5 | "shell": { 6 | "init_hook": [], 7 | "scripts": { 8 | "connect_db": [ 9 | "mysql -u devbox_user -p -D devbox_lamp" 10 | ], 11 | "test_db_setup": [ 12 | "mkdir -p /tmp/devbox/mariadb/run", 13 | "devbox services up -b", 14 | "sleep 5", 15 | "mysql -u root --password='' < setup_db.sql", 16 | "devbox services stop" 17 | ] 18 | } 19 | }, 20 | "env": { 21 | "MYSQL_UNIX_PORT": "/tmp/devbox/mariadb/run/mysql.sock" 22 | } 23 | } -------------------------------------------------------------------------------- /examples/databases/mysql/setup_db.sql: -------------------------------------------------------------------------------- 1 | -- You should run this query using `mysql -u root < setup_db.sql` 2 | 3 | DROP DATABASE IF EXISTS devbox_lamp; 4 | CREATE DATABASE devbox_lamp; 5 | 6 | USE devbox_lamp; 7 | 8 | CREATE USER 'devbox_user'@'localhost' IDENTIFIED BY 'password'; 9 | GRANT ALL ON devbox_lamp.* TO 'devbox_user'@'localhost'; 10 | 11 | DROP TABLE IF EXISTS colors; 12 | CREATE TABLE colors ( 13 | id INT NOT NULL AUTO_INCREMENT, 14 | name VARCHAR(100) NOT NULL, 15 | hex VARCHAR(7) NOT NULL, 16 | PRIMARY KEY (id)); 17 | 18 | INSERT INTO colors (name, hex) VALUES ('red', '#FF0000'), ('blue', '#0000FF'), ('green', '#00FF00'); 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/databases/postgres/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | *.pid 3 | *.sock 4 | data/ -------------------------------------------------------------------------------- /examples/databases/postgres/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": { 3 | "postgresql": "latest" 4 | }, 5 | "shell": { 6 | "init_hook": null 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/databases/postgres/setup_postgres_db.sql: -------------------------------------------------------------------------------- 1 | --- You should run this query using psql < setup_db.sql` 2 | 3 | DROP DATABASE IF EXISTS devbox_lamp; 4 | CREATE DATABASE devbox_lamp; 5 | 6 | CREATE USER devbox_user WITH PASSWORD 'password'; 7 | 8 | DROP TABLE IF EXISTS colors; 9 | CREATE TABLE colors ( 10 | id SERIAL NOT NULL PRIMARY KEY, 11 | name VARCHAR(100) NOT NULL, 12 | hex VARCHAR(7) NOT NULL); 13 | 14 | INSERT INTO colors (name, hex) VALUES ('red', '#FF0000'), ('blue', '#0000FF'), ('green', '#00FF00'); 15 | 16 | GRANT ALL PRIVILEGES ON colors TO devbox_user; 17 | -------------------------------------------------------------------------------- /examples/databases/redis/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": ["redis@latest"], 3 | "shell": { 4 | "init_hook": "", 5 | "scripts": { 6 | "redis-cli": "redis-cli" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/databases/valkey/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": ["valkey@latest"], 3 | "shell": { 4 | "init_hook": "", 5 | "scripts": { 6 | "valkey-cli": "valkey-cli" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/development/bun/bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/development/bun/bun.lockb -------------------------------------------------------------------------------- /examples/development/bun/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.10.1/.schema/devbox.schema.json", 3 | "packages": ["bun@latest"], 4 | "shell": { 5 | "init_hook": [], 6 | "scripts": { 7 | "build": "bun build ./index.ts", 8 | "test": "bun test", 9 | "dev": "bun --watch run index.ts" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/development/bun/index.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, test } from "bun:test"; 2 | 3 | test("2 + 2", () => { 4 | expect(2 + 2).toBe(4); 5 | }); -------------------------------------------------------------------------------- /examples/development/bun/index.ts: -------------------------------------------------------------------------------- 1 | import figlet from 'figlet'; 2 | 3 | const server = Bun.serve({ 4 | port: 3000, 5 | fetch(req) { 6 | const body = figlet.textSync("Bun!"); 7 | return new Response(body); 8 | }, 9 | }); 10 | 11 | console.log(`Listening on http://localhost:${server.port} ...`); 12 | -------------------------------------------------------------------------------- /examples/development/bun/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bun", 3 | "module": "index.tx", 4 | "type": "module", 5 | "devDependencies": { 6 | "@types/bun": "latest" 7 | }, 8 | "peerDependencies": { 9 | "typescript": "^5.0.0" 10 | }, 11 | "dependencies": { 12 | "figlet": "^1.7.0" 13 | } 14 | } -------------------------------------------------------------------------------- /examples/development/csharp/hello-world/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | -------------------------------------------------------------------------------- /examples/development/csharp/hello-world/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "dotnet-sdk@latest" 4 | ], 5 | "shell": { 6 | "init_hook": null, 7 | "scripts": { 8 | "run_test": "dotnet run" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/development/csharp/hello-world/hello-world.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | hello-world 7 | enable 8 | enable 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/development/elixir/elixir_hello/.formatter.exs: -------------------------------------------------------------------------------- 1 | # Used by "mix format" 2 | [ 3 | inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] 4 | ] 5 | -------------------------------------------------------------------------------- /examples/development/elixir/elixir_hello/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "elixir@latest" 4 | ], 5 | "shell": { 6 | "init_hook": [ 7 | "mix deps.get" 8 | ], 9 | "scripts": { 10 | "run_test": "mix run" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/development/elixir/elixir_hello/lib/elixir_hello.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirHello do 2 | use Application 3 | @moduledoc """ 4 | Documentation for `ElixirHello`. 5 | """ 6 | 7 | @doc """ 8 | Hello world. 9 | 10 | ## Examples 11 | 12 | iex> ElixirHello.hello() 13 | :world 14 | 15 | """ 16 | def start(_type, _args) do 17 | IO.puts("Hello World!") 18 | Task.start(fn -> :timer.sleep(1000); IO.puts("Goodbye World"); exit(:shutdown) end) 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /examples/development/elixir/elixir_hello/lib/kv.exs: -------------------------------------------------------------------------------- 1 | defmodule KV do 2 | def start_link do 3 | Task.start_link(fn -> loop(%{}) end) 4 | end 5 | 6 | defp loop(map) do 7 | receive do 8 | {:get, key, caller} -> 9 | send caller, Map.get(map, key) 10 | loop(map) 11 | {:put, key, value} -> 12 | loop(Map.put(map,key,value)) 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /examples/development/elixir/elixir_hello/test/elixir_hello_test.exs: -------------------------------------------------------------------------------- 1 | defmodule ElixirHelloTest do 2 | use ExUnit.Case 3 | doctest ElixirHello 4 | 5 | test "greets the world" do 6 | assert ElixirHello.hello() == "Hello World!" 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /examples/development/elixir/elixir_hello/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | -------------------------------------------------------------------------------- /examples/development/fsharp/hello-world/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | -------------------------------------------------------------------------------- /examples/development/fsharp/hello-world/Program.fs: -------------------------------------------------------------------------------- 1 | // For more information see https://aka.ms/fsharp-console-apps 2 | 3 | [] 4 | let main args = 5 | let dotNetVersion = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription 6 | printfn "Installed version is %A" dotNetVersion 7 | 8 | let expectedVersionPrefix = ".NET 6" 9 | if (not (dotNetVersion.StartsWith(expectedVersionPrefix))) then 10 | raise (System.Exception(sprintf "Expected version %A but got version %A" expectedVersionPrefix dotNetVersion)) 11 | else 12 | 0 13 | -------------------------------------------------------------------------------- /examples/development/fsharp/hello-world/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "dotnet-sdk@latest" 4 | ], 5 | "shell": { 6 | "init_hook": null, 7 | "scripts": { 8 | "run_test": "dotnet run" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/development/fsharp/hello-world/hello-world.fsproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0 6 | hello_world 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/development/go/hello-world/.envrc: -------------------------------------------------------------------------------- 1 | # Automatically sets up your devbox environment whenever you cd into this 2 | # directory via our direnv integration: 3 | 4 | eval "$(devbox generate direnv --print-envrc)" 5 | 6 | # check out https://www.jetify.com/devbox/docs/ide_configuration/direnv/ 7 | # for more details 8 | -------------------------------------------------------------------------------- /examples/development/go/hello-world/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "go@1.19.8" 4 | ], 5 | "env": { 6 | "GOPATH": "$HOME/go/", 7 | "PATH": "$PATH:$HOME/go/bin" 8 | }, 9 | "shell": { 10 | "init_hook": [ 11 | "export \"GOROOT=$(go env GOROOT)\"" 12 | ], 13 | "scripts": { 14 | "run_test": "go run main.go" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /examples/development/go/hello-world/go.mod: -------------------------------------------------------------------------------- 1 | module example 2 | 3 | go 1.19 4 | -------------------------------------------------------------------------------- /examples/development/go/hello-world/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "runtime" 6 | ) 7 | 8 | func main() { 9 | expected := "go1.19.8" 10 | goVersion := runtime.Version() 11 | fmt.Printf("Go version: %s\n", goVersion) 12 | if goVersion != expected { 13 | panic(fmt.Errorf("expected version: %s, got: %s", expected, goVersion)) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/development/haskell/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "ghc@latest", 4 | "gmp@latest", 5 | "stack@latest", 6 | "cabal-install@latest", 7 | "zlib@latest", 8 | "hpack@latest" 9 | ], 10 | "env": { 11 | "PATH": "$PATH:/usr/bin" 12 | }, 13 | "shell": { 14 | "init_hook": null, 15 | "scripts": { 16 | "run_test": [ 17 | "cd my-project", 18 | "stack build", 19 | "stack exec my-project-exe" 20 | ] 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /examples/development/haskell/my-project/.gitignore: -------------------------------------------------------------------------------- 1 | .stack-work/ -------------------------------------------------------------------------------- /examples/development/haskell/my-project/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog for `my-project` 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to the 7 | [Haskell Package Versioning Policy](https://pvp.haskell.org/). 8 | 9 | ## Unreleased 10 | 11 | ## 0.1.0.0 - YYYY-MM-DD 12 | -------------------------------------------------------------------------------- /examples/development/haskell/my-project/README.md: -------------------------------------------------------------------------------- 1 | # Haskell 2 | 3 | This example was generated using `stack`. To generate a similar example, you can copy the devbox json and run `devbox shell`. 4 | 5 | Once your shell has activated, run: 6 | 7 | ``` 8 | stack new my-project 9 | cd my-project 10 | stack build 11 | stack exec my-project-exe 12 | ``` 13 | 14 | For more details, check out the [Haskell + Devbox Docs](https://www.jetify.com/devbox/docs/devbox_examples/languages/haskell/) 15 | -------------------------------------------------------------------------------- /examples/development/haskell/my-project/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /examples/development/haskell/my-project/app/Main.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Lib 4 | 5 | main :: IO () 6 | main = someFunc 7 | -------------------------------------------------------------------------------- /examples/development/haskell/my-project/src/Lib.hs: -------------------------------------------------------------------------------- 1 | module Lib 2 | ( someFunc 3 | ) where 4 | 5 | someFunc :: IO () 6 | someFunc = putStrLn "someFunc" 7 | -------------------------------------------------------------------------------- /examples/development/haskell/my-project/stack.yaml.lock: -------------------------------------------------------------------------------- 1 | # This file was autogenerated by Stack. 2 | # You should not edit this file by hand. 3 | # For more information, please see the documentation at: 4 | # https://docs.haskellstack.org/en/stable/lock_files 5 | 6 | packages: [] 7 | snapshots: 8 | - completed: 9 | sha256: 3770dfd79f5aed67acdcc65c4e7730adddffe6dba79ea723cfb0918356fc0f94 10 | size: 648660 11 | url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/4.yaml 12 | original: 13 | url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/4.yaml 14 | -------------------------------------------------------------------------------- /examples/development/haskell/my-project/test/Spec.hs: -------------------------------------------------------------------------------- 1 | main :: IO () 2 | main = putStrLn "Test suite not yet implemented" 3 | -------------------------------------------------------------------------------- /examples/development/java/gradle/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle/ 2 | build/ -------------------------------------------------------------------------------- /examples/development/java/gradle/hello-world/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file was generated by the Gradle 'init' task. 3 | * 4 | * This is a general purpose Gradle build. 5 | * Learn more about Gradle by exploring our samples at https://docs.gradle.org/7.5/samples 6 | */ 7 | 8 | apply plugin: 'java' 9 | apply plugin: 'application' 10 | 11 | sourceCompatibility = 17 12 | targetCompatibility = 17 13 | mainClassName = 'hello.HelloWorld' 14 | jar { 15 | manifest { 16 | attributes 'Main-Class': 'hello.HelloWorld' 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /examples/development/java/gradle/hello-world/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "gradle@latest", 4 | "jdk@19", 5 | "binutils@latest" 6 | ], 7 | "shell": { 8 | "init_hook": null, 9 | "scripts": { 10 | "run_test": [ 11 | "gradle build", 12 | "gradle run" 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /examples/development/java/gradle/hello-world/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file was generated by the Gradle 'init' task. 3 | * 4 | * The settings file is used to specify which projects to include in your build. 5 | * 6 | * Detailed information about configuring a multi-project build in Gradle can be found 7 | * in the user manual at https://docs.gradle.org/7.5/userguide/multi_project_builds.html 8 | */ 9 | 10 | rootProject.name = 'gradle-app' 11 | -------------------------------------------------------------------------------- /examples/development/java/gradle/hello-world/src/main/java/hello/HelloWorld.java: -------------------------------------------------------------------------------- 1 | package hello; 2 | 3 | public class HelloWorld { 4 | public static void main(String[] args) { 5 | 6 | System.out.println("Hello World from Gradle!"); 7 | } 8 | } -------------------------------------------------------------------------------- /examples/development/java/maven/.gitignore: -------------------------------------------------------------------------------- 1 | target/ -------------------------------------------------------------------------------- /examples/development/java/maven/hello-world/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "maven@latest", 4 | "jdk@19", 5 | "binutils@latest" 6 | ], 7 | "shell": { 8 | "init_hook": null, 9 | "scripts": { 10 | "run_test": [ 11 | "mvn package", 12 | "java -jar target/devbox-maven-app-1.0-SNAPSHOT.jar" 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /examples/development/java/maven/hello-world/src/main/java/com/devbox/mavenapp/App.java: -------------------------------------------------------------------------------- 1 | package com.devbox.mavenapp; 2 | 3 | /** 4 | * Hello world! 5 | * 6 | */ 7 | public class App { 8 | public static void main(String[] args) { 9 | System.out.println("Hello World!"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/development/java/maven/hello-world/src/test/java/com/devbox/mavenapp/AppTest.java: -------------------------------------------------------------------------------- 1 | package com.devbox.mavenapp; 2 | 3 | import static org.junit.Assert.assertTrue; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * Unit test for simple App. 9 | */ 10 | public class AppTest 11 | { 12 | /** 13 | * Rigorous Test :-) 14 | */ 15 | @Test 16 | public void shouldAnswerWithTrue() 17 | { 18 | assertTrue( true ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/development/nim/spinnytest/README.md: -------------------------------------------------------------------------------- 1 | # Nim Example 2 | 3 | Small test to demonstrate installing a package and running it with nim. 4 | 5 | ## Building 6 | 7 | ```bash 8 | devbox run nim-build 9 | ``` 10 | 11 | ## Running 12 | 13 | ```bash 14 | ./spinnytest 15 | ``` 16 | -------------------------------------------------------------------------------- /examples/development/nim/spinnytest/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "nim@1.6.12", 4 | "nimble-unwrapped@0.14", 5 | "openssl_1_1@latest" 6 | ], 7 | "shell": { 8 | "init_hook": null, 9 | "scripts": { 10 | "nim-build": "nimble build --threads:on" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/development/nim/spinnytest/spinnytest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/development/nim/spinnytest/spinnytest -------------------------------------------------------------------------------- /examples/development/nim/spinnytest/spinnytest.nim: -------------------------------------------------------------------------------- 1 | import spinny, os 2 | 3 | var spinner1 = newSpinny("Loading message ..".fgWhite, skDots) 4 | spinner1.setSymbolColor(fgBlue) 5 | spinner1.start 6 | 7 | sleep(2000) 8 | 9 | spinner1.success("Ta da! Hello World") 10 | 11 | -------------------------------------------------------------------------------- /examples/development/nim/spinnytest/spinnytest.nimble: -------------------------------------------------------------------------------- 1 | # Package 2 | 3 | version = "0.1.0" 4 | author = "Your Name" 5 | description = "Example .nimble file." 6 | license = "MIT" 7 | 8 | bin = @["spinnytest"] 9 | 10 | # Deps 11 | 12 | requires "nim >= 0.10.0" 13 | requires "spinny" -------------------------------------------------------------------------------- /examples/development/nodejs/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/git -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-npm/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "nodejs@18" 4 | ], 5 | "shell": { 6 | "init_hook": [ 7 | "npm install" 8 | ], 9 | "scripts": { 10 | "run_test": "npm run start" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-npm/index.js: -------------------------------------------------------------------------------- 1 | const NODE_MAJOR_VERSION = process.versions.node.split('.')[0]; 2 | if (!NODE_MAJOR_VERSION) { 3 | throw new Error('Node is not installed properly'); 4 | } 5 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-npm/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodejs-npm", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "name": "nodejs-npm" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-npm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodejs-npm", 3 | "main": "index.js", 4 | "scripts": { 5 | "build": "echo building...", 6 | "start": "node index.js" 7 | }, 8 | "dependencies": {} 9 | } 10 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-pnpm/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": ["nodejs@latest"], 3 | "env": { 4 | "DEVBOX_COREPACK_ENABLED": "true" 5 | }, 6 | "shell": { 7 | "init_hook": [ 8 | "pnpm install" 9 | ], 10 | "scripts": { 11 | "run_test": "pnpm run start" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-pnpm/index.js: -------------------------------------------------------------------------------- 1 | const NODE_MAJOR_VERSION = process.versions.node.split('.')[0]; 2 | if (!NODE_MAJOR_VERSION) { 3 | throw new Error('Node is not installed properly'); 4 | } 5 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-pnpm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodejs-pnpm", 3 | "main": "index.js", 4 | "scripts": { 5 | "build": "echo building...", 6 | "start": "node index.js" 7 | }, 8 | "dependencies": {}, 9 | "packageManager": "pnpm@8.15.4" 10 | } -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-pnpm/pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: '6.0' 2 | 3 | settings: 4 | autoInstallPeers: true 5 | excludeLinksFromLockfile: false 6 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-typescript/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-typescript/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "nodejs@18" 4 | ], 5 | "shell": { 6 | "init_hook": [ 7 | "npm install", 8 | "npm run build" 9 | ], 10 | "scripts": { 11 | "run_test": "npm run start" 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-typescript/index.js: -------------------------------------------------------------------------------- 1 | var NODE_MAJOR_VERSION = process.versions.node.split('.')[0]; 2 | if (NODE_MAJOR_VERSION !== "18") { 3 | throw new Error('Node version is not 18'); 4 | } 5 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-typescript/index.ts: -------------------------------------------------------------------------------- 1 | const NODE_MAJOR_VERSION = process.versions.node.split('.')[0]; 2 | if (NODE_MAJOR_VERSION !== "18") { 3 | throw new Error('Node version is not 18'); 4 | } else { 5 | console.log('Node version is 18'); 6 | } 7 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-typescript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodejs-typescript", 3 | "main": "index.js", 4 | "scripts": { 5 | "build": "tsc index.ts --outfile index.js", 6 | "start": "node index.js" 7 | }, 8 | "devDependencies": { 9 | "@types/node": "^18.7.18", 10 | "typescript": "^4.6.4" 11 | }, 12 | "engines": { 13 | "node": ">=18" 14 | } 15 | } -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-typescript/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/node@^18.7.18": 6 | version "18.7.18" 7 | resolved "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz" 8 | integrity sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg== 9 | 10 | typescript@^4.6.4: 11 | version "4.8.3" 12 | resolved "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz" 13 | integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig== 14 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-yarn/.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-yarn/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": ["nodejs@latest"], 3 | "env": { 4 | "DEVBOX_COREPACK_ENABLED": "true" 5 | }, 6 | "shell": { 7 | "init_hook": [ 8 | "yarn install" 9 | ], 10 | "scripts": { 11 | "run_test": "yarn start" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-yarn/index.js: -------------------------------------------------------------------------------- 1 | const NODE_MAJOR_VERSION = process.versions.node.split('.')[0]; 2 | if (!NODE_MAJOR_VERSION) { 3 | throw new Error('Node is not installed properly'); 4 | } 5 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-yarn/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodejs-yarn", 3 | "main": "index.js", 4 | "license": "MIT", 5 | "scripts": { 6 | "build": "echo building...", 7 | "start": "node index.js" 8 | }, 9 | "version": "0.0.0", 10 | "packageManager": "yarn@4.1.1" 11 | } 12 | -------------------------------------------------------------------------------- /examples/development/nodejs/nodejs-yarn/yarn.lock: -------------------------------------------------------------------------------- 1 | # This file is generated by running "yarn install" inside your project. 2 | # Manual changes might be lost - proceed with caution! 3 | 4 | __metadata: 5 | version: 8 6 | cacheKey: 10c0 7 | 8 | "nodejs-yarn@workspace:.": 9 | version: 0.0.0-use.local 10 | resolution: "nodejs-yarn@workspace:." 11 | languageName: unknown 12 | linkType: soft 13 | -------------------------------------------------------------------------------- /examples/development/php/latest/.envrc: -------------------------------------------------------------------------------- 1 | # Automatically sets up your devbox environment whenever you cd into this 2 | # directory via our direnv integration: 3 | 4 | eval "$(devbox generate direnv --print-envrc)" 5 | 6 | # check out https://www.jetify.com/devbox/docs/ide_configuration/direnv/ 7 | # for more details 8 | -------------------------------------------------------------------------------- /examples/development/php/latest/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ -------------------------------------------------------------------------------- /examples/development/php/latest/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "ext-mbstring": "*", 4 | "ext-imagick": "*", 5 | "php": "^8.1" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /examples/development/php/latest/devbox.d/php/php-fpm.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | pid = ${PHPFPM_PID_FILE} 3 | error_log = ${PHPFPM_ERROR_LOG_FILE} 4 | daemonize = yes 5 | 6 | [www] 7 | ; user = www-data 8 | ; group = www-data 9 | listen = 127.0.0.1:${PHPFPM_PORT} 10 | ; listen.owner = www-data 11 | ; listen.group = www-data 12 | pm = dynamic 13 | pm.max_children = 5 14 | pm.start_servers = 2 15 | pm.min_spare_servers = 1 16 | pm.max_spare_servers = 3 17 | chdir = / 18 | -------------------------------------------------------------------------------- /examples/development/php/latest/devbox.d/php/php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | 3 | ; Put your php.ini directives here. For the latest default php.ini file, see https://github.com/php/php-src/blob/master/php.ini-production 4 | 5 | ; memory_limit = 128M 6 | ; expose_php = Off 7 | 8 | xdebug.mode = debug 9 | -------------------------------------------------------------------------------- /examples/development/php/latest/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "php83Extensions.xdebug@latest", 4 | "php83Extensions.imagick@latest", 5 | "php@latest" 6 | ], 7 | "env": { 8 | "PHPRC": "$PWD/devbox.d/php" 9 | }, 10 | "shell": { 11 | "init_hook": [ 12 | "composer install" 13 | ], 14 | "scripts": { 15 | "run_test": "php public/index.php" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /examples/development/php/latest/public/index.php: -------------------------------------------------------------------------------- 1 | "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | emoji = "^2.1.0" 10 | 11 | [tool.poetry.dev-dependencies] 12 | pytest = "^7.2.2" 13 | 14 | [build-system] 15 | requires = ["poetry-core>=1.0.0"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /examples/development/python/poetry/poetry-demo/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/development/python/poetry/poetry-demo/tests/__init__.py -------------------------------------------------------------------------------- /examples/development/python/poetry/poetry-demo/tests/test_poetry_demo.py: -------------------------------------------------------------------------------- 1 | from poetry_demo import __version__ 2 | 3 | 4 | def test_version(): 5 | assert __version__ == '0.1.0' 6 | -------------------------------------------------------------------------------- /examples/development/python/poetry/poetry-pyproject-subdir/README.md: -------------------------------------------------------------------------------- 1 | ## Poetry in a monorepo 2 | 3 | This example demonstrates using a poetry project in a sub-folder (`services` in this case) 4 | by specifying the `DEVBOX_PYPROJECT_DIR` that the poetry plugin can use. 5 | -------------------------------------------------------------------------------- /examples/development/python/poetry/poetry-pyproject-subdir/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "poetry@latest", 4 | "python3@latest" 5 | ], 6 | "env": { 7 | "DEVBOX_PYPROJECT_DIR": "$PWD/service" 8 | }, 9 | "shell": { 10 | "init_hook": [ 11 | "echo 'Welcome to devbox!' > /dev/null" 12 | ], 13 | "scripts": { 14 | "install-service":[ 15 | "cd service", 16 | "poetry install" 17 | ], 18 | "run_test": [ 19 | "devbox run install-service", 20 | "cd service && poetry run pytest" 21 | ] 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /examples/development/python/poetry/poetry-pyproject-subdir/frontend/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/development/python/poetry/poetry-pyproject-subdir/frontend/.empty -------------------------------------------------------------------------------- /examples/development/python/poetry/poetry-pyproject-subdir/service/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "poetry-pyproject-subdir-service" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Savil Srivastava <676452+savil@users.noreply.github.com>"] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | emoji = "^2.1.0" 10 | 11 | [tool.poetry.dev-dependencies] 12 | pytest = "^7.2.2" 13 | 14 | [build-system] 15 | requires = ["poetry-core>=1.0.0"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /examples/development/python/poetry/poetry-pyproject-subdir/service/test_with_pytest.py: -------------------------------------------------------------------------------- 1 | 2 | def test_always_passes(): 3 | assert True 4 | 5 | #def test_always_fails(): 6 | # assert False 7 | -------------------------------------------------------------------------------- /examples/development/ruby/.envrc: -------------------------------------------------------------------------------- 1 | # Automatically sets up your devbox environment whenever you cd into this 2 | # directory via our direnv integration: 3 | 4 | eval "$(devbox generate direnv --print-envrc)" 5 | 6 | # check out https://www.jetify.com/devbox/docs/ide_configuration/direnv/ 7 | # for more details 8 | -------------------------------------------------------------------------------- /examples/development/ruby/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "bundler@2.4", 4 | "ruby@3.1" 5 | ], 6 | "shell": { 7 | "init_hook": [], 8 | "scripts": { 9 | "run_test": "ruby -e 'puts \"Hello from Ruby #{RUBY_VERSION}\"'" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/development/ruby/hello.rb: -------------------------------------------------------------------------------- 1 | puts "Hello World!" -------------------------------------------------------------------------------- /examples/development/rust/README.md: -------------------------------------------------------------------------------- 1 | # Rust Example 2 | 3 | A Devbox Shell for running Rust 4 | 5 | ## Configuration 6 | 7 | This project adds the `rustup` package to your devbox shell, and then uses that package to install the right Rust toolchain locally in your project directory (set by the `RUSTUP_HOME` environment variable in `conf/set-env.sh`). 8 | 9 | To change the version of Rust you want to use, you should modify the `rustup default stable` line in the `init_hook` of this project's `devbox.json`. 10 | 11 | ## How to Run 12 | 13 | * Build the project 14 | 15 | ```bash 16 | cargo build 17 | ``` 18 | 19 | * Run the project 20 | 21 | ```bash 22 | cargo run 23 | ``` 24 | -------------------------------------------------------------------------------- /examples/development/rust/rust-stable-hello-world/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .rustup/ -------------------------------------------------------------------------------- /examples/development/rust/rust-stable-hello-world/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "rust-stable-hello-world" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /examples/development/rust/rust-stable-hello-world/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust-stable-hello-world" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /examples/development/rust/rust-stable-hello-world/conf/set-env.sh: -------------------------------------------------------------------------------- 1 | echo "project dir is ${PROJECT_DIR}" 2 | 3 | rustupHomeDir="${PROJECT_DIR}/.rustup" 4 | mkdir -p "${rustupHomeDir}" 5 | export RUSTUP_HOME="${rustupHomeDir}" 6 | export LIBRARY_PATH="${LIBRARY_PATH}:${PROJECT_DIR}/nix/profile/default/lib" 7 | -------------------------------------------------------------------------------- /examples/development/rust/rust-stable-hello-world/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "rustup@latest", 4 | "libiconv@latest" 5 | ], 6 | "env": { 7 | "PROJECT_DIR": "$PWD" 8 | }, 9 | "shell": { 10 | "init_hook": [ 11 | ". conf/set-env.sh", 12 | "rustup default stable", 13 | "cargo fetch" 14 | ], 15 | "scripts": { 16 | "build-docs": "cargo doc", 17 | "start": "cargo run", 18 | "run_test": [ 19 | "cargo test -- --show-output" 20 | ] 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/development/rust/rust-stable-hello-world/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!("{}", hello_world()) 3 | } 4 | 5 | fn hello_world() -> &'static str { 6 | return "Hello, world!"; 7 | } 8 | 9 | #[cfg(test)] 10 | mod tests { 11 | use super::*; 12 | 13 | #[test] 14 | fn test_hello_world() { 15 | assert_eq!(hello_world(), "Hello, world!") 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/development/zig/README.md: -------------------------------------------------------------------------------- 1 | # Zig Example 2 | 3 | A Devbox Shell for running Zig 4 | 5 | ## How to Run 6 | 7 | * Build the project 8 | 9 | ```bash 10 | zig build install 11 | ``` 12 | 13 | * Run the project 14 | 15 | ```bash 16 | zig build run 17 | ``` 18 | -------------------------------------------------------------------------------- /examples/development/zig/zig-hello-world/.gitignore: -------------------------------------------------------------------------------- 1 | zig-cache/ 2 | zig-out/ 3 | -------------------------------------------------------------------------------- /examples/development/zig/zig-hello-world/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": { 3 | "zig": "latest" 4 | }, 5 | "shell": { 6 | "scripts": { 7 | "run_test": "zig build run test --summary all" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/development/zig/zig-hello-world/src/main.zig: -------------------------------------------------------------------------------- 1 | const std = @import("std"); 2 | 3 | pub fn main() anyerror!void { 4 | std.log.info("Hello World! You are running zig.", .{}); 5 | } 6 | 7 | test "basic test" { 8 | try std.testing.expectEqual(10, 3 + 7); 9 | } 10 | -------------------------------------------------------------------------------- /examples/flakes/go-mod/.gitignore: -------------------------------------------------------------------------------- 1 | ory-cli/result/* 2 | -------------------------------------------------------------------------------- /examples/flakes/go-mod/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "path:ory-cli#ory-cli" 4 | ], 5 | "shell": { 6 | "init_hook": null 7 | }, 8 | "nixpkgs": { 9 | "commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/flakes/go-mod/devbox.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfile_version": "1", 3 | "packages": {} 4 | } 5 | -------------------------------------------------------------------------------- /examples/flakes/overlay/.nvmrc: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /examples/flakes/overlay/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "path:yarn-overlay#yarn", 4 | "fnm@latest", 5 | "nodejs@16.8" 6 | ], 7 | "shell": { 8 | "init_hook": [ 9 | "eval \"$(fnm env --use-on-cd)\"" 10 | ] 11 | }, 12 | "nixpkgs": { 13 | "commit": "eabc38219184cc3e04a974fe31857d8e0eac098d" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/flakes/overlay/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nix-yarn-issue", 3 | "version": "1.0.0", 4 | "license": "MIT", 5 | "scripts": { 6 | "start": "echo 'it should run'" 7 | }, 8 | "engines": { 9 | "node": ">= 16" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/flakes/overlay/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/flakes/php-extension/README.md: -------------------------------------------------------------------------------- 1 | # Adding a custom PHP Extension 2 | 3 | This example shows how to add a custom PHP extension to a PHP package using Flakes. This uses an extension built from the [PHP Skeleton Extension](https://github.com/improved-php-library/skeleton-php-ext) from [Improved PHP Library](https://github.com/improved-php-library) 4 | 5 | To test this example: 6 | 7 | 1. Run `devbox shell` to start your shell 8 | 2. Start PHP in interactive mode with `php -a` 9 | 3. Run `echo skeleton_nop("Hello World");` to test the extension. This should print `Hello World` to the screen 10 | -------------------------------------------------------------------------------- /examples/flakes/php-extension/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "path:my-php-flake" 4 | ], 5 | "shell": { 6 | "init_hook": null 7 | }, 8 | "nixpkgs": { 9 | "commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/flakes/php-extension/devbox.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfile_version": "1", 3 | "packages": {} 4 | } 5 | -------------------------------------------------------------------------------- /examples/flakes/php-extension/my-php-flake/skeleton.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/flakes/php-extension/my-php-flake/skeleton.so -------------------------------------------------------------------------------- /examples/flakes/php/README.md: -------------------------------------------------------------------------------- 1 | # Custom PHP Flakes example 2 | 3 | Shows how to install a custom version of PHP using flakes. This PHP contains the ds and memcached extensions. 4 | 5 | It also shows how you can import multiple outputs from a single flake. (php, hello) 6 | -------------------------------------------------------------------------------- /examples/flakes/php/devbox.d/php/php-fpm.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | pid = ${PHPFPM_PID_FILE} 3 | error_log = ${PHPFPM_ERROR_LOG_FILE} 4 | daemonize = yes 5 | 6 | [www] 7 | ; user = www-data 8 | ; group = www-data 9 | listen = 127.0.0.1:${PHPFPM_PORT} 10 | ; listen.owner = www-data 11 | ; listen.group = www-data 12 | pm = dynamic 13 | pm.max_children = 5 14 | pm.start_servers = 2 15 | pm.min_spare_servers = 1 16 | pm.max_spare_servers = 3 17 | chdir = / 18 | -------------------------------------------------------------------------------- /examples/flakes/php/devbox.d/php/php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | 3 | ; Put your php.ini directives here. For the latest default php.ini file, see https://github.com/php/php-src/blob/master/php.ini-production 4 | 5 | ; memory_limit = 128M 6 | ; expose_php = Off 7 | -------------------------------------------------------------------------------- /examples/flakes/php/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "path:my-php-flake#php", 4 | "path:my-php-flake#hello" 5 | ], 6 | "shell": { 7 | "init_hook": null, 8 | "scripts": { 9 | "run_test": "php -m | grep ds || exit 1" 10 | } 11 | }, 12 | "nixpkgs": { 13 | "commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/flakes/php/devbox.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfile_version": "1", 3 | "packages": { 4 | "path:my-php-flake#hello": {}, 5 | "path:my-php-flake#php": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /examples/flakes/remote/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#hello", 4 | "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#cowsay", 5 | "github:F1bonacc1/process-compose/v0.43.1" 6 | ], 7 | "shell": { 8 | "init_hook": null, 9 | "scripts": { 10 | "run_test": "cowsay -- hello" 11 | } 12 | }, 13 | "nixpkgs": { 14 | "commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /examples/flakes/remote/devbox.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfile_version": "1", 3 | "packages": { 4 | "github:F1bonacc1/process-compose/v0.43.1": {}, 5 | "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#cowsay": {}, 6 | "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#hello": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/insecure/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": { 3 | "nodejs": { 4 | "version": "16", 5 | "allow_insecure": ["nodejs-16.20.2"] 6 | } 7 | }, 8 | "shell": { 9 | "init_hook": "echo 'Welcome to devbox!' > /dev/null", 10 | "scripts": { 11 | "run_test": "node --version" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/plugins/builtin/devbox.d/php82/php-fpm.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | pid = ${PHPFPM_PID_FILE} 3 | error_log = ${PHPFPM_ERROR_LOG_FILE} 4 | daemonize = yes 5 | 6 | [www] 7 | ; user = www-data 8 | ; group = www-data 9 | listen = 127.0.0.1:${PHPFPM_PORT} 10 | ; listen.owner = www-data 11 | ; listen.group = www-data 12 | pm = dynamic 13 | pm.max_children = 5 14 | pm.start_servers = 2 15 | pm.min_spare_servers = 1 16 | pm.max_spare_servers = 3 17 | chdir = / 18 | -------------------------------------------------------------------------------- /examples/plugins/builtin/devbox.d/php82/php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | 3 | ; Put your php.ini directives here. For the latest default php.ini file, see https://github.com/php/php-src/blob/master/php.ini-production 4 | 5 | ; memory_limit = 128M 6 | ; expose_php = Off 7 | -------------------------------------------------------------------------------- /examples/plugins/builtin/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [], 3 | "shell": { 4 | "init_hook": [ 5 | "echo 'Welcome to devbox!' > /dev/null" 6 | ], 7 | "scripts": { 8 | "run_test": [ 9 | "test -n \"$PHPRC\" || exit 1" 10 | ] 11 | } 12 | }, 13 | "include": [ 14 | // Installs the php plugin using php82 as trigger package 15 | "plugin:php82" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /examples/plugins/builtin/devbox.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfile_version": "1", 3 | "packages": {} 4 | } 5 | -------------------------------------------------------------------------------- /examples/plugins/github-with-revision/devbox.d/jetpack-io-devbox-plugin-example/some-file.txt: -------------------------------------------------------------------------------- 1 | some data 2 | -------------------------------------------------------------------------------- /examples/plugins/github-with-revision/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [], 3 | "shell": { 4 | "init_hook": [ 5 | "echo 'Welcome to devbox!' > /dev/null" 6 | ], 7 | "scripts": { 8 | "run_test": [ 9 | "./test.sh" 10 | ] 11 | } 12 | }, 13 | "include": [ 14 | "github:jetify-com/devbox-plugin-example/d9c00334353c9b1294c7bd5dbea128c149b2eb3a" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /examples/plugins/github-with-revision/devbox.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfile_version": "1", 3 | "packages": {} 4 | } 5 | -------------------------------------------------------------------------------- /examples/plugins/github-with-revision/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | expected="I AM SET" 4 | if [ "$MY_ENV_VAR" == "$expected" ]; then 5 | echo "Success! MY_ENV_VAR is set to '$MY_ENV_VAR'" 6 | else 7 | echo "MY_ENV_VAR environment variable is not set to '$expected'" 8 | exit 1 9 | fi 10 | -------------------------------------------------------------------------------- /examples/plugins/github/devbox.d/jetify-com.devbox-plugin-example.my-github-plugin/some-file.txt: -------------------------------------------------------------------------------- 1 | some data 2 | -------------------------------------------------------------------------------- /examples/plugins/github/devbox.d/jetpack-io-devbox-plugin-example/some-file.txt: -------------------------------------------------------------------------------- 1 | some data 2 | -------------------------------------------------------------------------------- /examples/plugins/github/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [], 3 | "shell": { 4 | "init_hook": [ 5 | "echo 'Welcome to devbox!' > /dev/null" 6 | ], 7 | "scripts": { 8 | "run_test": [ 9 | "./test.sh" 10 | ] 11 | } 12 | }, 13 | "include": [ 14 | "github:jetify-com/devbox-plugin-example", 15 | "github:jetify-com/devbox-plugin-example?dir=custom-dir", 16 | "github:jetify-com/devbox-plugin-example/test/branch", 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /examples/plugins/github/devbox.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfile_version": "1", 3 | "packages": {} 4 | } 5 | -------------------------------------------------------------------------------- /examples/plugins/github/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | expected="I AM SET (new value)" 4 | custom_expected="I AM SET TO CUSTOM (new value)" 5 | if [ "$MY_ENV_VAR" == "$expected" ] && [ "$MY_ENV_VAR_CUSTOM" == "$custom_expected" ]; then 6 | echo "Success! MY_ENV_VAR is set to '$MY_ENV_VAR'" 7 | echo "Success! MY_ENV_VAR_CUSTOM is set to '$MY_ENV_VAR_CUSTOM'" 8 | else 9 | echo "ERROR: MY_ENV_VAR environment variable is not set to '$expected' OR MY_ENV_VAR_CUSTOM variable is not set to '$custom_expected'" 10 | exit 1 11 | fi 12 | 13 | echo BRANCH_ENV_VAR=$BRANCH_ENV_VAR 14 | if [ "$BRANCH_ENV_VAR" != "I AM A BRANCH VAR" ]; then exit 1; fi; 15 | -------------------------------------------------------------------------------- /examples/plugins/local/README.md: -------------------------------------------------------------------------------- 1 | # Custom plugin example 2 | 3 | Shows how to write custom local plugin. Plugins can: 4 | 5 | * Install packages 6 | * Create templatized files (including flakes) 7 | * Declare services (using process-compose) 8 | -------------------------------------------------------------------------------- /examples/plugins/local/devbox.d/my-plugin/some-file.txt: -------------------------------------------------------------------------------- 1 | some data 2 | -------------------------------------------------------------------------------- /examples/plugins/local/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [], 3 | "shell": { 4 | "init_hook": [ 5 | "echo 'Welcome to devbox!' > /dev/null" 6 | ], 7 | "scripts": { 8 | "run_test": [ 9 | "./test.sh" 10 | ] 11 | } 12 | }, 13 | "include": [ 14 | "path:my-plugin/plugin.json" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /examples/plugins/local/devbox.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfile_version": "1", 3 | "packages": {} 4 | } 5 | -------------------------------------------------------------------------------- /examples/plugins/local/my-plugin/process-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "0.5" 2 | 3 | processes: 4 | my-plugin-service: 5 | command: echo "success" && tail -f /dev/null 6 | availability: 7 | restart: "always" 8 | -------------------------------------------------------------------------------- /examples/plugins/local/my-plugin/some-file.txt: -------------------------------------------------------------------------------- 1 | some data 2 | -------------------------------------------------------------------------------- /examples/plugins/local/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$MY_FOO_VAR" ]; then 4 | echo "MY_FOO_VAR environment variable is not set." 5 | exit 1 6 | else 7 | echo "MY_FOO_VAR is set to '$MY_FOO_VAR'" 8 | fi 9 | 10 | if [ -z "$MY_INIT_HOOK_VAR" ]; then 11 | echo "MY_INIT_HOOK_VAR environment variable is not set." 12 | exit 1 13 | else 14 | echo "MY_INIT_HOOK_VAR is set to '$MY_INIT_HOOK_VAR'" 15 | fi 16 | -------------------------------------------------------------------------------- /examples/plugins/v2-github/devbox.d/jetpack-io-devbox-plugin-example/some-file.txt: -------------------------------------------------------------------------------- 1 | some data 2 | -------------------------------------------------------------------------------- /examples/plugins/v2-github/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [], 3 | "shell": { 4 | "init_hook": [ 5 | "echo 'Welcome to devbox!' > /dev/null" 6 | ], 7 | "scripts": { 8 | "run_test": [ 9 | "./test.sh" 10 | ] 11 | } 12 | }, 13 | "include": [ 14 | // TODO, make these more interesting by adding v2 capabilities 15 | "github:jetify-com/devbox-plugin-example", 16 | "github:jetify-com/devbox-plugin-example?dir=custom-dir" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /examples/plugins/v2-github/devbox.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfile_version": "1", 3 | "packages": {} 4 | } 5 | -------------------------------------------------------------------------------- /examples/plugins/v2-github/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | expected="I AM SET (new value)" 4 | custom_expected="I AM SET TO CUSTOM (new value)" 5 | if [ "$MY_ENV_VAR" == "$expected" ] && [ "$MY_ENV_VAR_CUSTOM" == "$custom_expected" ]; then 6 | echo "Success! MY_ENV_VAR is set to '$MY_ENV_VAR'" 7 | echo "Success! MY_ENV_VAR_CUSTOM is set to '$MY_ENV_VAR_CUSTOM'" 8 | else 9 | echo "ERROR: MY_ENV_VAR environment variable is not set to '$expected' OR MY_ENV_VAR_CUSTOM variable is not set to '$custom_expected'" 10 | exit 1 11 | fi 12 | -------------------------------------------------------------------------------- /examples/plugins/v2-local/devbox.d/plugin1/foo.txt: -------------------------------------------------------------------------------- 1 | something 2 | -------------------------------------------------------------------------------- /examples/plugins/v2-local/plugin1/foo.txt: -------------------------------------------------------------------------------- 1 | something 2 | -------------------------------------------------------------------------------- /examples/plugins/v2-local/plugin1/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "plugin1", 3 | "packages": ["hello@latest"], 4 | "env": { 5 | "PLUGIN1_ENV": "success", 6 | "PLUGIN1_ENV2": "success" 7 | }, 8 | "shell": { 9 | "init_hook": [ 10 | "export PLUGIN1_INIT_HOOK=success" 11 | ], 12 | "scripts": { 13 | "plugin_1_script": [ 14 | "echo success" 15 | ] 16 | } 17 | }, 18 | "create_files": { 19 | "{{ .DevboxDir }}/foo.txt": "foo.txt", 20 | "{{ .Virtenv }}/process-compose.yaml": "process-compose.yaml" 21 | }, 22 | "include": [ 23 | "./plugin1a" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /examples/plugins/v2-local/plugin1/plugin1a/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "plugin1a", 3 | "packages": ["cowsay@latest"], 4 | "env": { 5 | "PLUGIN1A_ENV": "success" 6 | }, 7 | "shell": { 8 | "init_hook": [ 9 | "export PLUGIN1A_INIT_HOOK=success" 10 | ], 11 | "scripts": { 12 | "plugin_1A_script": [ 13 | "echo success" 14 | ] 15 | } 16 | }, 17 | "include": [ 18 | "../../plugin2" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /examples/plugins/v2-local/plugin1/process-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "0.5" 2 | 3 | processes: 4 | plugin1-service: 5 | command: "echo 'Hello from plugin1' && sleep 1000" 6 | availability: 7 | restart: "always" 8 | 9 | -------------------------------------------------------------------------------- /examples/plugins/v2-local/plugin2/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "plugin2", 3 | "create_files": { 4 | "{{ .Virtenv }}/process-compose.yaml": "process-compose.yaml" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /examples/plugins/v2-local/plugin2/process-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "0.5" 2 | 3 | processes: 4 | plugin2-service: 5 | command: "echo 'Hello from plugin2' && sleep 1000" 6 | availability: 7 | restart: "always" 8 | 9 | -------------------------------------------------------------------------------- /examples/plugins/v2-local/plugin3/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "plugin3" 3 | } 4 | -------------------------------------------------------------------------------- /examples/servers/apache/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | *.pid 3 | *.sock 4 | -------------------------------------------------------------------------------- /examples/servers/apache/devbox.d/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | Hello World! 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/servers/apache/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json", 3 | "packages": ["apacheHttpd@2.4.58"], 4 | "shell": { 5 | "init_hook": [ 6 | "echo 'Welcome to devbox!' > /dev/null" 7 | ], 8 | "scripts": { 9 | "start": "apachectl start -f $HTTPD_CONFDIR/httpd.conf -D FOREGROUND" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/servers/caddy/devbox.d/caddy/Caddyfile: -------------------------------------------------------------------------------- 1 | # See https://caddyserver.com/docs/caddyfile for more details 2 | { 3 | admin 0.0.0.0:2020 4 | auto_https disable_certs 5 | http_port 8080 6 | https_port 4443 7 | } 8 | 9 | :8080 { 10 | root * {$CADDY_ROOT_DIR} 11 | log { 12 | output file {$CADDY_LOG_DIR}/caddy.log 13 | } 14 | file_server 15 | } 16 | -------------------------------------------------------------------------------- /examples/servers/caddy/devbox.d/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | Hello World! 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/servers/caddy/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "caddy@latest" 4 | ], 5 | "shell": { 6 | "init_hook": [], 7 | "scripts": { 8 | "start": "caddy run --config=devbox.d/caddy/Caddyfile" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/servers/nginx/.envrc: -------------------------------------------------------------------------------- 1 | # Automatically sets up your devbox environment whenever you cd into this 2 | # directory via our direnv integration: 3 | 4 | eval "$(devbox generate direnv --print-envrc)" 5 | 6 | # check out https://www.jetify.com/devbox/docs/ide_configuration/direnv/ 7 | # for more details 8 | -------------------------------------------------------------------------------- /examples/servers/nginx/.gitignore: -------------------------------------------------------------------------------- 1 | conf/mysql/data 2 | *.log 3 | *.pid 4 | *.sock -------------------------------------------------------------------------------- /examples/servers/nginx/devbox.d/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | events {} 2 | http{ 3 | server { 4 | listen 8081; 5 | listen [::]:8081; 6 | server_name localhost; 7 | root ../../../devbox.d/web; 8 | 9 | error_log error.log error; 10 | access_log access.log; 11 | client_body_temp_path temp/client_body; 12 | proxy_temp_path temp/proxy; 13 | fastcgi_temp_path temp/fastcgi; 14 | uwsgi_temp_path temp/uwsgi; 15 | scgi_temp_path temp/scgi; 16 | 17 | index index.html; 18 | server_tokens off; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/servers/nginx/devbox.d/nginx/nginx.template: -------------------------------------------------------------------------------- 1 | events {} 2 | http{ 3 | server { 4 | listen $NGINX_WEB_PORT; 5 | listen [::]:$NGINX_WEB_PORT; 6 | server_name $NGINX_WEB_SERVER_NAME; 7 | root $NGINX_WEB_ROOT; 8 | 9 | error_log error.log error; 10 | access_log access.log; 11 | client_body_temp_path temp/client_body; 12 | proxy_temp_path temp/proxy; 13 | fastcgi_temp_path temp/fastcgi; 14 | uwsgi_temp_path temp/uwsgi; 15 | scgi_temp_path temp/scgi; 16 | 17 | index index.html; 18 | server_tokens off; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/servers/nginx/devbox.d/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | Hello World! 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/servers/nginx/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "nginx@latest" 4 | ], 5 | "env": { 6 | "NGINX_WEB_PORT": "8080" 7 | }, 8 | "shell": { 9 | "scripts": { 10 | "build": "if [ -f $NGINX_CONFDIR/nginx.template ]; then envsubst $(awk 'BEGIN {for (k in ENVIRON) {printf \"$\"k\",\"}}') < $NGINX_CONFDIR/nginx.template > $NGINX_CONFDIR/nginx.conf; fi", 11 | "start": "nginx -p $NGINX_PATH_PREFIX -c $NGINX_CONFDIR/nginx.conf -e error.log -g \"pid nginx.pid;daemon off;\"" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/stacks/django/.gitignore: -------------------------------------------------------------------------------- 1 | .venv/ 2 | __pycache__ 3 | .devbox.cloud -------------------------------------------------------------------------------- /examples/stacks/django/process-compose.yml: -------------------------------------------------------------------------------- 1 | # Process compose for starting django 2 | version: "0.5" 3 | 4 | processes: 5 | django: 6 | command: python todo_project/manage.py runserver 7 | availability: 8 | restart: "always" -------------------------------------------------------------------------------- /examples/stacks/django/requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.6.0 2 | Django==4.2.20 3 | psycopg2==2.9.5 4 | sqlparse==0.5.0 -------------------------------------------------------------------------------- /examples/stacks/django/todo_project/todo_app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/django/todo_project/todo_app/__init__.py -------------------------------------------------------------------------------- /examples/stacks/django/todo_project/todo_app/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /examples/stacks/django/todo_project/todo_app/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class TodoAppConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'todo_app' 7 | -------------------------------------------------------------------------------- /examples/stacks/django/todo_project/todo_app/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/django/todo_project/todo_app/migrations/__init__.py -------------------------------------------------------------------------------- /examples/stacks/django/todo_project/todo_app/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | class Todo(models.Model): 5 | title = models.CharField(max_length=255) 6 | completed = models.BooleanField(default=False) 7 | created_att = models.DateTimeField(auto_now_add=True) 8 | 9 | class Meta: 10 | app_label = 'todo_app' -------------------------------------------------------------------------------- /examples/stacks/django/todo_project/todo_app/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /examples/stacks/django/todo_project/todo_app/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from .models import Todo 3 | 4 | def todo_list(request): 5 | todos = Todo.objects.all() 6 | context = {'todos': todos} 7 | return render(request, 'todo_app/todo_list.html', context) 8 | 9 | def create_todo(request): 10 | if request.method == 'POST': 11 | title = request.POST.get('title') 12 | todo = Todo(title = title) 13 | todo.save() 14 | return redirect(todo_list) 15 | return render(request, 'todo_app/create_todo.html') 16 | -------------------------------------------------------------------------------- /examples/stacks/django/todo_project/todo_project/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/django/todo_project/todo_project/__init__.py -------------------------------------------------------------------------------- /examples/stacks/django/todo_project/todo_project/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for todo_project project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todo_project.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /examples/stacks/django/todo_project/todo_project/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for todo_project project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todo_project.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /examples/stacks/drupal/.editorconfig: -------------------------------------------------------------------------------- 1 | # Drupal editor configuration normalization 2 | # @see http://editorconfig.org/ 3 | 4 | # This is the top-most .editorconfig file; do not search in parent directories. 5 | root = true 6 | 7 | # All files. 8 | [*] 9 | end_of_line = LF 10 | indent_style = space 11 | indent_size = 2 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | insert_final_newline = true 15 | 16 | [composer.{json,lock}] 17 | indent_size = 4 18 | -------------------------------------------------------------------------------- /examples/stacks/drupal/devbox.d/.gitignore: -------------------------------------------------------------------------------- 1 | mysql/data 2 | nginx/temp 3 | *.log 4 | *.pid 5 | *.sock 6 | *.swp 7 | -------------------------------------------------------------------------------- /examples/stacks/drupal/devbox.d/php/php-fpm.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | pid = ${PHPFPM_PID_FILE} 3 | error_log = ${PHPFPM_ERROR_LOG_FILE} 4 | daemonize = yes 5 | 6 | [www] 7 | ; user = www-data 8 | ; group = www-data 9 | listen = 127.0.0.1:${PHPFPM_PORT} 10 | ; listen.owner = www-data 11 | ; listen.group = www-data 12 | pm = dynamic 13 | pm.max_children = 5 14 | pm.start_servers = 2 15 | pm.min_spare_servers = 1 16 | pm.max_spare_servers = 3 17 | chdir = / 18 | -------------------------------------------------------------------------------- /examples/stacks/drupal/devbox.d/php/php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | 3 | ; Put your php.ini directives here. For the latest default php.ini file, see https://github.com/php/php-src/blob/master/php.ini-production 4 | 5 | ; memory_limit = 128M 6 | ; expose_php = Off 7 | -------------------------------------------------------------------------------- /examples/stacks/drupal/devbox.d/web: -------------------------------------------------------------------------------- 1 | ../web -------------------------------------------------------------------------------- /examples/stacks/drupal/install-drupal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "Make sure to run this script only after 'devbox shell'" 6 | 7 | mysql -u root < setup_db.sql 8 | composer install 9 | 10 | echo "Your Drupal demo website is ready," 11 | echo "Open localhost:8081 in your browser." 12 | -------------------------------------------------------------------------------- /examples/stacks/drupal/setup_db.sql: -------------------------------------------------------------------------------- 1 | --- You should run this query using `mysql -u root < setup_db.sql` 2 | 3 | DROP DATABASE IF EXISTS devbox_drupal; 4 | CREATE DATABASE devbox_drupal; 5 | 6 | USE devbox_drupal 7 | 8 | CREATE USER IF NOT EXISTS 'devbox_user'@'localhost' IDENTIFIED BY 'password'; 9 | GRANT ALL PRIVILEGES ON devbox_drupal.* TO 'devbox_user'@'localhost' IDENTIFIED BY 'password'; 10 | 11 | -- Connect in drupal using: 12 | -- Database: devbox_drupal 13 | -- User: devbox_user 14 | -- Password: password 15 | -- Host: 127.0.0.1 16 | -- Port: 3306 17 | -------------------------------------------------------------------------------- /examples/stacks/drupal/web/.eslintignore: -------------------------------------------------------------------------------- 1 | core/**/* 2 | vendor/**/* 3 | sites/**/files/**/* 4 | libraries/**/* 5 | sites/**/libraries/**/* 6 | profiles/**/libraries/**/* 7 | **/js_test_files/**/* 8 | **/node_modules/**/* 9 | -------------------------------------------------------------------------------- /examples/stacks/drupal/web/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./core/.eslintrc.json" 3 | } 4 | -------------------------------------------------------------------------------- /examples/stacks/drupal/web/.gitignore: -------------------------------------------------------------------------------- 1 | /autoload.php -------------------------------------------------------------------------------- /examples/stacks/drupal/web/INSTALL.txt: -------------------------------------------------------------------------------- 1 | 2 | Read core/INSTALL.txt for detailed installation instructions for your Drupal 3 | website. 4 | -------------------------------------------------------------------------------- /examples/stacks/drupal/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | Hello World! 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/stacks/drupal/web/index.php: -------------------------------------------------------------------------------- 1 | handle($request); 20 | $response->send(); 21 | 22 | $kernel->terminate($request, $response); 23 | -------------------------------------------------------------------------------- /examples/stacks/drupal/web/sites/README.txt: -------------------------------------------------------------------------------- 1 | This directory structure contains the settings and configuration files specific 2 | to your site or sites and is an integral part of multisite configurations. 3 | 4 | It is now recommended to place your custom and downloaded extensions in the 5 | /modules, /themes, and /profiles directories located in the Drupal root. The 6 | sites/all/ subdirectory structure, which was recommended in previous versions 7 | of Drupal, is still supported. 8 | 9 | See core/INSTALL.txt for information about single-site installation or 10 | multisite configuration. 11 | -------------------------------------------------------------------------------- /examples/stacks/drupal/web/sites/development.services.yml: -------------------------------------------------------------------------------- 1 | # Local development services. 2 | # 3 | # To activate this feature, follow the instructions at the top of the 4 | # 'example.settings.local.php' file, which sits next to this file. 5 | parameters: 6 | http.response.debug_cacheability_headers: true 7 | services: 8 | cache.backend.null: 9 | class: Drupal\Core\Cache\NullBackendFactory 10 | -------------------------------------------------------------------------------- /examples/stacks/jekyll/.envrc: -------------------------------------------------------------------------------- 1 | # Automatically sets up your devbox environment whenever you cd into this 2 | # directory via our direnv integration: 3 | 4 | eval "$(devbox generate direnv --print-envrc)" 5 | 6 | # check out https://www.jetify.com/devbox/docs/ide_configuration/direnv/ 7 | # for more details 8 | -------------------------------------------------------------------------------- /examples/stacks/jekyll/myblog/.bundle/config: -------------------------------------------------------------------------------- 1 | --- 2 | BUNDLE_CACHE_ALL: "false" 3 | -------------------------------------------------------------------------------- /examples/stacks/jekyll/myblog/.gitignore: -------------------------------------------------------------------------------- 1 | _site 2 | .sass-cache 3 | .jekyll-metadata 4 | -------------------------------------------------------------------------------- /examples/stacks/jekyll/myblog/404.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | 18 | 19 |
20 |

404

21 | 22 |

Page not found :(

23 |

The requested page could not be found.

24 |
25 | -------------------------------------------------------------------------------- /examples/stacks/jekyll/myblog/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: About 4 | permalink: /about/ 5 | --- 6 | 7 | This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/) 8 | 9 | You can find the source code for Minima at GitHub: 10 | [jekyll][jekyll-organization] / 11 | [minima](https://github.com/jekyll/minima) 12 | 13 | You can find the source code for Jekyll at GitHub: 14 | [jekyll][jekyll-organization] / 15 | [jekyll](https://github.com/jekyll/jekyll) 16 | 17 | 18 | [jekyll-organization]: https://github.com/jekyll 19 | -------------------------------------------------------------------------------- /examples/stacks/jekyll/myblog/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | # Feel free to add content and custom Front Matter to this file. 3 | # To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults 4 | 5 | layout: home 6 | --- 7 | -------------------------------------------------------------------------------- /examples/stacks/jekyll/process-compose.yml: -------------------------------------------------------------------------------- 1 | # Process compose for starting jekyll 2 | version: "0.5" 3 | 4 | processes: 5 | jekyll: 6 | command: cd myblog && bundler exec $GEM_HOME/bin/jekyll serve 7 | availability: 8 | restart: "always" 9 | -------------------------------------------------------------------------------- /examples/stacks/lapp-stack/.gitignore: -------------------------------------------------------------------------------- 1 | conf/mysql/data 2 | *.swp 3 | *.log 4 | *.pid 5 | *.sock -------------------------------------------------------------------------------- /examples/stacks/lapp-stack/.testrc: -------------------------------------------------------------------------------- 1 | export foo=bar 2 | export foo2="This is a test" 3 | alias devbox=~/devbox/devbox 4 | 5 | -------------------------------------------------------------------------------- /examples/stacks/lapp-stack/devbox.d/php/php-fpm.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | pid = ${PHPFPM_PID_FILE} 3 | error_log = ${PHPFPM_ERROR_LOG_FILE} 4 | daemonize = yes 5 | 6 | [www] 7 | ; user = www-data 8 | ; group = www-data 9 | listen = 127.0.0.1:${PHPFPM_PORT} 10 | ; listen.owner = www-data 11 | ; listen.group = www-data 12 | pm = dynamic 13 | pm.max_children = 5 14 | pm.start_servers = 2 15 | pm.min_spare_servers = 1 16 | pm.max_spare_servers = 3 17 | chdir = / 18 | -------------------------------------------------------------------------------- /examples/stacks/lapp-stack/devbox.d/php/php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | 3 | ; Put your php.ini directives here. For the latest default php.ini file, see https://github.com/php/php-src/blob/master/php.ini-production 4 | 5 | ; memory_limit = 128M 6 | ; expose_php = Off 7 | -------------------------------------------------------------------------------- /examples/stacks/lapp-stack/devbox.d/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | Hello World! 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/stacks/lapp-stack/my_app/config.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | Hello World! 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/stacks/lepp-stack/my_app/config.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Blog 5 | 6 | <%= csrf_meta_tags %> 7 | <%= csp_meta_tag %> 8 | 9 | <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> 10 | 11 | 12 | 13 | <%= yield %> 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path("../config/application", __dir__) 3 | require_relative "../config/boot" 4 | require "rails/commands" 5 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative "../config/boot" 3 | require "rake" 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require_relative "config/environment" 4 | 5 | run Rails.application 6 | Rails.application.load_server 7 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) 2 | 3 | require "bundler/setup" # Set up gems listed in the Gemfile. 4 | require "bootsnap/setup" # Speed up boot time by caching expensive operations. 5 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: blog_production 11 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/config/credentials.yml.enc: -------------------------------------------------------------------------------- 1 | n7n2ZlGCTiWpFnYBrIdjcKX4apuj9a01dx5b/jDPk50RGB2pVCsUNcTTPG7meRILlgr6eYz1b2yH33yhHhAScp5GxJiGgGOBCZ0WJ59MCKDvDmfbggepyW57flZduTfggIcbcX3+KaSiR6tUoppepF8xiqq4MBvcSN2/QsYhiJhhT6Mclr5w5LOaDyrUQvMsRRBuINb78bEJNnrAs/osikgIP60l/Xw9H93s5hvZij6k7VUGET8ZtFoNfxtuieYbN8lJ+u/0NkVm9Nb9pLHEFG+xecKI2XHjRW2xYEUcOtctibAuagNDKBTZINlH5K2PN8kp5JojagKV5GEktul/WZ3GlLPTsK2HPfN8WKSlCb6ShfX2qeegmFFP12DPSelRk88ORqONVQY/Wt2YOrmHJCIXjH5hKt036qnK--pWEeoDmhJgEiyp9v--HcDsg0CciWSLb1jyARqGQA== -------------------------------------------------------------------------------- /examples/stacks/rails/blog/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative "application" 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Version of your assets, change this if you want to expire all your assets. 4 | Rails.application.config.assets.version = "1.0" 5 | 6 | # Add additional assets to the asset load path. 7 | # Rails.application.config.assets.paths << Emoji.images_path 8 | 9 | # Precompile additional assets. 10 | # application.js, application.css, and all non-JS/CSS in the app/assets 11 | # folder are already added. 12 | # Rails.application.config.assets.precompile += %w( admin.js admin.css ) 13 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure parameters to be filtered from the log file. Use this to limit dissemination of 4 | # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported 5 | # notations and behaviors. 6 | Rails.application.config.filter_parameters += [ 7 | :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn 8 | ] 9 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/config/initializers/permissions_policy.rb: -------------------------------------------------------------------------------- 1 | # Define an application-wide HTTP permissions policy. For further 2 | # information see https://developers.google.com/web/updates/2018/06/feature-policy 3 | # 4 | # Rails.application.config.permissions_policy do |f| 5 | # f.camera :none 6 | # f.gyroscope :none 7 | # f.microphone :none 8 | # f.usb :none 9 | # f.fullscreen :self 10 | # f.payment :self, "https://secure.example.com" 11 | # end 12 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html 3 | 4 | # Defines the root path route ("/") 5 | # root "articles#index" 6 | end 7 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }]) 7 | # Character.create(name: "Luke", movie: movies.first) 8 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/lib/assets/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/lib/tasks/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/log/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/public/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/public/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /examples/stacks/rails/blog/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/public/apple-touch-icon.png -------------------------------------------------------------------------------- /examples/stacks/rails/blog/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/public/favicon.ico -------------------------------------------------------------------------------- /examples/stacks/rails/blog/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/storage/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/storage/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 | end 6 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/test/channels/application_cable/connection_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase 4 | # test "connects with cookies" do 5 | # cookies.signed[:user_id] = 42 6 | # 7 | # connect 8 | # 9 | # assert_equal connection.user_id, "42" 10 | # end 11 | end 12 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/test/controllers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/test/controllers/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/test/fixtures/files/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/test/fixtures/files/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/test/helpers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/test/helpers/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/test/integration/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/test/integration/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/test/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/test/mailers/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/test/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/test/models/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/test/system/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/test/system/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] ||= "test" 2 | require_relative "../config/environment" 3 | require "rails/test_help" 4 | 5 | class ActiveSupport::TestCase 6 | # Run tests in parallel with specified workers 7 | parallelize(workers: :number_of_processors) 8 | 9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 10 | fixtures :all 11 | 12 | # Add more helper methods to be used by all tests here... 13 | end 14 | -------------------------------------------------------------------------------- /examples/stacks/rails/blog/tmp/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/tmp/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/tmp/pids/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/tmp/pids/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/tmp/storage/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/tmp/storage/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/blog/vendor/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/rails/blog/vendor/.keep -------------------------------------------------------------------------------- /examples/stacks/rails/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": { 3 | "ruby": "3.3", 4 | "bundler": "2.5", 5 | "nodejs": "21", 6 | "yarn": "1.22", 7 | "curl": "latest", 8 | "sqlite": "latest" 9 | }, 10 | "shell": { 11 | "init_hook": [ 12 | "gem install rails", 13 | "./blog/bin/bundle install", 14 | "./blog/bin/rails -f ./blog/Rakefile db:prepare" 15 | ], 16 | "scripts": { 17 | "run_test": ["./blog/bin/rails test"], 18 | "start_server": ["./blog/bin/rails server"] 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /examples/stacks/rails/process-compose.yml: -------------------------------------------------------------------------------- 1 | # Process compose for starting rails 2 | version: "0.5" 3 | 4 | processes: 5 | rails: 6 | command: ./blog/bin/rails server -b 7 | availability: 8 | restart: "always" 9 | -------------------------------------------------------------------------------- /examples/stacks/spring/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | bin/ 17 | !**/src/main/**/bin/ 18 | !**/src/test/**/bin/ 19 | 20 | ### IntelliJ IDEA ### 21 | .idea 22 | *.iws 23 | *.iml 24 | *.ipr 25 | out/ 26 | !**/src/main/**/out/ 27 | !**/src/test/**/out/ 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | 36 | ### VS Code ### 37 | .vscode/ 38 | -------------------------------------------------------------------------------- /examples/stacks/spring/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.java.home=/nix/store/csfdcflywb9gj20b1mvsp1ixy6f398bg-zulu17.34.19-ca-jdk-17.0.3 2 | -------------------------------------------------------------------------------- /examples/stacks/spring/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/examples/stacks/spring/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /examples/stacks/spring/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /examples/stacks/spring/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'spring' 2 | -------------------------------------------------------------------------------- /examples/stacks/spring/setup_db.sql: -------------------------------------------------------------------------------- 1 | -- You should run this query using `mysql -u root < setup_db.sql` 2 | 3 | DROP DATABASE IF EXISTS db_example; 4 | CREATE DATABASE db_example; 5 | 6 | USE db_example; 7 | 8 | CREATE USER 'springuser'@'%' IDENTIFIED BY 'password'; 9 | GRANT ALL ON db_example.* TO 'springuser'@'%'; -------------------------------------------------------------------------------- /examples/stacks/spring/src/main/java/com/devbox/example/spring/spring/Application.java: -------------------------------------------------------------------------------- 1 | package com.devbox.example.spring.spring; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class Application { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(Application.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /examples/stacks/spring/src/main/java/com/devbox/example/spring/spring/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.devbox.example.spring.spring; 2 | 3 | import org.springframework.data.repository.CrudRepository; 4 | import com.devbox.example.spring.spring.User; 5 | 6 | public interface UserRepository extends CrudRepository{ 8 | } 9 | -------------------------------------------------------------------------------- /examples/stacks/spring/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.jpa.hibernate.ddl-auto=update 2 | spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/db_example 3 | spring.datasource.username=springuser 4 | spring.datasource.password=password 5 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 6 | spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect 7 | #spring.jpa.show-sql: true -------------------------------------------------------------------------------- /examples/stacks/spring/src/test/java/com/devbox/example/spring/spring/ApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.devbox.example.spring.spring; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /examples/tutorial/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "gh", 4 | "glow", 5 | "vim@latest" 6 | ], 7 | "shell": { 8 | "init_hook": [ 9 | "clear && PAGER=cat glow README.md" 10 | ], 11 | "scripts": { 12 | "readme": "clear && PAGER=cat glow README.md" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /internal/boxcli/args.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package boxcli 5 | 6 | import ( 7 | "path/filepath" 8 | 9 | "github.com/pkg/errors" 10 | ) 11 | 12 | // Functions that help parse arguments 13 | 14 | func pathArg(args []string) string { 15 | if len(args) > 0 { 16 | p, err := filepath.Abs(args[0]) 17 | if err != nil { 18 | // Can occur when the current working directory cannot be determined. 19 | panic(errors.WithStack(err)) 20 | } 21 | return p 22 | } 23 | return "" 24 | } 25 | -------------------------------------------------------------------------------- /internal/boxcli/featureflag/auth.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package featureflag 5 | 6 | var Auth = enable("AUTH") 7 | -------------------------------------------------------------------------------- /internal/boxcli/featureflag/impure_print_dev_env.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package featureflag 5 | 6 | // ImpurePrintDevEnv controls whether the `devbox print-dev-env` command 7 | // will be called with the `--impure` flag. 8 | // Using the `--impure` flag will have two consequences: 9 | // 1. All environment variables will be passed to nix, this will enable 10 | // the usage of flakes that rely on environment variables. 11 | // 2. It will disable nix caching, making the command slower. 12 | var ImpurePrintDevEnv = disable("IMPURE_PRINT_DEV_ENV") 13 | -------------------------------------------------------------------------------- /internal/boxcli/featureflag/resolvev2.go: -------------------------------------------------------------------------------- 1 | package featureflag 2 | 3 | // ResolveV2 uses the /v2/resolve endpoint when resolving packages. 4 | var ResolveV2 = enable("RESOLVE_V2") 5 | -------------------------------------------------------------------------------- /internal/boxcli/featureflag/script_exit_on_error.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package featureflag 5 | 6 | // ScriptExitOnError controls whether scripts defined in devbox.json 7 | // and executed via `devbox run` should exit if any command within them errors. 8 | var ScriptExitOnError = enable("SCRIPT_EXIT_ON_ERROR") 9 | -------------------------------------------------------------------------------- /internal/boxcli/featureflag/tidywarning.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package featureflag 5 | 6 | var TidyWarning = disable("TIDY_WARNING") 7 | -------------------------------------------------------------------------------- /internal/cmdutil/cmdutil.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package cmdutil 5 | 6 | import ( 7 | "os/exec" 8 | ) 9 | 10 | // Exists indicates if the command exists 11 | func Exists(command string) bool { 12 | _, err := exec.LookPath(command) 13 | return err == nil 14 | } 15 | 16 | // GetPathOrDefault gets the path for the given command. 17 | // If it's not found, it will return the given value instead. 18 | func GetPathOrDefault(command, def string) string { 19 | path, err := exec.LookPath(command) 20 | if err != nil { 21 | path = def 22 | } 23 | 24 | return path 25 | } 26 | -------------------------------------------------------------------------------- /internal/conf/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | // Package conf is future home of the config (devbox.json) management code. 5 | // it will merge exiting plugin and devbox/config.go code. 6 | package conf 7 | -------------------------------------------------------------------------------- /internal/cuecfg/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | // Utilities for working with config files that rely on cue 5 | // for validation and definition. 6 | package cuecfg 7 | -------------------------------------------------------------------------------- /internal/cuecfg/toml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package cuecfg 5 | 6 | import ( 7 | "github.com/pelletier/go-toml/v2" 8 | ) 9 | 10 | func marshalToml(v interface{}) ([]byte, error) { 11 | return toml.Marshal(v) 12 | } 13 | 14 | func unmarshalToml(data []byte, v interface{}) error { 15 | return toml.Unmarshal(data, v) 16 | } 17 | -------------------------------------------------------------------------------- /internal/cuecfg/xml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package cuecfg 5 | 6 | import ( 7 | "encoding/xml" 8 | ) 9 | 10 | func marshalXML(v interface{}) ([]byte, error) { 11 | return xml.Marshal(v) 12 | } 13 | 14 | func unmarshalXML(data []byte, v interface{}) error { 15 | return xml.Unmarshal(data, v) 16 | } 17 | -------------------------------------------------------------------------------- /internal/cuecfg/yaml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package cuecfg 5 | 6 | import "gopkg.in/yaml.v3" 7 | 8 | // TODO: consider using cue's YAML marshaller. 9 | // It might have extra functionality related 10 | // to the cue language. 11 | func marshalYaml(v interface{}) ([]byte, error) { 12 | return yaml.Marshal(v) 13 | } 14 | 15 | func unmarshalYaml(data []byte, v interface{}) error { 16 | return yaml.Unmarshal(data, v) 17 | } 18 | -------------------------------------------------------------------------------- /internal/devbox/errors.go: -------------------------------------------------------------------------------- 1 | package devbox 2 | 3 | import "strings" 4 | 5 | func isConnectionError(err error) bool { 6 | if err == nil { 7 | return false 8 | } 9 | 10 | return strings.Contains(err.Error(), "no such host") || 11 | strings.Contains(err.Error(), "connection refused") 12 | } 13 | -------------------------------------------------------------------------------- /internal/devbox/generate/tmpl/Dockerfile.dockerignore.tmpl: -------------------------------------------------------------------------------- 1 | node_modules 2 | .venv 3 | -------------------------------------------------------------------------------- /internal/devbox/generate/tmpl/envrc.tmpl: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Automatically sets up your devbox environment whenever you cd into this 4 | # directory via our direnv integration: 5 | 6 | eval "$(devbox generate direnv --print-envrc{{ if .Flags}} {{ .Flags }}{{ end }})" 7 | 8 | # check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/ 9 | # for more details 10 | -------------------------------------------------------------------------------- /internal/devbox/generate/tmpl/envrcContent.tmpl: -------------------------------------------------------------------------------- 1 | use_devbox() { 2 | watch_file devbox.json devbox.lock 3 | eval "$(devbox shellenv --init-hook --install --no-refresh-alias{{ if .EnvFlag }} {{ .EnvFlag }}{{ end }})" 4 | } 5 | use devbox 6 | {{ if .EnvFile }} 7 | dotenv_if_exists {{ .EnvFile }} 8 | {{ end }} 9 | -------------------------------------------------------------------------------- /internal/devbox/testdata/shellrc/basic/env: -------------------------------------------------------------------------------- 1 | simple=value 2 | space=quote me 3 | quote=they said, "lasers" 4 | special=$`"\ 5 | -------------------------------------------------------------------------------- /internal/goutil/goutil.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package goutil 5 | 6 | func PickByKeysSorted[K comparable, V any](in map[K]V, keys []K) []V { 7 | out := make([]V, len(keys)) 8 | for i, key := range keys { 9 | out[i] = in[key] 10 | } 11 | return out 12 | } 13 | 14 | func GetDefaulted[T any](in []T, index int) T { 15 | var t T 16 | if index >= len(in) { 17 | return t 18 | } 19 | return in[index] 20 | } 21 | -------------------------------------------------------------------------------- /internal/lock/interfaces.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package lock 5 | 6 | import "go.jetify.com/devbox/nix/flake" 7 | 8 | type devboxProject interface { 9 | ConfigHash() (string, error) 10 | Stdenv() flake.Ref 11 | AllPackageNamesIncludingRemovedTriggerPackages() []string 12 | ProjectDir() string 13 | } 14 | 15 | type Locker interface { 16 | Get(string) *Package 17 | Stdenv() flake.Ref 18 | ProjectDir() string 19 | Resolve(string) (*Package, error) 20 | } 21 | -------------------------------------------------------------------------------- /internal/nix/command.go: -------------------------------------------------------------------------------- 1 | package nix 2 | 3 | func init() { 4 | Default.ExtraArgs = Args{ 5 | "--extra-experimental-features", "ca-derivations", 6 | "--option", "experimental-features", "nix-command flakes fetch-closure", 7 | } 8 | } 9 | 10 | func appendArgs[E any](args Args, new []E) Args { 11 | for _, elem := range new { 12 | args = append(args, elem) 13 | } 14 | return args 15 | } 16 | 17 | func allowUnfreeEnv(curEnv []string) []string { 18 | return append(curEnv, "NIXPKGS_ALLOW_UNFREE=1") 19 | } 20 | 21 | func allowInsecureEnv(curEnv []string) []string { 22 | return append(curEnv, "NIXPKGS_ALLOW_INSECURE=1") 23 | } 24 | -------------------------------------------------------------------------------- /internal/nix/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | // Package nix provides Go API for nix. 5 | // Internally this is a wrapper around the nix command line utilities. 6 | // I'd love to use a go SDK instead, and drop the dependency on the CLI. 7 | // The dependency means that users need to install nix, before using devbox. 8 | // Unfortunately, that go sdk does not exist. We would have to implement it. 9 | package nix 10 | -------------------------------------------------------------------------------- /internal/nix/instance.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package nix 5 | 6 | import "context" 7 | 8 | // These make it easier to stub out nix for testing 9 | type NixInstance struct{} 10 | 11 | type Nixer interface { 12 | PrintDevEnv(ctx context.Context, args *PrintDevEnvArgs) (*PrintDevEnvOut, error) 13 | } 14 | -------------------------------------------------------------------------------- /internal/plugin/includes.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | import ( 4 | "strings" 5 | 6 | "go.jetify.com/devbox/internal/devpkg" 7 | "go.jetify.com/devbox/internal/lock" 8 | ) 9 | 10 | func LoadConfigFromInclude(include string, lockfile *lock.File, workingDir string) (*Config, error) { 11 | var includable Includable 12 | var err error 13 | if t, name, _ := strings.Cut(include, ":"); t == "plugin" { 14 | includable = devpkg.PackageFromStringWithDefaults( 15 | name, 16 | lockfile, 17 | ) 18 | } else { 19 | includable, err = parseIncludable(include, workingDir) 20 | if err != nil { 21 | return nil, err 22 | } 23 | } 24 | return getConfigIfAny(includable, lockfile.ProjectDir()) 25 | } 26 | -------------------------------------------------------------------------------- /internal/plugin/update.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | func Update() error { 4 | return githubCache.Clear() 5 | } 6 | -------------------------------------------------------------------------------- /internal/services/services.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package services 5 | 6 | type Services map[string]Service // name -> Service 7 | 8 | type Service struct { 9 | Name string 10 | ProcessComposePath string 11 | } 12 | -------------------------------------------------------------------------------- /internal/shellgen/doc.go: -------------------------------------------------------------------------------- 1 | package shellgen 2 | 3 | // shellgen package is responsible for printing files in the .devbox/gen directory that 4 | // are needed to create the "devbox shell environment". 5 | // 6 | // This is flake.nix, and the init-hooks and scripts from the devbox.json. 7 | -------------------------------------------------------------------------------- /internal/shellgen/path.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Jetify Inc. and contributors. All rights reserved. 2 | // Use of this source code is governed by the license in the LICENSE file. 3 | 4 | package shellgen 5 | 6 | import "path/filepath" 7 | 8 | func genPath(d devboxer) string { 9 | return filepath.Join(d.ProjectDir(), ".devbox/gen") 10 | } 11 | 12 | func FlakePath(d devboxer) string { 13 | return filepath.Join(genPath(d), "flake") 14 | } 15 | -------------------------------------------------------------------------------- /internal/shellgen/testdata/flake-empty.nix.golden: -------------------------------------------------------------------------------- 1 | { 2 | description = "A devbox shell"; 3 | 4 | inputs = { 5 | nixpkgs.url = ""; 6 | }; 7 | 8 | outputs = { 9 | self, 10 | nixpkgs, 11 | }: 12 | let 13 | pkgs = nixpkgs.legacyPackages.x86_64-linux; 14 | in 15 | { 16 | devShells.x86_64-linux.default = pkgs.mkShell { 17 | buildInputs = [ 18 | ]; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /internal/shellgen/tmpl/.gitignore.tmpl: -------------------------------------------------------------------------------- 1 | * 2 | .* 3 | -------------------------------------------------------------------------------- /internal/shellgen/tmpl/script-wrapper.tmpl: -------------------------------------------------------------------------------- 1 | {{/* 2 | This wraps user scripts in devbox.json. The idea is to only run the init 3 | hooks once, even if the init hook calls devbox run again. This will also 4 | protect against using devbox service in the init hook. 5 | 6 | Scripts always use sh to run, so POSIX is OK. We don't (yet) support fish 7 | scripts. (though users can run a fish script within their script) 8 | */ -}} 9 | 10 | if [ -z "${{ .SkipInitHookHash }}" ]; then 11 | . "{{ .InitHookPath }}" 12 | fi 13 | 14 | {{ .Body }} 15 | -------------------------------------------------------------------------------- /internal/shellgen/tmpl/shell.nix.tmpl: -------------------------------------------------------------------------------- 1 | let 2 | pkgs = import 3 | (fetchTarball { 4 | url = "https://github.com/nixos/nixpkgs/archive/b9c00c1d41ccd6385da243415299b39aa73357be.tar.gz"; 5 | }) 6 | { }; 7 | in 8 | with pkgs; 9 | mkShell { 10 | packages = []; 11 | } 12 | -------------------------------------------------------------------------------- /internal/telemetry/telemetry_test.go: -------------------------------------------------------------------------------- 1 | package telemetry 2 | 3 | import ( 4 | "errors" 5 | "testing" 6 | ) 7 | 8 | // TestErrorBasic does a very simple sanity check to ensure the error can be sent 9 | // to the sentry and segment buffers 10 | func TestErrorBasic(t *testing.T) { 11 | segmentBufferDir = t.TempDir() 12 | sentryBufferDir = t.TempDir() 13 | started = true 14 | 15 | fakeErr := errors.New("fake error") 16 | meta := Metadata{} 17 | 18 | Error(fakeErr, meta) 19 | } 20 | -------------------------------------------------------------------------------- /pkg/autodetect/detector/detector.go: -------------------------------------------------------------------------------- 1 | package detector 2 | 3 | import "context" 4 | 5 | type Detector interface { 6 | Relevance(path string) (float64, error) 7 | Packages(ctx context.Context) ([]string, error) 8 | Env(ctx context.Context) (map[string]string, error) 9 | } 10 | -------------------------------------------------------------------------------- /plugins/apache/process-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "0.5" 2 | 3 | processes: 4 | apache: 5 | command: "echo \"Apache starting on port $HTTPD_PORT\ http://localhost:$HTTPD_PORT\" && apachectl start -f $HTTPD_CONFDIR/httpd.conf -D FOREGROUND" 6 | availability: 7 | restart: on_failure 8 | max_restarts: 5 9 | depends_on: 10 | apache-error: 11 | condition: process_started 12 | apache-access: 13 | condition: process_started 14 | apache-error: 15 | command: "tail -f $HTTPD_ERROR_LOG_FILE" 16 | availability: 17 | restart: "always" 18 | apache-access: 19 | command: "tail -f $HTTPD_ACCESS_LOG_FILE" 20 | availability: 21 | restart: "always" 22 | -------------------------------------------------------------------------------- /plugins/apacheHttpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "apache", 3 | "version": "0.0.2", 4 | "description": "If you with to edit the config file, please copy it out of the .devbox directory.", 5 | "env": { 6 | "HTTPD_DEVBOX_CONFIG_DIR": "{{ .DevboxProjectDir }}", 7 | "HTTPD_CONFDIR": "{{ .DevboxDir }}", 8 | "HTTPD_ERROR_LOG_FILE": "{{ .Virtenv }}/error.log", 9 | "HTTPD_ACCESS_LOG_FILE": "{{ .Virtenv }}/access.log", 10 | "HTTPD_PORT": "8080" 11 | }, 12 | "create_files": { 13 | "{{ .DevboxDir }}/httpd.conf": "apache/httpd.conf", 14 | "{{ .DevboxDirRoot }}/web/index.html": "web/index.html", 15 | "{{ .Virtenv }}/process-compose.yaml": "apache/process-compose.yaml" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /plugins/caddy/Caddyfile: -------------------------------------------------------------------------------- 1 | # See https://caddyserver.com/docs/caddyfile for more details 2 | { 3 | admin 0.0.0.0:2020 4 | auto_https disable_certs 5 | http_port 8800 6 | https_port 4443 7 | } 8 | 9 | :8082 { 10 | root * {$CADDY_ROOT_DIR} 11 | log { 12 | output file {$CADDY_LOG_DIR}/caddy.log 13 | } 14 | file_server 15 | } 16 | -------------------------------------------------------------------------------- /plugins/caddy/process-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "0.6" 2 | 3 | processes: 4 | caddy: 5 | command: "caddy run --config=$CADDY_CONFIG" 6 | availability: 7 | restart: on_failure 8 | max_restarts: 5 -------------------------------------------------------------------------------- /plugins/elixir.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "elixir", 3 | "version": "0.0.1", 4 | "packages": { 5 | "darwin.apple_sdk.frameworks.CoreServices": { 6 | "platforms": ["aarch64-darwin", "x86_64-darwin"] 7 | } 8 | }, 9 | "env": { 10 | "MIX_HOME": "{{ .Virtenv }}/mix", 11 | "HEX_HOME": "{{ .Virtenv }}/hex", 12 | "ERL_AFLAGS": "-kernel shell_history enabled" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /plugins/gradle.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gradle", 3 | "version": "0.0.1", 4 | "description": "You can customize which JDK gradle will use by specifying the value of `org.gradle.java.home` in gradle.properties file", 5 | "shell": { 6 | "init_hook": [ 7 | "[ -s gradle.properties ] || echo org.gradle.java.home=$JAVA_HOME >> gradle.properties" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /plugins/haskell.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "haskell", 3 | "version": "0.0.2", 4 | "description": "Haskell plugin", 5 | "packages": [ 6 | "path:{{ .Virtenv }}/flake" 7 | ], 8 | "__remove_trigger_package": true, 9 | "create_files": { 10 | "{{ .Virtenv }}/flake/flake.nix": "haskell/flake.nix" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /plugins/mariadb/my.cnf: -------------------------------------------------------------------------------- 1 | # MySQL configuration file 2 | 3 | [mariadbd] 4 | # Change this port if 3306 is already used 5 | #port = 3306 6 | log_error=mysql.log 7 | -------------------------------------------------------------------------------- /plugins/mariadb/process-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "0.5" 2 | 3 | processes: 4 | mariadb: 5 | command: "echo 'Starting mysqld... check mariadb_logs for details'; mysqld --log-error=$MYSQL_HOME/mysql.log" 6 | is_daemon: false 7 | shutdown: 8 | command: "mysqladmin -u root shutdown" 9 | availability: 10 | restart: "always" 11 | mariadb_logs: 12 | command: "tail -f $MYSQL_HOME/mysql.log" 13 | availability: 14 | restart: "always" 15 | -------------------------------------------------------------------------------- /plugins/mariadb/setup_db.sh: -------------------------------------------------------------------------------- 1 | #! bash 2 | 3 | if [ ! -d "$MYSQL_DATADIR" ]; then 4 | # Install the Database 5 | mysql_install_db --auth-root-authentication-method=normal \ 6 | --datadir=$MYSQL_DATADIR --basedir=$MYSQL_BASEDIR \ 7 | --pid-file=$MYSQL_PID_FILE 8 | fi 9 | 10 | if [ -e "$MYSQL_CONF" ]; then 11 | ln -fs "$MYSQL_CONF" "$MYSQL_HOME/my.cnf" 12 | fi -------------------------------------------------------------------------------- /plugins/mysql/my.cnf: -------------------------------------------------------------------------------- 1 | # MySQL configuration file 2 | 3 | # [mysqld] 4 | # skip-log-bin 5 | # Change this port if 3306 is already used 6 | #port = 3306 7 | -------------------------------------------------------------------------------- /plugins/mysql/process-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "0.5" 2 | 3 | processes: 4 | mysql: 5 | command: "echo 'Starting mysqld... check mysql_logs for details'; mysqld --log-error=$MYSQL_HOME/mysql.log" 6 | is_daemon: false 7 | shutdown: 8 | command: "mysqladmin -u root shutdown" 9 | availability: 10 | restart: "always" 11 | depends_on: 12 | mysql_logs: 13 | condition: "process_started" 14 | mysql_logs: 15 | command: "tail -f $MYSQL_HOME/mysql.log" 16 | availability: 17 | restart: "always" 18 | -------------------------------------------------------------------------------- /plugins/mysql/setup_db.sh: -------------------------------------------------------------------------------- 1 | #! bash 2 | 3 | if [ ! -d "$MYSQL_DATADIR" ]; then 4 | # Install the Database 5 | mkdir $MYSQL_DATADIR 6 | mysqld --initialize-insecure 7 | fi 8 | 9 | if [ -e "$MYSQL_CONF" ]; then 10 | ln -fs "$MYSQL_CONF" "$MYSQL_HOME/my.cnf" 11 | fi -------------------------------------------------------------------------------- /plugins/nginx/process-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "0.5" 2 | 3 | processes: 4 | nginx: 5 | command: | 6 | if [ -f $NGINX_CONFDIR/nginx.template ]; then envsubst $(awk 'BEGIN {for (k in ENVIRON) {printf "$"k","}}') < $NGINX_CONFDIR/nginx.template > $NGINX_CONFDIR/nginx.conf; fi 7 | nginx -p $NGINX_PATH_PREFIX -c $NGINX_CONFDIR/nginx.conf -e error.log -g "pid nginx.pid;daemon off;" 8 | availability: 9 | restart: on_failure 10 | max_restarts: 5 11 | nginx-error: 12 | command: "tail -f $NGINX_PATH_PREFIX/error.log" 13 | availability: 14 | restart: "always" 15 | nginx-access: 16 | command: "tail -f $NGINX_PATH_PREFIX/access.log" 17 | availability: 18 | restart: "always" 19 | -------------------------------------------------------------------------------- /plugins/php/php-fpm.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | pid = ${PHPFPM_PID_FILE} 3 | error_log = ${PHPFPM_ERROR_LOG_FILE} 4 | daemonize = yes 5 | 6 | [www] 7 | ; user = www-data 8 | ; group = www-data 9 | listen = 127.0.0.1:${PHPFPM_PORT} 10 | ; listen.owner = www-data 11 | ; listen.group = www-data 12 | pm = dynamic 13 | pm.max_children = 5 14 | pm.start_servers = 2 15 | pm.min_spare_servers = 1 16 | pm.max_spare_servers = 3 17 | chdir = / 18 | -------------------------------------------------------------------------------- /plugins/php/php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | 3 | ; Put your php.ini directives here. For the latest default php.ini file, see https://github.com/php/php-src/blob/master/php.ini-production 4 | 5 | ; memory_limit = 128M 6 | ; expose_php = Off 7 | -------------------------------------------------------------------------------- /plugins/php/process-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "0.5" 2 | 3 | processes: 4 | php-fpm: 5 | command: "php-fpm -y {{ .DevboxDir }}/php-fpm.conf --nodaemonize" 6 | availability: 7 | restart: "always" 8 | 9 | -------------------------------------------------------------------------------- /plugins/poetry/initHook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | poetry env use $(command -v python) --directory="${DEVBOX_PYPROJECT_DIR:-$DEVBOX_DEFAULT_PYPROJECT_DIR}" --no-interaction --quiet >&2 4 | -------------------------------------------------------------------------------- /plugins/postgresql.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "postgresql", 3 | "version": "0.0.2", 4 | "description": "To initialize the database run `initdb`.", 5 | "packages": { 6 | "glibcLocales": { 7 | "version": "latest", 8 | "platforms": ["x86_64-linux", "aarch64-linux"] 9 | } 10 | }, 11 | "env": { 12 | "PGDATA": "{{ .Virtenv }}/data", 13 | "PGHOST": "{{ .Virtenv }}" 14 | }, 15 | "create_files": { 16 | "{{ .Virtenv }}/data": "", 17 | "{{ .Virtenv }}/process-compose.yaml": "postgresql/process-compose.yaml" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /plugins/postgresql/process-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "0.5" 2 | 3 | processes: 4 | postgresql: 5 | command: "pg_ctl start -o \"-k '$PGHOST'\"" 6 | is_daemon: true 7 | shutdown: 8 | command: "pg_ctl stop -m fast" 9 | availability: 10 | restart: "always" 11 | readiness_probe: 12 | exec: 13 | command: "pg_isready" 14 | -------------------------------------------------------------------------------- /plugins/redis/process-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "0.5" 2 | 3 | processes: 4 | redis: 5 | command: "redis-server $REDIS_CONF --port $REDIS_PORT" 6 | availability: 7 | restart: on_failure 8 | max_restarts: 5 -------------------------------------------------------------------------------- /plugins/ruby.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ruby", 3 | "version": "0.0.2", 4 | "env": { 5 | "PATH": "{{ .Virtenv }}/bin/:$PATH", 6 | "RUBY_CONFDIR": "{{ .Virtenv }}", 7 | "GEMRC": "{{ .Virtenv }}/.gemrc", 8 | "GEM_HOME": "{{ .Virtenv }}" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /plugins/rustc.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rustc", 3 | "version": "0.0.1", 4 | "description": "As an alternative to rustc you may add rustup to manage your rust versions." 5 | } 6 | -------------------------------------------------------------------------------- /plugins/rustup.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rustup", 3 | "version": "0.0.1", 4 | "description": "If using this on macOS you may need to install `libiconv` as well", 5 | "env": { 6 | "RUSTUP_HOME": "{{ .Virtenv }}", 7 | "LIBRARY_PATH": "{{ .DevboxProfileDefault }}/lib" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /plugins/valkey/process-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "0.5" 2 | 3 | processes: 4 | valkey: 5 | command: "valkey-server $VALKEY_CONF --port $VALKEY_PORT" 6 | availability: 7 | restart: on_failure 8 | max_restarts: 5 -------------------------------------------------------------------------------- /plugins/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | Hello World! 9 | 10 | 11 | -------------------------------------------------------------------------------- /scripts/gofumpt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | fd --extension go --exec-batch go tool gofumpt -extra -w 4 | 5 | if [ -n "${CI:-}" ]; then 6 | git diff --exit-code 7 | fi 8 | -------------------------------------------------------------------------------- /testscripts/add/add_insecure.tst.txt: -------------------------------------------------------------------------------- 1 | # Tests installing an insecure package. 2 | # This test is pretty slow, maybe there's a different package we can 3 | # use for testing. 4 | 5 | # we could also isolate this test and run on its own. 6 | 7 | exec devbox init 8 | exec devbox add python@2.7.18.6 --allow-insecure python-2.7.18.6 9 | exec devbox install 10 | -------------------------------------------------------------------------------- /testscripts/add/add_replace.test.txt: -------------------------------------------------------------------------------- 1 | # Testscript for exercising adding packages 2 | 3 | exec devbox init 4 | 5 | exec devbox add go@1.20 6 | devboxjson.packages.contains devbox.json go@1.20 7 | ! devboxjson.packages.contains devbox.json go@1.19 8 | 9 | exec devbox add go@1.19 10 | ! devboxjson.packages.contains devbox.json go@1.20 11 | devboxjson.packages.contains devbox.json go@1.19 12 | 13 | -- devbox.json -- 14 | { 15 | "packages": [ 16 | "go@1.19" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /testscripts/add/global_add.test.txt: -------------------------------------------------------------------------------- 1 | # Testscript for exercising adding packages 2 | 3 | ! exec rg --version 4 | ! exec vim --version 5 | exec devbox global add ripgrep vim 6 | 7 | exec devbox global shellenv --recompute 8 | source.path 9 | exec rg --version 10 | exec vim --version 11 | 12 | -- devbox.json -- 13 | { 14 | "packages": [ 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /testscripts/assert/assert.test.txt: -------------------------------------------------------------------------------- 1 | # Tests assert functions (since some are relatively complex) 2 | 3 | exec print a:b:c:d:e:fg:h 4 | path.order 'a' 'c' 'e' 5 | ! path.order 'a' 'b' 'a' 6 | path.order 'a' 'f' 7 | ! path.order 'a' 'c' 'h' 'h' 8 | -------------------------------------------------------------------------------- /testscripts/basic/default_test_env.test.txt: -------------------------------------------------------------------------------- 1 | # Test that the environment is setup correctly by our testing framework. 2 | 3 | # PATH should have a single entry: the one setup by the testing framework 4 | env.path.len 1 5 | 6 | # Through that path we should be able to execute devbox: 7 | exec devbox version 8 | 9 | # But nothing else (including common tools): 10 | ! exec grep --version 11 | ! exec echo "echo should not be in path" 12 | -------------------------------------------------------------------------------- /testscripts/basic/install_hello.test.txt: -------------------------------------------------------------------------------- 1 | # Devbox should be able to install a very simple package like 'hello' 2 | # and it should work. 3 | 4 | # Ensure hello is not found anywhere in the environment 5 | ! exec hello 6 | ! exec devbox run hello 7 | 8 | # Initialize devbox 9 | exec devbox init 10 | 11 | # Add the package and run hello with devbox 12 | exec devbox add hello 13 | ! exec hello 14 | 15 | # Run hello and check it prints the right output 16 | exec devbox run hello 17 | stdout 'Hello, world!' 18 | 19 | # Once we have better progress output, we should check that stderr is empty, with: 20 | # ! stderr .+ # No stderr output 21 | # As is, we always print 'Ensuring packages are installed'. -------------------------------------------------------------------------------- /testscripts/basic/path_whitespace.test.txt: -------------------------------------------------------------------------------- 1 | # Test that Devbox handles whitespace in project paths. 2 | 3 | mkdir 'my project' 4 | cd 'my project' 5 | 6 | exec devbox run -- hello 7 | stdout 'Hello, world!' 8 | 9 | exec devbox run -- touch 'file1 with spaces' 10 | exists 'file1 with spaces' 11 | 12 | exec devbox run test 13 | exists 'file2 with spaces' 14 | 15 | -- my project/devbox.json -- 16 | { 17 | "packages": ["hello@latest"], 18 | "shell": { 19 | "scripts": { 20 | "test": "touch 'file2 with spaces'" 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /testscripts/generate/devcontainer.test.txt: -------------------------------------------------------------------------------- 1 | exec devbox init 2 | exec devbox generate devcontainer 3 | exists .devcontainer/Dockerfile 4 | exists .devcontainer/devcontainer.json 5 | -------------------------------------------------------------------------------- /testscripts/generate/direnv.test.txt: -------------------------------------------------------------------------------- 1 | exec devbox init 2 | exec devbox generate direnv 3 | exists .envrc 4 | 5 | -------------------------------------------------------------------------------- /testscripts/generate/dockerfile.test.txt: -------------------------------------------------------------------------------- 1 | exec devbox init 2 | exec devbox generate dockerfile 3 | exists Dockerfile 4 | -------------------------------------------------------------------------------- /testscripts/info/info.test.txt: -------------------------------------------------------------------------------- 1 | exec devbox init 2 | exec devbox info hello 3 | stdout 'hello ' 4 | 5 | exec devbox init 6 | exec devbox info hello@latest 7 | stdout 'hello ' 8 | 9 | exec devbox init 10 | ! exec devbox info notapackage 11 | stderr 'Package "notapackage" not found' 12 | -------------------------------------------------------------------------------- /testscripts/init/empty.test.txt: -------------------------------------------------------------------------------- 1 | # Start on an empty directory and check that devbox init works correctly. 2 | 3 | ! exists devbox.json 4 | exec devbox init 5 | exists devbox.json 6 | 7 | json.superset devbox.json expected.json 8 | 9 | # Second init should be a no-op with a warning 10 | exec devbox init 11 | stderr 'devbox.json already exists in' 12 | 13 | -- expected.json -- 14 | { 15 | "packages": [] 16 | } 17 | -------------------------------------------------------------------------------- /testscripts/lockfile/nopaths.txt: -------------------------------------------------------------------------------- 1 | # Test installing a package without outputs in the store path. 2 | # NOTE: Purposefully using a weird version to ensure it is not already in store. 3 | 4 | exec devbox run curl --version | grep -o 'curl\s7\.87\.0' 5 | stdout 'curl 7.87.0' 6 | 7 | -- devbox.json -- 8 | { 9 | "packages": ["curl@7.87.0"], 10 | } 11 | 12 | -- devbox.lock -- 13 | { 14 | "lockfile_version": "1", 15 | "packages": { 16 | "curl@7.87.0": { 17 | "last_modified": "2023-02-26T03:47:33Z", 18 | "resolved": "github:NixOS/nixpkgs/9952d6bc395f5841262b006fbace8dd7e143b634#curl", 19 | "source": "devbox-search", 20 | "version": "7.87.0" 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /testscripts/packages/flakes.test.txt: -------------------------------------------------------------------------------- 1 | ! exec devbox run hello 2 | exec devbox add path:my-flake 3 | 4 | exec devbox run hello 5 | 6 | -- devbox.json -- 7 | { 8 | "packages": [ 9 | ] 10 | } 11 | 12 | -- my-flake/flake.nix -- 13 | { 14 | description = "Test"; 15 | 16 | inputs = { 17 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 18 | flake-utils.url = "github:numtide/flake-utils"; 19 | }; 20 | 21 | outputs = { self, nixpkgs, flake-utils }: 22 | flake-utils.lib.eachDefaultSystem (system: 23 | let 24 | pkgs = nixpkgs.legacyPackages.${system}; 25 | in 26 | { 27 | packages = { 28 | default = pkgs.hello; 29 | }; 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /testscripts/packages/unfree.test.txt: -------------------------------------------------------------------------------- 1 | # Test ensures that we can add and remove "unfree" nix packages 2 | 3 | exec devbox init 4 | 5 | # we could test with slack and/or vscode. Using slack since it is lighter. 6 | exec devbox add slack 7 | stderr 'Adding package "slack@latest" to devbox.json' 8 | 9 | exec devbox rm slack 10 | -------------------------------------------------------------------------------- /testscripts/plugin/plugin.test.txt: -------------------------------------------------------------------------------- 1 | # Testscript for testing plugin 2 | 3 | exec devbox init 4 | exec devbox add python 5 | stderr 'This plugin' 6 | 7 | exec devbox run ls .devbox/virtenv/python 8 | 9 | json.superset devbox.json expected_devbox.json 10 | 11 | exec devbox add python --disable-plugin 12 | exec devbox add hello 13 | 14 | json.superset devbox.json expected_devbox2.json 15 | 16 | -- expected_devbox.json -- 17 | { 18 | "packages": [ 19 | "python@latest" 20 | ] 21 | } 22 | 23 | -- expected_devbox2.json -- 24 | { 25 | "packages": { 26 | "hello": "latest", 27 | "python": { 28 | "version": "latest", 29 | "disable_plugin": true 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /testscripts/rm/add-rm.test.txt: -------------------------------------------------------------------------------- 1 | exec devbox init 2 | 3 | exec devbox add hello vim cowsay php 4 | json.superset devbox.json all.json 5 | 6 | exec devbox rm vim hello php 7 | json.superset devbox.json cowsay.json 8 | 9 | exec devbox add vim hello vim hello vim hello vim hello cowsay php php 10 | json.superset devbox.json all.json 11 | 12 | exec devbox rm vim hello cowsay cowsay php 13 | json.superset devbox.json empty.json 14 | 15 | -- all.json -- 16 | { 17 | "packages": ["hello@latest", "vim@latest", "cowsay@latest", "php@latest"] 18 | } 19 | 20 | -- cowsay.json -- 21 | { 22 | "packages": ["cowsay@latest"] 23 | } 24 | 25 | 26 | -- empty.json -- 27 | { 28 | "packages": [] 29 | } 30 | -------------------------------------------------------------------------------- /testscripts/rm/manual.test.txt: -------------------------------------------------------------------------------- 1 | exec devbox run hello 2 | stdout 'Hello, world!' 3 | 4 | # Simulate deleting the packages manually. 5 | cp empty.json devbox.json 6 | 7 | ! exec devbox run hello 8 | ! stdout 'Hello, world!' 9 | 10 | -- devbox.json -- 11 | { 12 | "packages": ["hello"] 13 | } 14 | 15 | -- empty.json -- 16 | { 17 | "packages": [] 18 | } 19 | -------------------------------------------------------------------------------- /testscripts/rm/multi.test.txt: -------------------------------------------------------------------------------- 1 | exec devbox init 2 | 3 | exec devbox add hello vim 4 | exec devbox run hello 5 | stdout 'Hello, world!' 6 | 7 | exec devbox rm vim hello 8 | ! exec devbox run hello 9 | ! exec devbox run vim 10 | 11 | json.superset devbox.json expected.json 12 | 13 | # Check that profile history was cleaned up. There should only be 14 | # default and default-N-link. 15 | glob -count=2 .devbox/nix/profile/* 16 | 17 | -- expected.json -- 18 | { 19 | "packages": [] 20 | } 21 | -------------------------------------------------------------------------------- /testscripts/rm/rm.test.txt: -------------------------------------------------------------------------------- 1 | exec devbox init 2 | 3 | exec devbox add hello vim 4 | exec devbox run hello 5 | stdout 'Hello, world!' 6 | 7 | exec devbox rm hello 8 | ! exec devbox run hello 9 | ! stdout 'Hello, world!' 10 | 11 | json.superset devbox.json expected.json 12 | 13 | -- expected.json -- 14 | { 15 | "packages": ["vim@latest"] 16 | } 17 | -------------------------------------------------------------------------------- /testscripts/run/args.test.txt: -------------------------------------------------------------------------------- 1 | # Test passing arguments to a script 2 | exec devbox run ekko hello there 3 | stdout 'hello there' 4 | 5 | -- devbox.json -- 6 | { 7 | "packages": [], 8 | "shell": { 9 | "scripts": { 10 | "ekko": "echo $@" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /testscripts/run/pure.test.txt: -------------------------------------------------------------------------------- 1 | # Tests related to having devbox run in pure mode. 2 | 3 | env FOO=bar 4 | env FOO2=bar2 5 | 6 | exec devbox run --pure echo '$FOO' 7 | stdout 'baz' 8 | 9 | exec devbox run --pure echo '$FOO2' 10 | stdout '' 11 | 12 | exec devbox run --pure hello 13 | stdout 'Hello, world!' 14 | 15 | -- devbox.json -- 16 | { 17 | "packages": ["hello@latest"], 18 | "env": { 19 | "FOO": "baz" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /testscripts/run/quote_escaping.test.txt: -------------------------------------------------------------------------------- 1 | # ensure that we escape the arguments to `devbox run` 2 | 3 | exec devbox init 4 | exec devbox run -- echo 'this is a "hello world"' 5 | stdout 'this is a "hello world"' 6 | 7 | env FOO=bar 8 | exec devbox run echo '$FOO' 9 | stdout 'bar' 10 | 11 | exec devbox run echo "$FOO" 12 | stdout 'bar' 13 | -------------------------------------------------------------------------------- /testscripts/run/script_exit_on_error.test.txt: -------------------------------------------------------------------------------- 1 | # Testscript to ensure that the script exits on error. 2 | 3 | ! exec devbox run multi_line 4 | stdout 'first line' 5 | ! stdout 'second line' 6 | 7 | -- devbox.json -- 8 | { 9 | "packages": [ 10 | ], 11 | "shell": { 12 | "scripts": { 13 | "multi_line": [ 14 | "echo \"first line\"", 15 | "exit 1", 16 | "echo \"second line\"" 17 | ] 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /testscripts/run/shellception.test.txt: -------------------------------------------------------------------------------- 1 | # Do not support shell inception 2 | exec devbox init 3 | env DEVBOX_SHELL_ENABLED=1 4 | ! exec devbox shell 5 | stderr 'Error: You are already in an active devbox shell.' 6 | -------------------------------------------------------------------------------- /testscripts/shell/shellenv.test.txt: -------------------------------------------------------------------------------- 1 | exec devbox init 2 | 3 | # test adding and running hello 4 | exec devbox add hello 5 | ! exec hello 6 | ! stdout . 7 | 8 | # source shellenv and test again 9 | exec devbox shellenv 10 | source.path 11 | exec hello 12 | stdout 'Hello, world!' 13 | -------------------------------------------------------------------------------- /testscripts/shellenv/node/README.md: -------------------------------------------------------------------------------- 1 | Inspired by https://github.com/amithgeorge/devbox-nodejs-repro-20230406 2 | 3 | This example shows a wrapped binary calling setting an env variable (PATH) and 4 | calling another wrapped binary without the PATH getting overwritten 5 | 6 | ## Steps 7 | 8 | - devbox run run_test 9 | - exit code should be 0 10 | -------------------------------------------------------------------------------- /testscripts/shellenv/node/devbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "nodejs@18" 4 | ], 5 | "shell": { 6 | "init_hook": [ 7 | "npm install" 8 | ], 9 | "scripts": { 10 | "run_test": "npm run run_test" 11 | } 12 | }, 13 | "nixpkgs": { 14 | "commit": "4a65e9f64e53fdca6eed31adba836717a11247d2" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /testscripts/shellenv/node/less-out/style.css: -------------------------------------------------------------------------------- 1 | #header { 2 | width: 10px; 3 | height: 20px; 4 | } 5 | -------------------------------------------------------------------------------- /testscripts/shellenv/node/less-src/style.less: -------------------------------------------------------------------------------- 1 | @width: 10px; 2 | @height: @width + 10px; 3 | 4 | #header { 5 | width: @width; 6 | height: @height; 7 | } 8 | -------------------------------------------------------------------------------- /testscripts/shellenv/node/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "devbox-nodejs-repro", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "run_test": "less-watch-compiler less-src less-out --run-once" 7 | }, 8 | "devDependencies": { 9 | "less": "^4.1.3", 10 | "less-watch-compiler": "^1.16.3" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /testscripts/testrunner/run_test.test.txt: -------------------------------------------------------------------------------- 1 | env DEVBOX_FEATURE_SCRIPT_EXIT_ON_ERROR=1 2 | exec devbox run run_test 3 | -------------------------------------------------------------------------------- /typos.toml: -------------------------------------------------------------------------------- 1 | [default.extend-words] 2 | AKE = "AKE" 3 | 4 | [files] 5 | extend-exclude=[ 6 | "go.mod", 7 | "*.svg", 8 | "**/testdata/**", 9 | "internal/cachehash/hash_test.go", 10 | "internal/devpkg/package_test.go", 11 | "internal/nix/store_test.go", 12 | ] 13 | -------------------------------------------------------------------------------- /vendor-hash: -------------------------------------------------------------------------------- 1 | sha256-zqkuq8MlUCELjo4Z/uJhs65XUYyH755/ohgz1Ao4UAQ= 2 | -------------------------------------------------------------------------------- /vscode-extension/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "@typescript-eslint/parser", 4 | "parserOptions": { 5 | "ecmaVersion": 6, 6 | "sourceType": "module" 7 | }, 8 | "plugins": [ 9 | "@typescript-eslint" 10 | ], 11 | "rules": { 12 | "@typescript-eslint/naming-convention": "warn", 13 | "@typescript-eslint/semi": "warn", 14 | "curly": "warn", 15 | "eqeqeq": "warn", 16 | "no-throw-literal": "warn", 17 | "semi": "off" 18 | }, 19 | "ignorePatterns": [ 20 | "out", 21 | "dist", 22 | "**/*.d.ts" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /vscode-extension/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | out 3 | .vscode 4 | .DS_Store -------------------------------------------------------------------------------- /vscode-extension/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | src/** 4 | .gitignore 5 | .yarnrc 6 | vsc-extension-quickstart.md 7 | **/tsconfig.json 8 | **/.eslintrc.json 9 | **/*.map 10 | **/*.ts 11 | -------------------------------------------------------------------------------- /vscode-extension/.yarnrc: -------------------------------------------------------------------------------- 1 | --ignore-engines true -------------------------------------------------------------------------------- /vscode-extension/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jetify-com/devbox/a1554931429244364d2a9cfc3c23e7510d3dceea/vscode-extension/assets/icon.png -------------------------------------------------------------------------------- /vscode-extension/src/test/suite/extension.test.ts: -------------------------------------------------------------------------------- 1 | import * as assert from 'assert'; 2 | 3 | // You can import and use all API from the 'vscode' module 4 | // as well as import your extension to test it 5 | import * as vscode from 'vscode'; 6 | // import * as myExtension from '../../extension'; 7 | 8 | suite('Extension Test Suite', () => { 9 | vscode.window.showInformationMessage('Start all tests.'); 10 | 11 | test('Sample test', () => { 12 | assert.strictEqual(-1, [1, 2, 3].indexOf(5)); 13 | assert.strictEqual(-1, [1, 2, 3].indexOf(0)); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /vscode-extension/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "ES2020", 5 | "outDir": "out", 6 | "lib": [ 7 | "ES2020" 8 | ], 9 | "sourceMap": true, 10 | "rootDir": "src", 11 | "strict": true /* enable all strict type-checking options */ 12 | /* Additional Checks */ 13 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 14 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 15 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 16 | } 17 | } 18 | --------------------------------------------------------------------------------