@fredlackey/devutils 0.0.1
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 +156 -0
- package/bin/dev.js +16 -0
- package/files/README.md +0 -0
- package/files/claude/.claude/commands/setup-context.md +3 -0
- package/files/monorepos/_archive/README.md +36 -0
- package/files/monorepos/_legacy/README.md +36 -0
- package/files/monorepos/ai-docs/README.md +33 -0
- package/files/monorepos/apps/README.md +24 -0
- package/files/monorepos/docs/README.md +40 -0
- package/files/monorepos/packages/README.md +25 -0
- package/files/monorepos/research/README.md +29 -0
- package/files/monorepos/scripts/README.md +24 -0
- package/package.json +39 -0
- package/src/cli.js +68 -0
- package/src/commands/README.md +41 -0
- package/src/commands/configure.js +199 -0
- package/src/commands/identity.js +1630 -0
- package/src/commands/ignore.js +247 -0
- package/src/commands/install.js +173 -0
- package/src/commands/setup.js +212 -0
- package/src/commands/status.js +223 -0
- package/src/completion.js +284 -0
- package/src/constants.js +45 -0
- package/src/ignore/claude-code.txt +10 -0
- package/src/ignore/docker.txt +18 -0
- package/src/ignore/linux.txt +23 -0
- package/src/ignore/macos.txt +36 -0
- package/src/ignore/node.txt +55 -0
- package/src/ignore/terraform.txt +37 -0
- package/src/ignore/vscode.txt +18 -0
- package/src/ignore/windows.txt +35 -0
- package/src/index.js +0 -0
- package/src/installs/README.md +399 -0
- package/src/installs/adobe-creative-cloud.js +44 -0
- package/src/installs/appcleaner.js +44 -0
- package/src/installs/atomicparsley.js +44 -0
- package/src/installs/aws-cli.js +44 -0
- package/src/installs/balena-etcher.js +44 -0
- package/src/installs/bambu-studio.js +44 -0
- package/src/installs/bash-completion.js +44 -0
- package/src/installs/bash.js +44 -0
- package/src/installs/beyond-compare.js +44 -0
- package/src/installs/build-essential.js +44 -0
- package/src/installs/caffeine.js +44 -0
- package/src/installs/camtasia.js +44 -0
- package/src/installs/chatgpt.js +44 -0
- package/src/installs/chrome-canary.js +44 -0
- package/src/installs/chromium.js +44 -0
- package/src/installs/claude-code.js +44 -0
- package/src/installs/curl.js +44 -0
- package/src/installs/cursor.js +44 -0
- package/src/installs/dbschema.js +44 -0
- package/src/installs/docker.js +44 -0
- package/src/installs/drawio.js +44 -0
- package/src/installs/elmedia-player.js +44 -0
- package/src/installs/ffmpeg.js +44 -0
- package/src/installs/gemini-cli.js +44 -0
- package/src/installs/git.js +44 -0
- package/src/installs/gitego.js +44 -0
- package/src/installs/go.js +44 -0
- package/src/installs/google-chrome.js +44 -0
- package/src/installs/gpg.js +141 -0
- package/src/installs/homebrew.js +44 -0
- package/src/installs/imageoptim.js +44 -0
- package/src/installs/jq.js +44 -0
- package/src/installs/keyboard-maestro.js +44 -0
- package/src/installs/latex.js +44 -0
- package/src/installs/lftp.js +44 -0
- package/src/installs/messenger.js +44 -0
- package/src/installs/microsoft-office.js +44 -0
- package/src/installs/microsoft-teams.js +44 -0
- package/src/installs/node.js +44 -0
- package/src/installs/nordpass.js +44 -0
- package/src/installs/nvm.js +44 -0
- package/src/installs/openssh.js +134 -0
- package/src/installs/pandoc.js +44 -0
- package/src/installs/pinentry.js +44 -0
- package/src/installs/pngyu.js +44 -0
- package/src/installs/postman.js +44 -0
- package/src/installs/safari-tech-preview.js +44 -0
- package/src/installs/sfnt2woff.js +44 -0
- package/src/installs/shellcheck.js +44 -0
- package/src/installs/slack.js +44 -0
- package/src/installs/snagit.js +44 -0
- package/src/installs/spotify.js +44 -0
- package/src/installs/studio-3t.js +44 -0
- package/src/installs/sublime-text.js +44 -0
- package/src/installs/superwhisper.js +44 -0
- package/src/installs/tailscale.js +44 -0
- package/src/installs/termius.js +44 -0
- package/src/installs/terraform.js +44 -0
- package/src/installs/tidal.js +44 -0
- package/src/installs/tmux.js +44 -0
- package/src/installs/tree.js +44 -0
- package/src/installs/vim.js +44 -0
- package/src/installs/vlc.js +44 -0
- package/src/installs/vscode.js +44 -0
- package/src/installs/whatsapp.js +44 -0
- package/src/installs/woff2.js +44 -0
- package/src/installs/xcode.js +44 -0
- package/src/installs/yarn.js +44 -0
- package/src/installs/yq.js +44 -0
- package/src/installs/yt-dlp.js +44 -0
- package/src/installs/zoom.js +44 -0
- package/src/scripts/README.md +95 -0
- package/src/scripts/afk.js +23 -0
- package/src/scripts/backup-all.js +24 -0
- package/src/scripts/backup-source.js +24 -0
- package/src/scripts/brewd.js +23 -0
- package/src/scripts/brewi.js +24 -0
- package/src/scripts/brewr.js +24 -0
- package/src/scripts/brews.js +24 -0
- package/src/scripts/brewu.js +23 -0
- package/src/scripts/c.js +23 -0
- package/src/scripts/ccurl.js +24 -0
- package/src/scripts/certbot-crontab-init.js +24 -0
- package/src/scripts/certbot-init.js +25 -0
- package/src/scripts/ch.js +23 -0
- package/src/scripts/claude-danger.js +23 -0
- package/src/scripts/clean-dev.js +24 -0
- package/src/scripts/clear-dns-cache.js +23 -0
- package/src/scripts/clone.js +25 -0
- package/src/scripts/code-all.js +24 -0
- package/src/scripts/count-files.js +24 -0
- package/src/scripts/count-folders.js +24 -0
- package/src/scripts/count.js +24 -0
- package/src/scripts/d.js +23 -0
- package/src/scripts/datauri.js +24 -0
- package/src/scripts/delete-files.js +24 -0
- package/src/scripts/docker-clean.js +24 -0
- package/src/scripts/dp.js +23 -0
- package/src/scripts/e.js +24 -0
- package/src/scripts/empty-trash.js +23 -0
- package/src/scripts/evm.js +25 -0
- package/src/scripts/fetch-github-repos.js +25 -0
- package/src/scripts/get-channel.js +24 -0
- package/src/scripts/get-course.js +26 -0
- package/src/scripts/get-dependencies.js +25 -0
- package/src/scripts/get-folder.js +26 -0
- package/src/scripts/get-tunes.js +25 -0
- package/src/scripts/get-video.js +24 -0
- package/src/scripts/git-backup.js +25 -0
- package/src/scripts/git-clone.js +25 -0
- package/src/scripts/git-pup.js +23 -0
- package/src/scripts/git-push.js +24 -0
- package/src/scripts/h.js +24 -0
- package/src/scripts/hide-desktop-icons.js +23 -0
- package/src/scripts/hide-hidden-files.js +23 -0
- package/src/scripts/install-dependencies-from.js +25 -0
- package/src/scripts/ips.js +26 -0
- package/src/scripts/iso.js +24 -0
- package/src/scripts/killni.js +23 -0
- package/src/scripts/ll.js +24 -0
- package/src/scripts/local-ip.js +23 -0
- package/src/scripts/m.js +24 -0
- package/src/scripts/map.js +24 -0
- package/src/scripts/mkd.js +24 -0
- package/src/scripts/ncu-update-all.js +24 -0
- package/src/scripts/nginx-init.js +28 -0
- package/src/scripts/npmi.js +23 -0
- package/src/scripts/o.js +24 -0
- package/src/scripts/org-by-date.js +24 -0
- package/src/scripts/p.js +23 -0
- package/src/scripts/packages.js +25 -0
- package/src/scripts/path.js +23 -0
- package/src/scripts/ports.js +23 -0
- package/src/scripts/q.js +23 -0
- package/src/scripts/refresh-files.js +26 -0
- package/src/scripts/remove-smaller-files.js +24 -0
- package/src/scripts/rename-files-with-date.js +25 -0
- package/src/scripts/resize-image.js +25 -0
- package/src/scripts/rm-safe.js +24 -0
- package/src/scripts/s.js +24 -0
- package/src/scripts/set-git-public.js +23 -0
- package/src/scripts/show-desktop-icons.js +23 -0
- package/src/scripts/show-hidden-files.js +23 -0
- package/src/scripts/tpa.js +23 -0
- package/src/scripts/tpo.js +23 -0
- package/src/scripts/u.js +23 -0
- package/src/scripts/vpush.js +23 -0
- package/src/scripts/y.js +23 -0
- package/src/utils/README.md +95 -0
- package/src/utils/common/apps.js +143 -0
- package/src/utils/common/display.js +157 -0
- package/src/utils/common/network.js +185 -0
- package/src/utils/common/os.js +202 -0
- package/src/utils/common/package-manager.js +301 -0
- package/src/utils/common/privileges.js +138 -0
- package/src/utils/common/shell.js +195 -0
- package/src/utils/macos/apps.js +228 -0
- package/src/utils/macos/brew.js +315 -0
- package/src/utils/ubuntu/apt.js +301 -0
- package/src/utils/ubuntu/desktop.js +292 -0
- package/src/utils/ubuntu/snap.js +302 -0
- package/src/utils/ubuntu/systemd.js +286 -0
- package/src/utils/windows/choco.js +327 -0
- package/src/utils/windows/env.js +246 -0
- package/src/utils/windows/registry.js +269 -0
- package/src/utils/windows/shell.js +240 -0
- package/src/utils/windows/winget.js +378 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Install Tree.
|
|
5
|
+
* @module installs/tree
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require('../utils/common/os');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Install Tree across supported platforms.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function install() {
|
|
16
|
+
const platform = os.detect();
|
|
17
|
+
|
|
18
|
+
switch (platform.type) {
|
|
19
|
+
case 'macos':
|
|
20
|
+
// TODO: Implement macOS installation
|
|
21
|
+
break;
|
|
22
|
+
case 'debian':
|
|
23
|
+
// TODO: Implement Debian/Ubuntu installation
|
|
24
|
+
break;
|
|
25
|
+
case 'rhel':
|
|
26
|
+
// TODO: Implement RHEL/Amazon Linux installation
|
|
27
|
+
break;
|
|
28
|
+
case 'windows-wsl':
|
|
29
|
+
// TODO: Implement WSL installation
|
|
30
|
+
break;
|
|
31
|
+
case 'windows':
|
|
32
|
+
// TODO: Implement Windows installation
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
console.error(`Unsupported platform: ${platform.type}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = { install };
|
|
41
|
+
|
|
42
|
+
if (require.main === module) {
|
|
43
|
+
install();
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Install Vim.
|
|
5
|
+
* @module installs/vim
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require('../utils/common/os');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Install Vim across supported platforms.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function install() {
|
|
16
|
+
const platform = os.detect();
|
|
17
|
+
|
|
18
|
+
switch (platform.type) {
|
|
19
|
+
case 'macos':
|
|
20
|
+
// TODO: Implement macOS installation
|
|
21
|
+
break;
|
|
22
|
+
case 'debian':
|
|
23
|
+
// TODO: Implement Debian/Ubuntu installation
|
|
24
|
+
break;
|
|
25
|
+
case 'rhel':
|
|
26
|
+
// TODO: Implement RHEL/Amazon Linux installation
|
|
27
|
+
break;
|
|
28
|
+
case 'windows-wsl':
|
|
29
|
+
// TODO: Implement WSL installation
|
|
30
|
+
break;
|
|
31
|
+
case 'windows':
|
|
32
|
+
// TODO: Implement Windows installation
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
console.error(`Unsupported platform: ${platform.type}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = { install };
|
|
41
|
+
|
|
42
|
+
if (require.main === module) {
|
|
43
|
+
install();
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Install VLC.
|
|
5
|
+
* @module installs/vlc
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require('../utils/common/os');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Install VLC across supported platforms.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function install() {
|
|
16
|
+
const platform = os.detect();
|
|
17
|
+
|
|
18
|
+
switch (platform.type) {
|
|
19
|
+
case 'macos':
|
|
20
|
+
// TODO: Implement macOS installation
|
|
21
|
+
break;
|
|
22
|
+
case 'debian':
|
|
23
|
+
// TODO: Implement Debian/Ubuntu installation
|
|
24
|
+
break;
|
|
25
|
+
case 'rhel':
|
|
26
|
+
// TODO: Implement RHEL/Amazon Linux installation
|
|
27
|
+
break;
|
|
28
|
+
case 'windows-wsl':
|
|
29
|
+
// TODO: Implement WSL installation
|
|
30
|
+
break;
|
|
31
|
+
case 'windows':
|
|
32
|
+
// TODO: Implement Windows installation
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
console.error(`Unsupported platform: ${platform.type}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = { install };
|
|
41
|
+
|
|
42
|
+
if (require.main === module) {
|
|
43
|
+
install();
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Install Visual Studio Code.
|
|
5
|
+
* @module installs/vscode
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require('../utils/common/os');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Install Visual Studio Code across supported platforms.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function install() {
|
|
16
|
+
const platform = os.detect();
|
|
17
|
+
|
|
18
|
+
switch (platform.type) {
|
|
19
|
+
case 'macos':
|
|
20
|
+
// TODO: Implement macOS installation
|
|
21
|
+
break;
|
|
22
|
+
case 'debian':
|
|
23
|
+
// TODO: Implement Debian/Ubuntu installation
|
|
24
|
+
break;
|
|
25
|
+
case 'rhel':
|
|
26
|
+
// TODO: Implement RHEL/Amazon Linux installation
|
|
27
|
+
break;
|
|
28
|
+
case 'windows-wsl':
|
|
29
|
+
// TODO: Implement WSL installation
|
|
30
|
+
break;
|
|
31
|
+
case 'windows':
|
|
32
|
+
// TODO: Implement Windows installation
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
console.error(`Unsupported platform: ${platform.type}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = { install };
|
|
41
|
+
|
|
42
|
+
if (require.main === module) {
|
|
43
|
+
install();
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Install WhatsApp.
|
|
5
|
+
* @module installs/whatsapp
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require('../utils/common/os');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Install WhatsApp across supported platforms.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function install() {
|
|
16
|
+
const platform = os.detect();
|
|
17
|
+
|
|
18
|
+
switch (platform.type) {
|
|
19
|
+
case 'macos':
|
|
20
|
+
// TODO: Implement macOS installation
|
|
21
|
+
break;
|
|
22
|
+
case 'debian':
|
|
23
|
+
// TODO: Implement Debian/Ubuntu installation
|
|
24
|
+
break;
|
|
25
|
+
case 'rhel':
|
|
26
|
+
// TODO: Implement RHEL/Amazon Linux installation
|
|
27
|
+
break;
|
|
28
|
+
case 'windows-wsl':
|
|
29
|
+
// TODO: Implement WSL installation
|
|
30
|
+
break;
|
|
31
|
+
case 'windows':
|
|
32
|
+
// TODO: Implement Windows installation
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
console.error(`Unsupported platform: ${platform.type}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = { install };
|
|
41
|
+
|
|
42
|
+
if (require.main === module) {
|
|
43
|
+
install();
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Install WOFF2.
|
|
5
|
+
* @module installs/woff2
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require('../utils/common/os');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Install WOFF2 across supported platforms.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function install() {
|
|
16
|
+
const platform = os.detect();
|
|
17
|
+
|
|
18
|
+
switch (platform.type) {
|
|
19
|
+
case 'macos':
|
|
20
|
+
// TODO: Implement macOS installation
|
|
21
|
+
break;
|
|
22
|
+
case 'debian':
|
|
23
|
+
// TODO: Implement Debian/Ubuntu installation
|
|
24
|
+
break;
|
|
25
|
+
case 'rhel':
|
|
26
|
+
// TODO: Implement RHEL/Amazon Linux installation
|
|
27
|
+
break;
|
|
28
|
+
case 'windows-wsl':
|
|
29
|
+
// TODO: Implement WSL installation
|
|
30
|
+
break;
|
|
31
|
+
case 'windows':
|
|
32
|
+
// TODO: Implement Windows installation
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
console.error(`Unsupported platform: ${platform.type}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = { install };
|
|
41
|
+
|
|
42
|
+
if (require.main === module) {
|
|
43
|
+
install();
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Install Xcode Command Line Tools.
|
|
5
|
+
* @module installs/xcode
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require('../utils/common/os');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Install Xcode Command Line Tools across supported platforms.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function install() {
|
|
16
|
+
const platform = os.detect();
|
|
17
|
+
|
|
18
|
+
switch (platform.type) {
|
|
19
|
+
case 'macos':
|
|
20
|
+
// TODO: Implement macOS installation
|
|
21
|
+
break;
|
|
22
|
+
case 'debian':
|
|
23
|
+
// TODO: Implement Debian/Ubuntu installation
|
|
24
|
+
break;
|
|
25
|
+
case 'rhel':
|
|
26
|
+
// TODO: Implement RHEL/Amazon Linux installation
|
|
27
|
+
break;
|
|
28
|
+
case 'windows-wsl':
|
|
29
|
+
// TODO: Implement WSL installation
|
|
30
|
+
break;
|
|
31
|
+
case 'windows':
|
|
32
|
+
// TODO: Implement Windows installation
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
console.error(`Unsupported platform: ${platform.type}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = { install };
|
|
41
|
+
|
|
42
|
+
if (require.main === module) {
|
|
43
|
+
install();
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Install Yarn.
|
|
5
|
+
* @module installs/yarn
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require('../utils/common/os');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Install Yarn across supported platforms.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function install() {
|
|
16
|
+
const platform = os.detect();
|
|
17
|
+
|
|
18
|
+
switch (platform.type) {
|
|
19
|
+
case 'macos':
|
|
20
|
+
// TODO: Implement macOS installation
|
|
21
|
+
break;
|
|
22
|
+
case 'debian':
|
|
23
|
+
// TODO: Implement Debian/Ubuntu installation
|
|
24
|
+
break;
|
|
25
|
+
case 'rhel':
|
|
26
|
+
// TODO: Implement RHEL/Amazon Linux installation
|
|
27
|
+
break;
|
|
28
|
+
case 'windows-wsl':
|
|
29
|
+
// TODO: Implement WSL installation
|
|
30
|
+
break;
|
|
31
|
+
case 'windows':
|
|
32
|
+
// TODO: Implement Windows installation
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
console.error(`Unsupported platform: ${platform.type}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = { install };
|
|
41
|
+
|
|
42
|
+
if (require.main === module) {
|
|
43
|
+
install();
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Install yq.
|
|
5
|
+
* @module installs/yq
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require('../utils/common/os');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Install yq across supported platforms.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function install() {
|
|
16
|
+
const platform = os.detect();
|
|
17
|
+
|
|
18
|
+
switch (platform.type) {
|
|
19
|
+
case 'macos':
|
|
20
|
+
// TODO: Implement macOS installation
|
|
21
|
+
break;
|
|
22
|
+
case 'debian':
|
|
23
|
+
// TODO: Implement Debian/Ubuntu installation
|
|
24
|
+
break;
|
|
25
|
+
case 'rhel':
|
|
26
|
+
// TODO: Implement RHEL/Amazon Linux installation
|
|
27
|
+
break;
|
|
28
|
+
case 'windows-wsl':
|
|
29
|
+
// TODO: Implement WSL installation
|
|
30
|
+
break;
|
|
31
|
+
case 'windows':
|
|
32
|
+
// TODO: Implement Windows installation
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
console.error(`Unsupported platform: ${platform.type}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = { install };
|
|
41
|
+
|
|
42
|
+
if (require.main === module) {
|
|
43
|
+
install();
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Install yt-dlp.
|
|
5
|
+
* @module installs/yt-dlp
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require('../utils/common/os');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Install yt-dlp across supported platforms.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function install() {
|
|
16
|
+
const platform = os.detect();
|
|
17
|
+
|
|
18
|
+
switch (platform.type) {
|
|
19
|
+
case 'macos':
|
|
20
|
+
// TODO: Implement macOS installation
|
|
21
|
+
break;
|
|
22
|
+
case 'debian':
|
|
23
|
+
// TODO: Implement Debian/Ubuntu installation
|
|
24
|
+
break;
|
|
25
|
+
case 'rhel':
|
|
26
|
+
// TODO: Implement RHEL/Amazon Linux installation
|
|
27
|
+
break;
|
|
28
|
+
case 'windows-wsl':
|
|
29
|
+
// TODO: Implement WSL installation
|
|
30
|
+
break;
|
|
31
|
+
case 'windows':
|
|
32
|
+
// TODO: Implement Windows installation
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
console.error(`Unsupported platform: ${platform.type}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = { install };
|
|
41
|
+
|
|
42
|
+
if (require.main === module) {
|
|
43
|
+
install();
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Install Zoom.
|
|
5
|
+
* @module installs/zoom
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require('../utils/common/os');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Install Zoom across supported platforms.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function install() {
|
|
16
|
+
const platform = os.detect();
|
|
17
|
+
|
|
18
|
+
switch (platform.type) {
|
|
19
|
+
case 'macos':
|
|
20
|
+
// TODO: Implement macOS installation
|
|
21
|
+
break;
|
|
22
|
+
case 'debian':
|
|
23
|
+
// TODO: Implement Debian/Ubuntu installation
|
|
24
|
+
break;
|
|
25
|
+
case 'rhel':
|
|
26
|
+
// TODO: Implement RHEL/Amazon Linux installation
|
|
27
|
+
break;
|
|
28
|
+
case 'windows-wsl':
|
|
29
|
+
// TODO: Implement WSL installation
|
|
30
|
+
break;
|
|
31
|
+
case 'windows':
|
|
32
|
+
// TODO: Implement Windows installation
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
console.error(`Unsupported platform: ${platform.type}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = { install };
|
|
41
|
+
|
|
42
|
+
if (require.main === module) {
|
|
43
|
+
install();
|
|
44
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Scripts
|
|
2
|
+
|
|
3
|
+
This folder contains **Scripts** — standalone global utilities that replace shell aliases and functions from dotfiles.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Scripts are single-command utilities that can be invoked directly from the command line after installing the package globally. They provide cross-platform implementations of common shell aliases and functions.
|
|
8
|
+
|
|
9
|
+
## Examples
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
afk # Lock screen / sleep
|
|
13
|
+
clone <url> # Clone repo and install dependencies
|
|
14
|
+
ll # Long directory listing
|
|
15
|
+
git-push # Add, commit, and push in one command
|
|
16
|
+
docker-clean # Remove all containers, images, volumes
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## File Structure
|
|
20
|
+
|
|
21
|
+
Each script follows this pattern:
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
#!/usr/bin/env node
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @fileoverview Brief description of the script.
|
|
28
|
+
* @module scripts/script-name
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Detailed description of what the script does.
|
|
33
|
+
*
|
|
34
|
+
* @param {string[]} args - Command line arguments
|
|
35
|
+
* @returns {Promise<void>}
|
|
36
|
+
*/
|
|
37
|
+
async function main(args) {
|
|
38
|
+
// Implementation
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
module.exports = { main };
|
|
42
|
+
|
|
43
|
+
if (require.main === module) {
|
|
44
|
+
main(process.argv.slice(2));
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Categories
|
|
49
|
+
|
|
50
|
+
### Git
|
|
51
|
+
`clone`, `git-clone`, `git-pup`, `git-push`, `git-backup`, `vpush`, `fetch-github-repos`
|
|
52
|
+
|
|
53
|
+
### Docker
|
|
54
|
+
`dp`, `docker-clean`
|
|
55
|
+
|
|
56
|
+
### Node/npm
|
|
57
|
+
`npmi`, `clean-dev`, `ncu-update-all`, `get-dependencies`, `install-dependencies-from`
|
|
58
|
+
|
|
59
|
+
### File Management
|
|
60
|
+
`mkd`, `ll`, `delete-files`, `refresh-files`, `get-folder`, `org-by-date`, `rm-safe`
|
|
61
|
+
|
|
62
|
+
### macOS
|
|
63
|
+
`afk`, `o`, `u`, `brewd`, `brewi`, `brewr`, `brews`, `brewu`, `empty-trash`
|
|
64
|
+
|
|
65
|
+
### Search
|
|
66
|
+
`h`, `s`
|
|
67
|
+
|
|
68
|
+
### Network
|
|
69
|
+
`ips`, `ccurl`, `local-ip`, `ports`
|
|
70
|
+
|
|
71
|
+
### Media
|
|
72
|
+
`get-tunes`, `get-video`, `get-channel`, `get-course`, `datauri`, `resize-image`
|
|
73
|
+
|
|
74
|
+
## Registration
|
|
75
|
+
|
|
76
|
+
Scripts are registered as global commands in `package.json`:
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"bin": {
|
|
81
|
+
"afk": "./src/scripts/afk.js",
|
|
82
|
+
"clone": "./src/scripts/clone.js",
|
|
83
|
+
"ll": "./src/scripts/ll.js"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Related
|
|
89
|
+
|
|
90
|
+
- **Commands** (`../commands/`) — Multi-word CLI operations (`dev configure`, etc.)
|
|
91
|
+
- **Utils** (`../utils/`) — Internal shared utilities
|
|
92
|
+
|
|
93
|
+
## Documentation
|
|
94
|
+
|
|
95
|
+
See [ai-docs/LOCAL_EXAMPLE_ENVIRONMENT.md](../../ai-docs/LOCAL_EXAMPLE_ENVIRONMENT.md) for the complete script reference.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Lock screen / put system to sleep.
|
|
5
|
+
* @module scripts/afk
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Locks the screen or puts the system to sleep.
|
|
10
|
+
* Uses platform-specific commands (macOS: osascript, Linux: various).
|
|
11
|
+
*
|
|
12
|
+
* @param {string[]} args - Command line arguments (unused)
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function main(args) {
|
|
16
|
+
// TODO: Implement screen lock / sleep
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = { main };
|
|
20
|
+
|
|
21
|
+
if (require.main === module) {
|
|
22
|
+
main(process.argv.slice(2));
|
|
23
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Backup multiple user directories using rsync.
|
|
5
|
+
* @module scripts/backup-all
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Creates a timestamped backup of multiple user directories
|
|
10
|
+
* (Downloads, Desktop, Documents, Source, etc.) using rsync.
|
|
11
|
+
*
|
|
12
|
+
* @param {string[]} args - Command line arguments
|
|
13
|
+
* @param {string} args.0 - Destination backup directory path
|
|
14
|
+
* @returns {Promise<void>}
|
|
15
|
+
*/
|
|
16
|
+
async function main(args) {
|
|
17
|
+
// TODO: Implement full user backup
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
module.exports = { main };
|
|
21
|
+
|
|
22
|
+
if (require.main === module) {
|
|
23
|
+
main(process.argv.slice(2));
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Backup ~/Source directory using rsync.
|
|
5
|
+
* @module scripts/backup-source
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Creates a timestamped backup of the ~/Source directory using rsync,
|
|
10
|
+
* excluding common development artifacts and cache directories.
|
|
11
|
+
*
|
|
12
|
+
* @param {string[]} args - Command line arguments
|
|
13
|
+
* @param {string} args.0 - Destination backup directory path
|
|
14
|
+
* @returns {Promise<void>}
|
|
15
|
+
*/
|
|
16
|
+
async function main(args) {
|
|
17
|
+
// TODO: Implement Source directory backup
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
module.exports = { main };
|
|
21
|
+
|
|
22
|
+
if (require.main === module) {
|
|
23
|
+
main(process.argv.slice(2));
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Run Homebrew doctor.
|
|
5
|
+
* @module scripts/brewd
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Executes `brew doctor` to check for potential problems
|
|
10
|
+
* with the Homebrew installation.
|
|
11
|
+
*
|
|
12
|
+
* @param {string[]} args - Command line arguments to pass to brew doctor
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
async function main(args) {
|
|
16
|
+
// TODO: Implement brew doctor
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = { main };
|
|
20
|
+
|
|
21
|
+
if (require.main === module) {
|
|
22
|
+
main(process.argv.slice(2));
|
|
23
|
+
}
|