Skip to content

Commit 4950eaf

Browse files
Lagojamohsenari
andauthored
0.5.0 Docs (#999)
## Summary Includes Docs for: 1. Version selection 2. `includes` 3. Updated Devbox Cloud 4. CLI Changes ## How was it tested? Localhost --------- Co-authored-by: mohsenari <[email protected]>
1 parent e2478a2 commit 4950eaf

File tree

24 files changed

+432
-150
lines changed

24 files changed

+432
-150
lines changed

devbox.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
"version": "1.6.23"
88
},
99
10-
"last_modified": "2023-03-31T22:52:29Z",
11-
"resolved": "github:NixOS/nixpkgs/242246ee1e58f54d2322227fc5eef53b4a616a31#go",
12-
"version": "1.20.2"
10+
"last_modified": "2023-05-01T16:53:22Z",
11+
"resolved": "github:NixOS/nixpkgs/8670e496ffd093b60e74e7fa53526aa5920d09eb#go",
12+
"version": "1.20.3"
1313
},
1414
15-
"last_modified": "2023-03-31T22:52:29Z",
16-
"resolved": "github:NixOS/nixpkgs/242246ee1e58f54d2322227fc5eef53b4a616a31#golangci-lint",
15+
"last_modified": "2023-05-01T16:53:22Z",
16+
"resolved": "github:NixOS/nixpkgs/8670e496ffd093b60e74e7fa53526aa5920d09eb#golangci-lint",
1717
"version": "1.52.2"
1818
}
1919
}

docs/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22

33
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
44

5-
### Installation
5+
## Installation
66

7-
```
8-
$ cd docs/app # from the devbox root directory
9-
$ devbox shell # optional, develop inside a devbox
10-
$ yarn install # run in devbox shell
7+
```bash
8+
cd docs/app # from the devbox root directory
9+
devbox shell # optional, develop inside a devbox
10+
yarn install # run in devbox shell
1111
```
1212

1313
### Local Development
1414

15-
```
16-
$ yarn start
15+
```bash
16+
yarn start
1717
```
1818

1919
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
2020

2121
### Build
2222

23-
```
24-
$ yarn build
23+
```bash
24+
yarn build
2525
```
2626

2727
This command generates static content into the `build` directory and can be served using any static contents hosting service.

docs/app/devbox.lock

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"lockfile_version": "1",
3+
"packages": {
4+
"nodejs": {
5+
"last_modified": "",
6+
"resolved": "github:NixOS/nixpkgs/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62#nodejs",
7+
"version": ""
8+
},
9+
10+
"last_modified": "2021-05-01T16:03:07Z",
11+
"resolved": "github:NixOS/nixpkgs/17af7a98d2e7dfdfdae5292b8dbd7bab28eeaf8d#ripgrep",
12+
"version": "12.1.1"
13+
},
14+
"yarn": {
15+
"last_modified": "",
16+
"resolved": "github:NixOS/nixpkgs/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62#yarn",
17+
"version": ""
18+
}
19+
}
20+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# devbox search
2+
3+
Search for Nix packages
4+
5+
## Synopsis
6+
7+
`devbox search` will return a list of packages and versions that match your search query.
8+
9+
You can add a package to your project using `devbox add <package>`.
10+
11+
Too add a specific version, use `devbox add <package>@<version>`.
12+
13+
```bash
14+
devbox search <pkg> [flags]
15+
```
16+
17+
## Example
18+
19+
```bash
20+
$ devbox search ripgrep
21+
22+
Warning: Search is experimental and may not work as expected.
23+
24+
Found 8+ results for "ripgrep":
25+
26+
* ripgrep (13.0.0, 12.1.1, 12.0.1)
27+
* ripgrep-all (0.9.6, 0.9.5)
28+
29+
# To add ripgrep 12.1.1 to your project:
30+
31+
$ devbox add [email protected]
32+
```
33+
34+
## Options
35+
36+
<!-- Markdown Table of Options -->
37+
| Option | Description |
38+
| --- | --- |
39+
| `-h, --help` | help for shell |
40+
| `-q, --quiet` | Quiet mode: Suppresses logs. |
41+
42+
## SEE ALSO
43+
44+
* [devbox](./devbox.md) - Instant, easy, predictable shells and containers
45+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# devbox update
2+
3+
Updates packages within your project to the latest available version.
4+
5+
## Synopsis
6+
7+
If you provide this command with a list of packages, it will update those packages to the latest available version based on the version tag provided.
8+
9+
For example: if your project has `[email protected]` in your package list, running `devbox update` will update your project to the latest patch version of `python 3.11`.
10+
11+
If no packages are provided, this command will update all the versioned packages in your project to the latest acceptable version.
12+
13+
```bash
14+
devbox update [pkg]... [flags]
15+
```
16+
17+
18+
## Options
19+
20+
<!-- Markdown Table of Options -->
21+
| Option | Description |
22+
| --- | --- |
23+
| `-c, --config` | Path to devbox config file. |
24+
| `-h, --help` | help for shell |
25+
| `-q, --quiet` | Quiet mode: Suppresses logs. |
26+
27+
## SEE ALSO
28+
29+
* [devbox](./devbox.md) - Instant, easy, predictable shells and containers
30+

docs/app/docs/configuration.md

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Your devbox configuration is stored in a `devbox.json` file, located in your pro
1313
"init_hook": "...",
1414
"scripts": {}
1515
},
16+
"include": [],
1617
"nixpkgs": {
1718
"commit": "..."
1819
}
@@ -25,17 +26,33 @@ This is a list of Nix packages that should be installed in your Devbox shell and
2526

2627
You can add packages to your devbox.json using `devbox add <package_name>`, and remove them using `devbox rm <package_name>`
2728

29+
#### Pinning a Specific Version of a Package
30+
31+
You can pin a specific version of a package by adding a `@` followed by the version number to the end of the package name. For example, to pin the `go` package to version `1.19`, you can run `devbox add [email protected]`, or add `[email protected]` to the packages list in your `devbox.json`:
32+
33+
```json
34+
{
35+
"packages": [
36+
37+
]
38+
}
39+
```
40+
41+
Where possible, pinned packages follow semver. For example, if you pin `python@3`, it will install the latest version of `python` with major version `3`.
42+
43+
To see a list of packages and their available versions, you can run `devbox search <pkg>`.
44+
2845
#### Adding Packages from Flakes
2946

3047
You can add packages from flakes by adding a reference to the flake in the `packages` list in your `devbox.json`. We currently support installing Flakes from Github and local paths.
3148

3249
```json
3350
{
3451
"packages": [
35-
// Add the default package from a github repository
52+
// Add the default package from a github repository
3653
"github:numtide/flake-utils",
3754
// Install a specific attribute or package from a Github hosted flake
38-
"github:nix-community/fenix#stable.toolchain",
55+
"github:nix-community/fenix#stable.toolchain",
3956
// Install a package from a specific channel of Nixpkgs
4057
"github:nixos/nixpkgs/21.05#hello",
4158
// Install a package form a specific commit of Nixpkgs
@@ -63,7 +80,7 @@ For example, you could set variable `$FOO` to `bar` by adding the following to y
6380
}
6481
```
6582

66-
Currently, you can only set values using string literals, `$PWD`, and `$PATH`. Any other values with environment variables will not be expanded when starting your shell.
83+
Currently, you can only set values using string literals, `$PWD`, and `$PATH`. Any other values with environment variables will not be expanded when starting your shell.
6784

6885

6986
### Shell
@@ -72,9 +89,9 @@ The Shell object defines init hooks and scripts that can be run with your shell.
7289

7390
#### Init Hook
7491

75-
The init hook is used to run shell commands before the shell finishes setting up. This hook runs after any other `~/.*rc` scripts, allowing you to override environment variables or further customize the shell.
92+
The init hook is used to run shell commands before the shell finishes setting up. This hook runs after any other `~/.*rc` scripts, allowing you to override environment variables or further customize the shell.
7693

77-
The init hook will run every time a new shell is started using `devbox shell` or `devbox run`, and is best used for setting up environment variables, aliases, or other quick setup steps needed to configure your environment. For longer running tasks, you should consider using a Script.
94+
The init hook will run every time a new shell is started using `devbox shell` or `devbox run`, and is best used for setting up environment variables, aliases, or other quick setup steps needed to configure your environment. For longer running tasks, you should consider using a Script.
7895

7996
This is an example `devbox.json` that customizes the prompt and prints a welcome message:
8097

@@ -115,7 +132,7 @@ Scripts can be defined by giving a name, and one or more commands. Single comman
115132
}
116133
```
117134

118-
To run multiple commands in a single script, you can pass them as an array:
135+
To run multiple commands in a single script, you can pass them as an array:
119136

120137
```json
121138
{
@@ -130,14 +147,27 @@ To run multiple commands in a single script, you can pass them as an array:
130147
}
131148
```
132149

133-
### Nixpkgs
150+
### Includes
134151

135-
The Nixpkg object is used to optionally configure which version of the Nixpkgs repository you want Devbox to use for installing packages. It currently takes a single field, `commit`, which takes a commit hash for the specific revision of Nixpkgs you want to use.
152+
Includes can be used to explicitly add extra configuration or plugins to your Devbox project. Currently this only supports adding our [built-in plugins](guides/plugins.md) to your project.
136153

137-
If a Nixpkg commit is not set, Devbox will automatically add a default commit hash to your `devbox.json`. To upgrade your packages to the latest available versions in the future, you can replace the default hash with the latest nixpkgs-unstable hash from https://status.nixos.org
154+
You should use this section to activate plugins when you install a package from a [Flake](guides/using_flakes.md) that uses a plugin. To ensure that a plugin is activated for your project, add it to the `includes` section of your `devbox.json`. For example, to explicitly activate the PHP plugin, you can add the following to your `devbox.json`:
138155

139-
To learn more, consult our guide on [setting the Nixpkg commit hash](guides/pinning_packages.md).
156+
```json
157+
{
158+
"includes": [
159+
"plugin:php-config"
160+
]
161+
}
162+
```
140163

164+
### Nixpkgs
165+
166+
The Nixpkg object is used to optionally configure which version of the Nixpkgs repository you want Devbox to use as the default for installing packages. It currently takes a single field, `commit`, which takes a commit hash for the specific revision of Nixpkgs you want to use.
167+
168+
If a Nixpkg commit is not set, Devbox will automatically add a default commit hash to your `devbox.json`. To upgrade your packages to the latest available versions in the future, you can replace the default hash with the latest nixpkgs-unstable hash from https://status.nixos.org.
169+
170+
To learn more, consult our guide on [setting the Nixpkg commit hash](guides/pinning_packages.md).
141171

142172
### Example: A Rust Devbox
143173

@@ -150,6 +180,9 @@ An example of a devbox configuration for a Rust project called `hello_world` mig
150180
"cargo",
151181
"libiconv"
152182
],
183+
"env": {
184+
"RUST_BACKTRACE": "1"
185+
},
153186
"shell": {
154187
"init_hook": [
155188
"source conf/set-environment.sh",

docs/app/docs/contributor-quickstart.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 3
44
---
55
## Background
66

7-
Devbox is a command-line tool that lets you easily create reproducible, reliable dev environments. You start by defining the list of packages required by your development environment, and devbox uses that definition to create an isolated environment just for your application. Developers can start a dev environment for their project by running `devbox shell`.
7+
Devbox is a command-line tool that lets you easily create reproducible, reliable dev environments. You start by defining the list of packages required by your development environment, and devbox uses that definition to create an isolated environment just for your application. Developers can start a dev environment for their project by running `devbox shell`.
88

99
To learn more about how Devbox works, you can read our [introduction](index.md)
1010

@@ -23,7 +23,7 @@ Devbox requires the [Nix Package Manager](https://nixos.org/download.html). If N
2323

2424
## Start your development shell
2525

26-
1. Open a terminal in the project. The project should contain a `devbox.json` that specifies how to create your development environment
26+
1. Open a terminal in the project. The project should contain a `devbox.json` that specifies how to create your development environment
2727

2828
1. Start a devbox shell for your project:
2929

@@ -40,24 +40,26 @@ Devbox requires the [Nix Package Manager](https://nixos.org/download.html). If N
4040
```
4141

4242
:::info
43-
The first time you run `devbox shell` may take a while to complete due to Devbox downloading prerequisites and package catalogs required by Nix. This delay is a one-time cost, and future invocations and package additions should resolve much faster.
43+
The first time you run `devbox shell` may take a while to complete due to Devbox downloading prerequisites and package catalogs required by Nix. This delay is a one-time cost, and future invocations and package additions should resolve much faster.
4444
:::
4545

4646
1. Use the packages provided in your development environment
4747

48-
The packages listed in your project's `devbox.json` should now be available for you to use. For example, if the project's `devbox.json` contains `python310`, you should now have `python` in your path:
48+
The packages listed in your project's `devbox.json` should now be available for you to use. For example, if the project's `devbox.json` contains `[email protected]`, you should now have `python` in your path:
4949

5050
```bash
51-
python --version
51+
$ python --version
52+
Python 3.10.9
5253
```
53-
The above should return 3.10
5454

5555
1. Your host environment's packages and tools are also available, including environment variables and config settings.
5656
5757
```bash
5858
git config --get user.name
5959
```
6060
61+
1. You can search for additional packages using `devbox search <pkg>`. You can then add them to your Devbox shell by running `devbox add [pkgs]`
62+
6163
1. To exit the Devbox shell and return to your regular shell:
6264
6365
```bash
@@ -78,4 +80,4 @@ Devbox requires the [Nix Package Manager](https://nixos.org/download.html). If N
7880
7981
### Get Involved
8082
* **[Join our Discord Community](https://discord.gg/jetpack-io):** Chat with the development team and our growing community of Devbox users.
81-
* **[Visit us on Github](https://github.com/jetpack-io/devbox):** File issues and provide feedback, or even open a PR to contribute to Devbox or our Docs.
83+
* **[Visit us on Github](https://github.com/jetpack-io/devbox):** File issues and provide feedback, or even open a PR to contribute to Devbox or our Docs.

docs/app/docs/devbox_cloud/beta_faq.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,31 @@ sidebar_position: 4
55

66
### What do I need to use Devbox Cloud?
77

8-
To use Devbox Cloud from your Browser, you will need a Github Account.
8+
To use Devbox Cloud from your Browser, you will need a Github Account.
99

10-
To use Devbox Cloud from your CLI, you will need:
10+
To use Devbox Cloud from your CLI, you will need:
1111

1212
* A Github account with linked SSH keys
13-
* Devbox 0.3.0 or later
13+
* Devbox 0.3.0 or later
1414

1515
### Does my project need to use Devbox to use Devbox Cloud?
1616

1717
While you can open any Github Repo in a Devbox Cloud Shell, you will need a `devbox.json` to install packages or configure the environment. You can create a `devbox.json` in your shell by running `devbox init`
1818

1919
### Can I use my own IDE or editor with Devbox Cloud?
2020

21-
Yes! You can use your own tools when you start Devbox Cloud from the terminal. See our [Getting Started Guide](getting_started.md) for more details
21+
Devbox.sh provides a Cloud IDE that you can use to edit your projects in the browser, but you can also open your project in your local VSCode Editor by clicking the open in desktop button.
22+
23+
You can also use your own tools when you start Devbox Cloud from the terminal or SSH. See our [Getting Started Guide](getting_started.mdx) for more details.
2224

2325
### Do I have to pay to use Devbox Cloud during the Open Beta?
2426

25-
Devbox Cloud is free to use during the Open Beta period, subject to the restrictions listed below. We expect to continue offering a free tier for personal use after the Open Beta period, but we will offer Paid Plans that provide more resources, concurrency, and persistence.
27+
Devbox Cloud is free to use during the Open Beta period, subject to the restrictions listed below. We expect to continue offering a free tier for personal use after the Open Beta period, but we will offer Paid Plans that provide more resources, projects, and persistence.
2628

2729
### What are the resource limits for Devbox Cloud VMs
2830

29-
* **CPU**: 1 Core, shared
30-
* **RAM**: 1 GB
31+
* **CPU**: 4 Cores
32+
* **RAM**: 8 GB
3133
* **SSD**: 8 GB
3234

3335
If you need additional resources for your project, please reach out to us for **[Early Access](https://jetpack-io.typeform.com/devbox-cloud)**
@@ -38,18 +40,18 @@ Future releases will add more flexibility and features as part of our paid plans
3840

3941
### What OS does Devbox Cloud use?
4042

41-
Alpine Linux 3.17.1, running on a x86-64 platform
43+
Debian Linux, running on a x86-64 platform
4244

4345
### How many VM's can I run concurrently?
4446

45-
You can have up to 3 concurrent VMs per Github Account.
47+
You can have up to 5 concurrent projects per Github Account.
4648

4749
### How long will my Devbox Cloud Shell stay alive for?
4850

49-
VMs will stay alive for up to 5 minutes after a user disconnects. After that point, the VM and all data will be deleted.
51+
VMs will stay alive for up to 8 hours after going idle. After that point, the VM and all data will be deleted.
5052

5153
### Where will Devbox run my VM?
5254

53-
Devbox VMs are run as Fly Machines in local Data Centers. To minimize latency, Devbox Cloud will attempt to create a Fly Machine as close to your current location as possible.
55+
Devbox VMs are run as Fly Machines in local Data Centers. To minimize latency, Devbox Cloud will attempt to create a Fly Machine as close to your current location as possible.
5456

5557

0 commit comments

Comments
 (0)