[refactor] moving cubes into own package"
Publish snapshot / snapshot (push) Successful in 1m2s

[fix] default parameter run records parameters in session for replay[fix] remove default parameters for several cubes
This commit is contained in:
Benjamin Diedrichsen
2026-07-28 12:18:10 +02:00
parent ac050c4459
commit 6ecb2c366f
130 changed files with 3386 additions and 520 deletions
@@ -0,0 +1,39 @@
# apt:essentials
**Install essential packages**
## Purpose
This cube installs a curated collection of essential development tools and utilities that are commonly needed for server environments and development workflows.
## What This Cube Does
Installs the following packages via apt:
- **fish** - User-friendly command-line shell with autosuggestions and syntax highlighting
- **ranger** - Terminal-based file manager with vi key bindings
- **golang-go** - Go programming language compiler and tools
- **build-essential** - Essential compilation tools (gcc, g++, make, etc.)
- **python3** - Python 3 interpreter and standard library
- **pkg-config** - Helper tool for compiling applications and libraries
- **age** - Modern file encryption tool with small explicit keys
## Configuration
### Parameters
- **UPDATE** (boolean, default: `true`)
- If already installed, should packages be updated?
- Set to `false` to skip package cache updates and only install missing packages
## Dependencies
None - this cube can run standalone.
## Use Cases
This cube is ideal as a base dependency for other cubes that require:
- Basic development tools
- Modern shell environments
- File encryption capabilities
- Python or Go runtimes
@@ -0,0 +1,18 @@
from pyinfra.operations import apt
from pyinfra import host
UPDATE = host.data.UPDATE
apt.packages(
name='Install essentials',
packages=[
'fish',
'build-essential',
'python3',
'pkg-config',
'age'
],
update=UPDATE,
_sudo=True
)
@@ -0,0 +1,11 @@
import { Manifest } from '@bitsquare/nopy-cube';
import { z } from 'zod';
export default Manifest({
id: 'apt:essentials',
name: 'Install essential packages',
dependencies: () => [],
schema: z.object({
UPDATE: z.boolean().describe('If already installed should packages be updated').default(true),
}),
});
@@ -0,0 +1,62 @@
# apt
**Install packages with apt**
## Purpose
This is a generic cube for installing custom packages via the apt package manager. It's useful when you need to install specific packages that aren't covered by other specialized cubes.
## What This Cube Does
1. Optionally updates the apt package cache
2. Installs the specified space-separated list of packages
## Configuration
### Parameters
- **UPDATE** (boolean, default: `true`)
- Update package cache before installing
- Set to `false` to skip updating and only install packages
- **PACKAGES** (string, default: `''`)
- Space-separated list of packages to install
- Example: `"vim git htop curl wget"`
## Dependencies
None - this cube can run standalone.
## Use Cases
Install development tools:
```
PACKAGES="vim git htop tmux"
```
Install database clients:
```
PACKAGES="postgresql-client mysql-client redis-tools"
```
Install system utilities:
```
PACKAGES="curl wget jq unzip zip"
```
## Example
When deploying this cube, you would typically configure it like:
```javascript
exec('apt', {
PACKAGES: 'nginx certbot python3-certbot-nginx',
UPDATE: true
})
```
## Notes
- Package names must match exact apt package names
- Invalid package names will cause the installation to fail
- Use `apt search <package>` to find package names
- Some packages may require additional configuration after installation
@@ -0,0 +1,31 @@
from pyinfra.operations import apt
from pyinfra import host
UPDATE = host.data.UPDATE
PACKAGES = str(host.data.PACKAGES).split(' ')
apt.packages(
name='Install essential packages',
packages=[
'htop',
'age',
'git',
'curl',
'nano',
'wget',
'ca-certificates',
'ufw',
"gnupg",
"lsb-release"
],
update=UPDATE,
_sudo=True
)
apt.packages(
name='Install custom packages',
packages=[p.strip() for p in PACKAGES if p],
update=UPDATE,
_sudo=True
)
@@ -0,0 +1,15 @@
import { Manifest } from '@bitsquare/nopy-cube';
import { z } from 'zod';
export default Manifest({
id: 'apt:install',
name: 'Install packages with apt',
dependencies: () => [],
schema: z.object({
UPDATE: z.boolean().describe('Update package cache before installing').default(false),
PACKAGES: z
.string()
.describe('Space-separated list of packages to install')
.default('vim htop curl'),
}),
});