@ycs77/devbox 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -0
- package/bin/devbox.mjs +2 -0
- package/dist/cli.mjs +1998 -0
- package/package.json +32 -11
- package/dist/cli.js +0 -293
package/README.md
CHANGED
|
@@ -1,5 +1,121 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# @ycs77/devbox
|
|
2
4
|
|
|
5
|
+
**A containerized devbox for AI agents.**
|
|
6
|
+
|
|
7
|
+
[![NPM version][ico-version]][link-npm]
|
|
8
|
+
[![Software License][ico-license]](LICENSE)
|
|
9
|
+
[![GitHub Tests Action Status][ico-github-action]][link-github-action]
|
|
10
|
+
[![Total Downloads][ico-downloads]][link-downloads]
|
|
11
|
+
|
|
12
|
+
English | [繁體中文](README-zh-TW.md)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
Devbox gives each project an isolated Docker sandbox designed for AI agents, with Lucas's opinionated development setup. Choose the Node.js release lines and AI agents you use, then work from a consistent container without configuring it yourself.
|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
- **Container environment for AI agents:** choose Claude Code, Codex, and more during setup, then use them inside the sandbox.
|
|
25
|
+
- **Simple setup and project lifecycle:** initialize, start, enter, stop, and remove a sandbox with a few commands.
|
|
26
|
+
- **Flexible Node.js environments:** configure Node.js 22 and 24, then select a version for each project.
|
|
27
|
+
- **Selective builds:** build only the Node.js versions and AI agents you choose.
|
|
28
|
+
- **No project configuration files:** keep Devbox configuration local to your machine, not in your repository.
|
|
29
|
+
|
|
30
|
+
## Requirements
|
|
31
|
+
|
|
32
|
+
- **Node.js 22 or later:** installs and runs the CLI with npm.
|
|
33
|
+
- **Docker with Docker Compose:** runs the development sandbox.
|
|
34
|
+
- **Windows:** use Devbox from a **WSL2** Linux distribution with Docker Desktop integration enabled.
|
|
35
|
+
|
|
36
|
+
## Getting started
|
|
37
|
+
|
|
38
|
+
Install Devbox globally:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install -g @ycs77/devbox
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
From your project directory, initialize Devbox:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
devbox init
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The interactive setup lets you choose the Node.js release lines and AI agents to configure, then select the Node.js version for the current project.
|
|
51
|
+
|
|
52
|
+
Build the shared workspace image once after setup or after changing global configuration:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
devbox build
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Start the project sandbox:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
devbox up
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Open a shell inside the running sandbox and start working with your AI agent:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
devbox sh
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
For example, run `claude`, `codex`, `agy`, or `omp` after opening the shell when that agent was selected during setup.
|
|
71
|
+
|
|
72
|
+
## Everyday commands
|
|
73
|
+
|
|
74
|
+
Run these commands from the initialized project directory:
|
|
75
|
+
|
|
76
|
+
| Command | Description |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| `devbox up` | Start the project sandbox. |
|
|
79
|
+
| `devbox sh` | Open a Bash shell in the running sandbox. |
|
|
80
|
+
| `devbox stop` | Stop the sandbox and preserve it for a later restart. |
|
|
81
|
+
| `devbox down` | Stop and remove the sandbox container. |
|
|
82
|
+
| `devbox config` | Change the current project's Node.js selection. |
|
|
83
|
+
| `devbox config -g` | Change the globally configured Node.js versions or AI agents. |
|
|
84
|
+
|
|
85
|
+
## Troubleshooting
|
|
86
|
+
|
|
87
|
+
### A command says a Devbox marker is occupied
|
|
88
|
+
|
|
89
|
+
An interrupted process or sudden system shutdown can leave a command marker behind. First confirm that no Devbox process is still running, then remove only the stale marker and retry:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
rm -rf ~/.devbox/locks/<marker>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Markers are directories named `global` or `project-<hash>`. Do not remove a marker while its Devbox command is still running.
|
|
96
|
+
|
|
97
|
+
## Sponsor
|
|
98
|
+
|
|
99
|
+
If you think this package has helped you, please consider [Becoming a sponsor](https://www.patreon.com/ycs77) to support my work~ and your avatar will be visible on my major projects.
|
|
100
|
+
|
|
101
|
+
<p align="center">
|
|
102
|
+
<a href="https://www.patreon.com/ycs77">
|
|
103
|
+
<img src="https://cdn.jsdelivr.net/gh/ycs77/static/sponsors.svg" alt="Sponsors" />
|
|
104
|
+
</a>
|
|
105
|
+
</p>
|
|
106
|
+
|
|
107
|
+
<a href="https://www.patreon.com/ycs77">
|
|
108
|
+
<img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Become a Patron" />
|
|
109
|
+
</a>
|
|
110
|
+
|
|
3
111
|
## License
|
|
4
112
|
|
|
5
113
|
[MIT LICENSE](LICENSE)
|
|
114
|
+
|
|
115
|
+
[ico-version]: https://img.shields.io/npm/v/%40ycs77%2Fdevbox?style=flat-square
|
|
116
|
+
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen?style=flat-square
|
|
117
|
+
[ico-github-action]: https://img.shields.io/github/actions/workflow/status/ycs77/devbox/ci.yml?branch=main&label=tests&style=flat-square
|
|
118
|
+
[ico-downloads]: https://img.shields.io/npm/dt/%40ycs77%2Fdevbox?style=flat-square
|
|
119
|
+
[link-npm]: https://www.npmjs.com/package/%40ycs77%2Fdevbox
|
|
120
|
+
[link-github-action]: https://github.com/ycs77/devbox/actions/workflows/ci.yml?query=branch%3Amain
|
|
121
|
+
[link-downloads]: https://www.npmjs.com/package/%40ycs77%2Fdevbox
|
package/bin/devbox.mjs
ADDED