kastell 0.0.1 → 1.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/LICENSE +201 -0
- package/NOTICE +5 -0
- package/README.md +283 -0
- package/README.tr.md +283 -0
- package/SECURITY.md +114 -0
- package/bin/kastell +2 -0
- package/bin/kastell-mcp +5 -0
- package/dist/adapters/coolify.d.ts +13 -0
- package/dist/adapters/coolify.d.ts.map +1 -0
- package/dist/adapters/coolify.js +182 -0
- package/dist/adapters/coolify.js.map +1 -0
- package/dist/adapters/dokploy.d.ts +13 -0
- package/dist/adapters/dokploy.d.ts.map +1 -0
- package/dist/adapters/dokploy.js +188 -0
- package/dist/adapters/dokploy.js.map +1 -0
- package/dist/adapters/factory.d.ts +7 -0
- package/dist/adapters/factory.d.ts.map +1 -0
- package/dist/adapters/factory.js +20 -0
- package/dist/adapters/factory.js.map +1 -0
- package/dist/adapters/interface.d.ts +23 -0
- package/dist/adapters/interface.d.ts.map +1 -0
- package/dist/adapters/interface.js +2 -0
- package/dist/adapters/interface.js.map +1 -0
- package/dist/commands/add.d.ts +10 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +125 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/backup.d.ts +7 -0
- package/dist/commands/backup.d.ts.map +1 -0
- package/dist/commands/backup.js +232 -0
- package/dist/commands/backup.js.map +1 -0
- package/dist/commands/config.d.ts +2 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +64 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/destroy.d.ts +2 -0
- package/dist/commands/destroy.d.ts.map +1 -0
- package/dist/commands/destroy.js +98 -0
- package/dist/commands/destroy.js.map +1 -0
- package/dist/commands/doctor.d.ts +11 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +151 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/domain.d.ts +8 -0
- package/dist/commands/domain.d.ts.map +1 -0
- package/dist/commands/domain.js +239 -0
- package/dist/commands/domain.js.map +1 -0
- package/dist/commands/firewall.d.ts +9 -0
- package/dist/commands/firewall.d.ts.map +1 -0
- package/dist/commands/firewall.js +252 -0
- package/dist/commands/firewall.js.map +1 -0
- package/dist/commands/health.d.ts +9 -0
- package/dist/commands/health.d.ts.map +1 -0
- package/dist/commands/health.js +114 -0
- package/dist/commands/health.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +214 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/interactive.d.ts +2 -0
- package/dist/commands/interactive.d.ts.map +1 -0
- package/dist/commands/interactive.js +358 -0
- package/dist/commands/interactive.js.map +1 -0
- package/dist/commands/list.d.ts +2 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +24 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/logs.d.ts +9 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +56 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/maintain.d.ts +9 -0
- package/dist/commands/maintain.d.ts.map +1 -0
- package/dist/commands/maintain.js +282 -0
- package/dist/commands/maintain.js.map +1 -0
- package/dist/commands/monitor.d.ts +7 -0
- package/dist/commands/monitor.d.ts.map +1 -0
- package/dist/commands/monitor.js +54 -0
- package/dist/commands/monitor.js.map +1 -0
- package/dist/commands/remove.d.ts +2 -0
- package/dist/commands/remove.d.ts.map +1 -0
- package/dist/commands/remove.js +50 -0
- package/dist/commands/remove.js.map +1 -0
- package/dist/commands/restart.d.ts +2 -0
- package/dist/commands/restart.d.ts.map +1 -0
- package/dist/commands/restart.js +66 -0
- package/dist/commands/restart.js.map +1 -0
- package/dist/commands/restore.d.ts +7 -0
- package/dist/commands/restore.d.ts.map +1 -0
- package/dist/commands/restore.js +279 -0
- package/dist/commands/restore.js.map +1 -0
- package/dist/commands/secure.d.ts +10 -0
- package/dist/commands/secure.d.ts.map +1 -0
- package/dist/commands/secure.js +224 -0
- package/dist/commands/secure.js.map +1 -0
- package/dist/commands/snapshot.d.ts +8 -0
- package/dist/commands/snapshot.d.ts.map +1 -0
- package/dist/commands/snapshot.js +203 -0
- package/dist/commands/snapshot.js.map +1 -0
- package/dist/commands/ssh.d.ts +4 -0
- package/dist/commands/ssh.d.ts.map +1 -0
- package/dist/commands/ssh.js +36 -0
- package/dist/commands/ssh.js.map +1 -0
- package/dist/commands/status.d.ts +7 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +140 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/transfer.d.ts +7 -0
- package/dist/commands/transfer.d.ts.map +1 -0
- package/dist/commands/transfer.js +111 -0
- package/dist/commands/transfer.js.map +1 -0
- package/dist/commands/update.d.ts +6 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +177 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/constants.d.ts +42 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +54 -0
- package/dist/constants.js.map +1 -0
- package/dist/core/backup.d.ts +59 -0
- package/dist/core/backup.d.ts.map +1 -0
- package/dist/core/backup.js +383 -0
- package/dist/core/backup.js.map +1 -0
- package/dist/core/deploy.d.ts +4 -0
- package/dist/core/deploy.d.ts.map +1 -0
- package/dist/core/deploy.js +369 -0
- package/dist/core/deploy.js.map +1 -0
- package/dist/core/domain.d.ts +30 -0
- package/dist/core/domain.d.ts.map +1 -0
- package/dist/core/domain.js +170 -0
- package/dist/core/domain.js.map +1 -0
- package/dist/core/firewall.d.ts +27 -0
- package/dist/core/firewall.d.ts.map +1 -0
- package/dist/core/firewall.js +158 -0
- package/dist/core/firewall.js.map +1 -0
- package/dist/core/logs.d.ts +28 -0
- package/dist/core/logs.d.ts.map +1 -0
- package/dist/core/logs.js +129 -0
- package/dist/core/logs.js.map +1 -0
- package/dist/core/maintain.d.ts +41 -0
- package/dist/core/maintain.d.ts.map +1 -0
- package/dist/core/maintain.js +192 -0
- package/dist/core/maintain.js.map +1 -0
- package/dist/core/manage.d.ts +43 -0
- package/dist/core/manage.d.ts.map +1 -0
- package/dist/core/manage.js +266 -0
- package/dist/core/manage.js.map +1 -0
- package/dist/core/provision.d.ts +20 -0
- package/dist/core/provision.d.ts.map +1 -0
- package/dist/core/provision.js +196 -0
- package/dist/core/provision.js.map +1 -0
- package/dist/core/secure.d.ts +29 -0
- package/dist/core/secure.d.ts.map +1 -0
- package/dist/core/secure.js +204 -0
- package/dist/core/secure.js.map +1 -0
- package/dist/core/snapshot.d.ts +22 -0
- package/dist/core/snapshot.d.ts.map +1 -0
- package/dist/core/snapshot.js +58 -0
- package/dist/core/snapshot.js.map +1 -0
- package/dist/core/status.d.ts +12 -0
- package/dist/core/status.d.ts.map +1 -0
- package/dist/core/status.js +47 -0
- package/dist/core/status.js.map +1 -0
- package/dist/core/tokens.d.ts +4 -0
- package/dist/core/tokens.d.ts.map +1 -0
- package/dist/core/tokens.js +20 -0
- package/dist/core/tokens.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +183 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +18 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +3 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +111 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/serverBackup.d.ts +24 -0
- package/dist/mcp/tools/serverBackup.d.ts.map +1 -0
- package/dist/mcp/tools/serverBackup.js +264 -0
- package/dist/mcp/tools/serverBackup.js.map +1 -0
- package/dist/mcp/tools/serverInfo.d.ts +37 -0
- package/dist/mcp/tools/serverInfo.d.ts.map +1 -0
- package/dist/mcp/tools/serverInfo.js +284 -0
- package/dist/mcp/tools/serverInfo.js.map +1 -0
- package/dist/mcp/tools/serverLogs.d.ts +25 -0
- package/dist/mcp/tools/serverLogs.d.ts.map +1 -0
- package/dist/mcp/tools/serverLogs.js +124 -0
- package/dist/mcp/tools/serverLogs.js.map +1 -0
- package/dist/mcp/tools/serverMaintain.d.ts +17 -0
- package/dist/mcp/tools/serverMaintain.d.ts.map +1 -0
- package/dist/mcp/tools/serverMaintain.js +156 -0
- package/dist/mcp/tools/serverMaintain.js.map +1 -0
- package/dist/mcp/tools/serverManage.d.ts +38 -0
- package/dist/mcp/tools/serverManage.d.ts.map +1 -0
- package/dist/mcp/tools/serverManage.js +191 -0
- package/dist/mcp/tools/serverManage.js.map +1 -0
- package/dist/mcp/tools/serverProvision.d.ts +38 -0
- package/dist/mcp/tools/serverProvision.d.ts.map +1 -0
- package/dist/mcp/tools/serverProvision.js +117 -0
- package/dist/mcp/tools/serverProvision.js.map +1 -0
- package/dist/mcp/tools/serverSecure.d.ts +35 -0
- package/dist/mcp/tools/serverSecure.d.ts.map +1 -0
- package/dist/mcp/tools/serverSecure.js +335 -0
- package/dist/mcp/tools/serverSecure.js.map +1 -0
- package/dist/mcp/utils.d.ts +42 -0
- package/dist/mcp/utils.d.ts.map +1 -0
- package/dist/mcp/utils.js +61 -0
- package/dist/mcp/utils.js.map +1 -0
- package/dist/providers/base.d.ts +28 -0
- package/dist/providers/base.d.ts.map +1 -0
- package/dist/providers/base.js +57 -0
- package/dist/providers/base.js.map +1 -0
- package/dist/providers/digitalocean.d.ts +25 -0
- package/dist/providers/digitalocean.d.ts.map +1 -0
- package/dist/providers/digitalocean.js +288 -0
- package/dist/providers/digitalocean.js.map +1 -0
- package/dist/providers/hetzner.d.ts +25 -0
- package/dist/providers/hetzner.d.ts.map +1 -0
- package/dist/providers/hetzner.js +291 -0
- package/dist/providers/hetzner.js.map +1 -0
- package/dist/providers/linode.d.ts +25 -0
- package/dist/providers/linode.d.ts.map +1 -0
- package/dist/providers/linode.js +309 -0
- package/dist/providers/linode.js.map +1 -0
- package/dist/providers/vultr.d.ts +25 -0
- package/dist/providers/vultr.d.ts.map +1 -0
- package/dist/providers/vultr.js +286 -0
- package/dist/providers/vultr.js.map +1 -0
- package/dist/types/index.d.ts +140 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/cloudInit.d.ts +3 -0
- package/dist/utils/cloudInit.d.ts.map +1 -0
- package/dist/utils/cloudInit.js +133 -0
- package/dist/utils/cloudInit.js.map +1 -0
- package/dist/utils/config.d.ts +11 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +58 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/configMerge.d.ts +16 -0
- package/dist/utils/configMerge.d.ts.map +1 -0
- package/dist/utils/configMerge.js +34 -0
- package/dist/utils/configMerge.js.map +1 -0
- package/dist/utils/defaults.d.ts +10 -0
- package/dist/utils/defaults.d.ts.map +1 -0
- package/dist/utils/defaults.js +48 -0
- package/dist/utils/defaults.js.map +1 -0
- package/dist/utils/errorMapper.d.ts +7 -0
- package/dist/utils/errorMapper.d.ts.map +1 -0
- package/dist/utils/errorMapper.js +176 -0
- package/dist/utils/errorMapper.js.map +1 -0
- package/dist/utils/healthCheck.d.ts +2 -0
- package/dist/utils/healthCheck.d.ts.map +1 -0
- package/dist/utils/healthCheck.js +30 -0
- package/dist/utils/healthCheck.js.map +1 -0
- package/dist/utils/logger.d.ts +11 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +31 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/migration.d.ts +8 -0
- package/dist/utils/migration.d.ts.map +1 -0
- package/dist/utils/migration.js +34 -0
- package/dist/utils/migration.js.map +1 -0
- package/dist/utils/modeGuard.d.ts +7 -0
- package/dist/utils/modeGuard.d.ts.map +1 -0
- package/dist/utils/modeGuard.js +19 -0
- package/dist/utils/modeGuard.js.map +1 -0
- package/dist/utils/openBrowser.d.ts +4 -0
- package/dist/utils/openBrowser.d.ts.map +1 -0
- package/dist/utils/openBrowser.js +65 -0
- package/dist/utils/openBrowser.js.map +1 -0
- package/dist/utils/prompts.d.ts +12 -0
- package/dist/utils/prompts.d.ts.map +1 -0
- package/dist/utils/prompts.js +143 -0
- package/dist/utils/prompts.js.map +1 -0
- package/dist/utils/providerFactory.d.ts +4 -0
- package/dist/utils/providerFactory.d.ts.map +1 -0
- package/dist/utils/providerFactory.js +34 -0
- package/dist/utils/providerFactory.js.map +1 -0
- package/dist/utils/serverSelect.d.ts +6 -0
- package/dist/utils/serverSelect.d.ts.map +1 -0
- package/dist/utils/serverSelect.js +75 -0
- package/dist/utils/serverSelect.js.map +1 -0
- package/dist/utils/ssh.d.ts +20 -0
- package/dist/utils/ssh.d.ts.map +1 -0
- package/dist/utils/ssh.js +234 -0
- package/dist/utils/ssh.js.map +1 -0
- package/dist/utils/sshKey.d.ts +4 -0
- package/dist/utils/sshKey.d.ts.map +1 -0
- package/dist/utils/sshKey.js +52 -0
- package/dist/utils/sshKey.js.map +1 -0
- package/dist/utils/templates.d.ts +6 -0
- package/dist/utils/templates.d.ts.map +1 -0
- package/dist/utils/templates.js +49 -0
- package/dist/utils/templates.js.map +1 -0
- package/dist/utils/updateCheck.d.ts +12 -0
- package/dist/utils/updateCheck.d.ts.map +1 -0
- package/dist/utils/updateCheck.js +108 -0
- package/dist/utils/updateCheck.js.map +1 -0
- package/dist/utils/yamlConfig.d.ts +8 -0
- package/dist/utils/yamlConfig.d.ts.map +1 -0
- package/dist/utils/yamlConfig.js +150 -0
- package/dist/utils/yamlConfig.js.map +1 -0
- package/package.json +90 -7
- package/index.js +0 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. Please also get an in-depth
|
|
186
|
+
understanding of the text from the official site at
|
|
187
|
+
http://www.apache.org/licenses/
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Omer Faruk CAN
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
# Kastell
|
|
2
|
+
|
|
3
|
+
> Autonomous security and maintenance layer for self-hosted infrastructure.
|
|
4
|
+
|
|
5
|
+
> English | [Turkce](README.tr.md)
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
[](https://codecov.io/gh/omrfc/quicklify)
|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

|
|
12
|
+

|
|
13
|
+
[](https://socket.dev/npm/package/kastell)
|
|
14
|
+
[](https://kastell.dev)
|
|
15
|
+
|
|
16
|
+
## Why Kastell Exists
|
|
17
|
+
|
|
18
|
+
Most self-hosted servers break because:
|
|
19
|
+
|
|
20
|
+
- No backup discipline
|
|
21
|
+
- No update strategy
|
|
22
|
+
- No security hardening
|
|
23
|
+
- No monitoring
|
|
24
|
+
- No snapshot routine
|
|
25
|
+
|
|
26
|
+
Stop babysitting your servers. Kastell was built to fix that.
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Interactive mode -- no commands to memorize
|
|
32
|
+
npx kastell
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Running `kastell` without any arguments launches an **interactive menu** where you can browse all available actions by category, pick what you need with arrow keys, and configure options step by step -- no need to remember any command names or flags.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
? What would you like to do?
|
|
39
|
+
Server Management
|
|
40
|
+
> Deploy a new server
|
|
41
|
+
Add an existing server
|
|
42
|
+
List all servers
|
|
43
|
+
Check server status
|
|
44
|
+
...
|
|
45
|
+
Security
|
|
46
|
+
Harden SSH & fail2ban
|
|
47
|
+
Manage firewall (UFW)
|
|
48
|
+
...
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Each action includes sub-options (server mode, template, log source, port number, etc.) and a **<- Back** option to return to the main menu at any point.
|
|
52
|
+
|
|
53
|
+
If you already know the commands, you can still use them directly:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
kastell init # Deploy a new server
|
|
57
|
+
kastell status my-server # Check server status
|
|
58
|
+
kastell backup --all # Backup all servers
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Kastell handles server provisioning, SSH key setup, firewall configuration, and platform installation automatically.
|
|
62
|
+
|
|
63
|
+
## What Makes Kastell Different?
|
|
64
|
+
|
|
65
|
+
| Problem | Solution |
|
|
66
|
+
|---------|----------|
|
|
67
|
+
| Broke your server with an update? | Pre-update snapshot protection via `maintain` |
|
|
68
|
+
| No idea if your server is healthy? | Built-in monitoring, health checks, and `doctor` diagnostics |
|
|
69
|
+
| Security is an afterthought? | Firewall, SSH hardening, SSL, and security audits built-in |
|
|
70
|
+
| Backups? Maybe someday... | One-command backup & restore with manifest tracking |
|
|
71
|
+
| Managing multiple servers? | `--all` flag across backup, maintain, status, and health |
|
|
72
|
+
| Existing server not tracked? | `kastell add` brings any server under management |
|
|
73
|
+
| Don't want to memorize commands? | Just run `kastell` -- interactive menu guides you |
|
|
74
|
+
|
|
75
|
+
## What Can You Do?
|
|
76
|
+
|
|
77
|
+
### Deploy
|
|
78
|
+
```bash
|
|
79
|
+
kastell # Interactive menu (recommended)
|
|
80
|
+
kastell init # Interactive setup (direct)
|
|
81
|
+
kastell init --provider hetzner # Non-interactive
|
|
82
|
+
kastell init --config kastell.yml # From YAML config
|
|
83
|
+
kastell init --template production # Use a template
|
|
84
|
+
kastell init --mode bare # Generic VPS (no Coolify)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Manage
|
|
88
|
+
```bash
|
|
89
|
+
kastell list # List all servers
|
|
90
|
+
kastell status my-server # Check server status
|
|
91
|
+
kastell status --all # Check all servers
|
|
92
|
+
kastell ssh my-server # SSH into server
|
|
93
|
+
kastell restart my-server # Restart server
|
|
94
|
+
kastell destroy my-server # Destroy cloud server entirely
|
|
95
|
+
kastell add # Add existing server
|
|
96
|
+
kastell remove my-server # Remove from local config
|
|
97
|
+
kastell config set key value # Manage default configuration
|
|
98
|
+
kastell export # Export server list to JSON
|
|
99
|
+
kastell import servers.json # Import servers from JSON
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Update & Maintain
|
|
103
|
+
```bash
|
|
104
|
+
kastell update my-server # Update Coolify (Coolify servers)
|
|
105
|
+
kastell maintain my-server # Full maintenance (snapshot + update + health + reboot)
|
|
106
|
+
kastell maintain --all # Maintain all servers
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Back Up & Restore
|
|
110
|
+
```bash
|
|
111
|
+
kastell backup my-server # Backup DB + config
|
|
112
|
+
kastell backup --all # Backup all servers
|
|
113
|
+
kastell restore my-server # Restore from backup
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Snapshots
|
|
117
|
+
```bash
|
|
118
|
+
kastell snapshot create my-server # Create VPS snapshot (with cost estimate)
|
|
119
|
+
kastell snapshot list my-server # List snapshots
|
|
120
|
+
kastell snapshot list --all # List all snapshots across servers
|
|
121
|
+
kastell snapshot delete my-server # Delete a snapshot
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Security
|
|
125
|
+
```bash
|
|
126
|
+
kastell firewall status my-server # Check firewall
|
|
127
|
+
kastell firewall setup my-server # Configure UFW
|
|
128
|
+
kastell secure audit my-server # Security audit
|
|
129
|
+
kastell secure setup my-server # SSH hardening + fail2ban
|
|
130
|
+
kastell domain add my-server --domain example.com # Set domain + SSL
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Monitor & Debug
|
|
134
|
+
```bash
|
|
135
|
+
kastell monitor my-server # CPU, RAM, disk usage
|
|
136
|
+
kastell logs my-server # View server logs
|
|
137
|
+
kastell logs my-server -f # Follow logs
|
|
138
|
+
kastell health # Health check all servers
|
|
139
|
+
kastell doctor # Check local environment
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Supported Providers
|
|
143
|
+
|
|
144
|
+
| Provider | Status | Regions | Starting Price |
|
|
145
|
+
|----------|--------|---------|---------------|
|
|
146
|
+
| [Hetzner Cloud](https://hetzner.cloud) | Stable | EU, US | ~EUR4/mo |
|
|
147
|
+
| [DigitalOcean](https://digitalocean.com) | Stable | Global | ~$18/mo |
|
|
148
|
+
| [Vultr](https://vultr.com) | Stable | Global | ~$10/mo |
|
|
149
|
+
| [Linode (Akamai)](https://linode.com) | Beta | Global | ~$24/mo |
|
|
150
|
+
|
|
151
|
+
> Prices reflect the default starter template per provider. You can choose a different size during setup. Linode support is in beta -- community testing welcome.
|
|
152
|
+
|
|
153
|
+
## YAML Config
|
|
154
|
+
|
|
155
|
+
Deploy with a single config file:
|
|
156
|
+
|
|
157
|
+
```yaml
|
|
158
|
+
# kastell.yml
|
|
159
|
+
provider: hetzner
|
|
160
|
+
region: nbg1
|
|
161
|
+
size: cax11
|
|
162
|
+
name: my-coolify
|
|
163
|
+
fullSetup: true
|
|
164
|
+
domain: coolify.example.com
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
kastell init --config kastell.yml
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Templates
|
|
172
|
+
|
|
173
|
+
| Template | Best For | Includes |
|
|
174
|
+
|----------|----------|----------|
|
|
175
|
+
| `starter` | Testing, side projects | 1-2 vCPU, 2-4 GB RAM |
|
|
176
|
+
| `production` | Live applications | 2-4 vCPU, 4-8 GB RAM, full hardening |
|
|
177
|
+
| `dev` | Development & CI/CD | Same as starter, no hardening |
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
kastell init --template production --provider hetzner
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Security
|
|
184
|
+
|
|
185
|
+
Kastell is built with security as a priority -- **2,099 tests** across 78 suites, including dedicated security test suites.
|
|
186
|
+
|
|
187
|
+
- API tokens are never stored on disk -- prompted at runtime or via environment variables
|
|
188
|
+
- SSH keys are auto-generated if needed (Ed25519)
|
|
189
|
+
- All SSH connections use `StrictHostKeyChecking=accept-new` with IP validation (octet range) and environment filtering
|
|
190
|
+
- Shell injection protection on all user-facing inputs (`spawn`/`spawnSync`, no `execSync`)
|
|
191
|
+
- Provider error messages are sanitized to prevent token leakage
|
|
192
|
+
- stderr sanitization redacts IPs, home paths, tokens, and secrets from error output
|
|
193
|
+
- Config file token detection (22+ key patterns, case-insensitive, nested)
|
|
194
|
+
- Import/export operations strip sensitive fields and enforce strict file permissions (`0o600`)
|
|
195
|
+
- `--full-setup` enables UFW firewall and SSH hardening automatically
|
|
196
|
+
- MCP: SAFE_MODE (default: on) blocks all destructive operations, Zod schema validation on all inputs, path traversal protection on backup restore
|
|
197
|
+
|
|
198
|
+
## Installation
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# Run directly (recommended)
|
|
202
|
+
npx kastell <command>
|
|
203
|
+
|
|
204
|
+
# Or install globally
|
|
205
|
+
npm install -g kastell
|
|
206
|
+
kastell <command>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Requires Node.js 20 or later.
|
|
210
|
+
|
|
211
|
+
## Troubleshooting
|
|
212
|
+
|
|
213
|
+
**Server creation fails?**
|
|
214
|
+
Run `kastell doctor --check-tokens` to verify your API token and local environment.
|
|
215
|
+
|
|
216
|
+
**Server not responding?**
|
|
217
|
+
Use `kastell status my-server --autostart` for Coolify servers, or `kastell health` to check all servers at once.
|
|
218
|
+
|
|
219
|
+
**Need to start fresh?**
|
|
220
|
+
`kastell destroy my-server` removes the cloud server entirely.
|
|
221
|
+
|
|
222
|
+
## Contributing
|
|
223
|
+
|
|
224
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, and contribution guidelines.
|
|
225
|
+
|
|
226
|
+
## MCP Server (AI Integration)
|
|
227
|
+
|
|
228
|
+
Kastell includes a built-in [Model Context Protocol](https://modelcontextprotocol.io/) server for AI-powered server management. Works with Claude Code, Cursor, Windsurf, and other MCP-compatible clients.
|
|
229
|
+
|
|
230
|
+
```json
|
|
231
|
+
{
|
|
232
|
+
"mcpServers": {
|
|
233
|
+
"kastell": {
|
|
234
|
+
"command": "npx",
|
|
235
|
+
"args": ["-y", "-p", "kastell", "kastell-mcp"],
|
|
236
|
+
"env": {
|
|
237
|
+
"HETZNER_TOKEN": "your-token",
|
|
238
|
+
"DIGITALOCEAN_TOKEN": "your-token",
|
|
239
|
+
"VULTR_TOKEN": "your-token",
|
|
240
|
+
"LINODE_TOKEN": "your-token"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Available tools:
|
|
248
|
+
|
|
249
|
+
| Tool | Actions | Description |
|
|
250
|
+
|------|---------|-------------|
|
|
251
|
+
| `server_info` | list, status, health | Query server information, check cloud provider & Coolify status |
|
|
252
|
+
| `server_logs` | logs, monitor | Fetch Coolify/Docker logs and system metrics via SSH |
|
|
253
|
+
| `server_manage` | add, remove, destroy | Register, unregister, or destroy cloud servers |
|
|
254
|
+
| `server_maintain` | update, restart, maintain | Update Coolify, restart servers, run full maintenance |
|
|
255
|
+
| `server_secure` | secure, firewall, domain | SSH hardening, firewall rules, domain/SSL management (10 subcommands) |
|
|
256
|
+
| `server_backup` | backup, snapshot | Backup/restore databases and create/manage VPS snapshots |
|
|
257
|
+
| `server_provision` | create | Provision new servers on cloud providers |
|
|
258
|
+
|
|
259
|
+
> All destructive operations (destroy, restore, snapshot-delete, provision, restart, maintain, snapshot-create) require `SAFE_MODE=false` to execute.
|
|
260
|
+
|
|
261
|
+
## What's Next
|
|
262
|
+
|
|
263
|
+
- Scheduled maintenance (cron-based automatic upkeep)
|
|
264
|
+
- Dokploy platform support (`--platform dokploy`)
|
|
265
|
+
|
|
266
|
+
## Philosophy
|
|
267
|
+
|
|
268
|
+
> Infrastructure should be boring, predictable, and safe.
|
|
269
|
+
|
|
270
|
+
Kastell is not a script. It's your DevOps safety layer for self-hosted infrastructure.
|
|
271
|
+
|
|
272
|
+
## License
|
|
273
|
+
|
|
274
|
+
Apache 2.0 -- see [LICENSE](LICENSE)
|
|
275
|
+
|
|
276
|
+
## Support
|
|
277
|
+
|
|
278
|
+
- [GitHub Issues](https://github.com/omrfc/quicklify/issues) -- Bug reports and feature requests
|
|
279
|
+
- [Changelog](CHANGELOG.md) -- Version history
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
Built by [@omrfc](https://github.com/omrfc)
|