Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vale/
pnpm-lock.yaml
3 changes: 1 addition & 2 deletions docs/cloud/deploys/custom-domains/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ description:
domain, you will need to add a record to your DNS provider:
![Pending custom domain](./custom-domain-status-pending.png)
5. Once the correct records have been added to your DNS provider, your Custom Domain will display an
**Issued** status:
![Custom Domain Issued](./custom-domain-status-issued.png)
**Issued** status: ![Custom Domain Issued](./custom-domain-status-issued.png)

## Removing a Custom Domain[​](#removing-a-custom-domain "Direct link to Removing a Custom Domain")

Expand Down
4 changes: 2 additions & 2 deletions docs/devbox/cli-reference/devbox-cache/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ description: "A collection of commands to interact with the Jetify Cache or othe

## Subcommands[​](#subcommands "Direct link to Subcommands")

info Output information about the nix cache upload specified or nix packages in current
project to cache
info Output information about the nix cache upload specified or nix packages in current project to
cache

## Options[​](#options "Direct link to Options")

Expand Down
29 changes: 12 additions & 17 deletions docs/devbox/devbox-examples/languages/python/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,14 @@ this path by setting the `VENV_DIR` environment variable in your devbox.json:

```json
{
"packages": [
"[email protected]"
],
"env": {
// Install your virtual environment in `.venv`
"VENV_DIR": ".venv"
},
"shell": {
"init_hook": ". $VENV_DIR/bin/activate"
}
"packages": ["[email protected]"],
"env": {
// Install your virtual environment in `.venv`
"VENV_DIR": ".venv"
},
"shell": {
"init_hook": ". $VENV_DIR/bin/activate"
}
}
```

Expand All @@ -74,13 +72,10 @@ install:

```json
{
"packages": [
"[email protected]",
"python310Packages.pip"
],
"shell": {
"init_hook": ". $VENV_DIR/bin/activate"
}
"packages": ["[email protected]", "python310Packages.pip"],
"shell": {
"init_hook": ". $VENV_DIR/bin/activate"
}
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/devbox/devbox-examples/stacks/lapp/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ description:

```bash
devbox add postgresql@14 php php83Extensions.pgsql@latest [emailΒ protected]
```bash
```

1. Update `devbox.d/apache/httpd.conf` to point to the directory with your PHP files. You'll need to
update the `DocumentRoot` and `Directory` directives.
Expand Down
12 changes: 7 additions & 5 deletions docs/devbox/devbox-examples/stacks/laravel/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,26 @@ Devbox Plugins for all 3 Nix packages to simplify configuration

```bash
devbox add mariadb@latest, [emailΒ protected], nodejs@18, redis@latest, php81Packages.composer@latest
```bash
```

3. Run `devbox shell` to start your shell. This will also initialize your database by running
`initdb` in the init hook.

4. Create your laravel project by running:

```bash
composer create-project laravel/laravel tmpmv tmp/_ tmp/._ .
```
composer create-project laravel/laravel tmpmv tmp/* tmp/.* .
```bash

### Setting up MariaDB[​](#setting-up-mariadb "Direct link to Setting up MariaDB")

To use MariaDB, you need to create the default Laravel database. You can do this by running the
following commands in your `devbox shell`:

```
# Start the MariaDB servicedevbox services up mariadb -b# Create the databasemysql -u root -e "CREATE DATABASE laravel;"# Once you're done, stop the MariaDB servicedevbox services stop mariadb
```bash

# Start the MariaDB servicedevbox services up mariadb -b# Create the databasemysql -u root -e "CREATE DATABASE laravel;"# Once you're done, stop the MariaDB servicedevbox services stop mariadb

```

[Edit this page](https://github.com/jetify-com/docs/tree/main/docs/devbox/devbox-examples/stacks/laravel/index.mdx)
2 changes: 1 addition & 1 deletion docs/devbox/devbox-examples/stacks/lepp/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You can query Nginx on port 80, which will route to the PHP example.

```bash
devbox add postgresql@14 [emailΒ protected] php81Extensions.pgsql@latest [emailΒ protected]
```bash
```

1. Update `devbox.d/nginx/httpd.conf` to point to the directory with your PHP files. You'll need to
update the `root` directive to point to your project folder
Expand Down
3 changes: 3 additions & 0 deletions docs/devbox/guides/plugins/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,19 @@ provide a Github reference to a plugin hosted on Github. To install a github hos
following to the include section of your devbox.json

Default - `master` branch:

```
"include": [ "github:<org>/<repo>?dir=<plugin-dir>" ]
```

Branch override:

```
"include": [ "github:<org>/<repo>/<branch>?dir=<plugin-dir>" ]
```

Git Tag Pinning:

```
"include": [ "github:<org>/<repo>/tags/<tag-to-pin>?dir=<plugin-dir>" ]
```
Expand Down
6 changes: 3 additions & 3 deletions docs/devbox/guides/services/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ Django server, you could add the following yaml:
version: "0.5"
processes:
django:
command: python todo_project/manage.py runserver
availability:
restart: "always"
command: python todo_project/manage.py runserver
availability:
restart: "always"
```

This will now start your django service whenever you run `devbox services up`.
Expand Down
6 changes: 3 additions & 3 deletions docs/devbox/ide-configuration/direnv/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you have direnv installed, Devbox will generate an .envrc file when you run

```bash
➜ devbox generate direnvSuccess: generated .envrc fileSuccess: ran `direnv allow`direnv: loading ~/src/docs/devbox/.envrcdirenv: using devbox
```bash
```

This will generate a `.envrc` file in your project directory that contains `devbox.json`. Run
`direnv allow` to activate your shell upon directory navigation. Run `direnv revoke` to stop.
Expand Down Expand Up @@ -57,7 +57,7 @@ variable with a value of `my-custom-value`, you would run the following command:

```bash
devbox generate direnv --env MY_CUSTOM_ENV_VAR=my-value
```bash
```

The resulting .envrc will have the following:

Expand All @@ -73,7 +73,7 @@ root, you would run the following command:

```bash
devbox generate direnv --env-file .env.devbox
```bash
```

The resulting .envrc will have the following:

Expand Down
3 changes: 2 additions & 1 deletion docs/devbox/ide-configuration/eclipse/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ macOS terminal.
javac my_java_project/src/main/hello.java
```

6. Use `java` command to run the compiled project. For example, to run the sample project from above:
6. Use `java` command to run the compiled project. For example, to run the sample project from
above:

```bash
cd src/java main/hello
Expand Down
13 changes: 7 additions & 6 deletions docs/devbox/ide-configuration/vscode/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ follow the installation guide first. Then follow the steps below:
executable java binary inside the devbox shell. Copy and save that path. It should look something
like this:

```json
```json
/nix/store/qaf9fysymdoj19qtyg7209s83lajz65b-zulu17.34.19-ca-jdk-17.0.3/bin/java
```

Expand All @@ -124,7 +124,7 @@ follow the installation guide first. Then follow the steps below:
"projectName": "<project_name>",
"javaExec": "<path_to_java_executable_from_step_4>"
}
```json
```

Update the values in between \< and > to match your project and environment.

Expand All @@ -151,21 +151,22 @@ macOS terminal.
5. Use `javac` command to compile your Java project. As an example, if you have a simple hello world
project and the directory structure such as:

```
```bash
my_java_project/-- src/-- -- main/-- -- -- hello.java
```json
```

You can use the following command to compile: to compile:

```bash
javac my_java_project/src/main/hello.java
```

6. Use `java` command to run the compiled project. For example, to run the sample project from above:
6. Use `java` command to run the compiled project. For example, to run the sample project from
above:

```bash
cd src/java main/hello
```json
```

If this guide is missing something, feel free to contribute by opening a
[pull request](https://github.com/jetify-com/devbox/pulls) in Github.
Expand Down
22 changes: 13 additions & 9 deletions docs/devbox/installing-devbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ title: "Overview"

### Prerequisites

- Nix Package Manager
- Nix Package Manager

If Nix is not detected when running a command, Devbox will automatically install it for you.
Don't worry: You can use Devbox without needing to learn the Nix Language.
If you would like to install Nix yourself, we recommend the
If Nix is not detected when running a command, Devbox will automatically install it for you. Don't
worry: You can use Devbox without needing to learn the Nix Language. If you would like to install
Nix yourself, we recommend the
[Determinate Nix Installer](https://determinate.systems/nix-installer/).

### Installation Script
Expand All @@ -26,12 +26,13 @@ curl -fsSL https://get.jetify.com/devbox | bash
Run the install script as a **non-root user**.

Devbox will install Nix in single-user mode for Linux if not already present.
</Tab>

<Tab title="MacOS">
Devbox will install Nix in multi-user mode for macOS if not already present.
</Tab>

<Tab title="MacOS">
Devbox will install Nix in multi-user mode for macOS if not already present.
</Tab>

<Tab title="Windows/WSL2">
You can use Devbox on Windows using
[**Windows Subsystem for Linux 2**](https://learn.microsoft.com/en-us/windows/wsl/install).
Expand All @@ -51,15 +52,16 @@ curl -fsSL https://get.jetify.com/devbox | bash
```

If you are running an older version of Windows, you may need to follow the
[manual installation steps](https://learn.microsoft.com/en-us/windows/wsl/install-manual)
to enable virtualization and WSL2 on your system.
[manual installation steps](https://learn.microsoft.com/en-us/windows/wsl/install-manual)
to enable virtualization and WSL2 on your system.
See the [official docs](https://learn.microsoft.com/en-us/windows/wsl/install) for more details.

</Accordion>

Run the install script in your WSL2 terminal as a **non-root user**.

Devbox will install Nix in single-user mode for WSL2 if not already present.

</Tab>

<Tab title="NixOS/Nixpkg">
Expand Down Expand Up @@ -89,6 +91,7 @@ curl -fsSL https://get.jetify.com/devbox | bash
installation. If you want to use the latest version of Devbox, you can install it using the
[Nix Flake](/docs/devbox/installing-devbox/?install-method=flake).
</Note>

</Tab>

<Tab title="Nix Flake">
Expand All @@ -107,6 +110,7 @@ curl -fsSL https://get.jetify.com/devbox | bash
```bash
nix profile install github:jetify-com/devbox/0.13.2
```

</Tab>
</Tabs>

Expand Down
10 changes: 2 additions & 8 deletions docs/devbox/quickstart/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ README.md to add the badge

```html
<a href="https://www.jetify.com/devbox/docs/contributor-quickstart/">
<img
src="https://www.jetify.com/img/devbox/shield_galaxy.svg"
alt="Built with Devbox"
/>
<img src="https://www.jetify.com/img/devbox/shield_galaxy.svg" alt="Built with Devbox" />
</a>
```

Expand All @@ -143,10 +140,7 @@ README.md to add the badge

```html
<a href="https://www.jetify.com/devbox/docs/contributor-quickstart/">
<img
src="https://www.jetify.com/img/devbox/shield_moon.svg"
alt="Built with Devbox"
/>
<img src="https://www.jetify.com/img/devbox/shield_moon.svg" alt="Built with Devbox" />
</a>
```

Expand Down
34 changes: 27 additions & 7 deletions docs/testpilot/advanced/bash-tool.mdx
Original file line number Diff line number Diff line change
@@ -1,30 +1,48 @@
---
title: "Running scripts with Bash Tool"
description: "Learn how to use the Bash Tool in Testpilot to execute shell scripts as part of your testing workflow."
description:
"Learn how to use the Bash Tool in Testpilot to execute shell scripts as part of your testing
workflow."
sidebarTitle: "Running Scripts with Bash Tool"
---

Our recommended way to extend Testpilot's capabilities is through our [Model Context Protocol (MCP) integration](../model-context-protocol). However, for scenarios where you want Testpilot to run a simple script directly, or where adding an MCP server is not feasible, you can use Testpilot's Bash tool. Bash tool can be useful for tasks such as setting up test environments, performing system checks, or manipulating files during test execution.
Our recommended way to extend Testpilot's capabilities is through our
[Model Context Protocol (MCP) integration](../model-context-protocol). However, for scenarios where
you want Testpilot to run a simple script directly, or where adding an MCP server is not feasible,
you can use Testpilot's Bash tool. Bash tool can be useful for tasks such as setting up test
environments, performing system checks, or manipulating files during test execution.

<Warning>

The Bash tool executes shell commands directly on the machine where Testpilot is running. Be cautious when using it, especially with commands that modify system files or configurations, as it can pose security risks. If you want to restrict or provide a safer alternative to executing arbitrary shell commands, consider using the [Model Context Protocol (MCP) integration](../model-context-protocol) instead.
The Bash tool executes shell commands directly on the machine where Testpilot is running. Be
cautious when using it, especially with commands that modify system files or configurations, as it
can pose security risks. If you want to restrict or provide a safer alternative to executing
arbitrary shell commands, consider using the
[Model Context Protocol (MCP) integration](../model-context-protocol) instead.

</Warning>

## Enabling the Bash Tool

To enable the Bash tool in Testpilot, you will first need to set the `BASH_TOOL` environment variable to `true` in your Testpilot configuration. This can typically be done by adding the following line to your environment configuration file or setting it directly in your deployment environment:
To enable the Bash tool in Testpilot, you will first need to set the `BASH_TOOL` environment
variable to `true` in your Testpilot configuration. This can typically be done by adding the
following line to your environment configuration file or setting it directly in your deployment
environment:

```bash
export BASH_TOOL=true
```

## Using the Bash Tool in Test Cases

Once the Bash tool is enabled, you can use it in your test cases by adding a step that describes a script or command you want to execute. You should specify the relative path to the script, as well as any arguments you want Testpilot to pass to the script.
Once the Bash tool is enabled, you can use it in your test cases by adding a step that describes a
script or command you want to execute. You should specify the relative path to the script, as well
as any arguments you want Testpilot to pass to the script.

<Note>Testpilot will use your current working directory and shell environment as the context for executing scripts.</Note>
<Note>
Testpilot will use your current working directory and shell environment as the context for
executing scripts.
</Note>

Here is an example of how to define a test case that uses the Bash tool:

Expand Down Expand Up @@ -66,4 +84,6 @@ echo "Generated $COUNT test items"
exit 0
```

When you execute this test case, Testpilot will run the `generate-test-data.sh` script with the specified arguments, capture its output, and use that output to fill out the todo items on the TodoMVC application.
When you execute this test case, Testpilot will run the `generate-test-data.sh` script with the
specified arguments, capture its output, and use that output to fill out the todo items on the
TodoMVC application.
Loading