kapsel-cli 0.2.1__tar.gz → 0.3.8__tar.gz
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.
- kapsel_cli-0.3.8/PKG-INFO +620 -0
- kapsel_cli-0.3.8/README.md +578 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/__init__.py +1 -1
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/cli.py +6 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/builtins/add.py +132 -51
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/builtins/config.py +80 -10
- kapsel_cli-0.3.8/kapsel/completion/kps/builtins/upgrade.py +513 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/dispatcher.py +124 -14
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/spec_manager.py +5 -3
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/block/__init__.py +2 -0
- kapsel_cli-0.3.8/kapsel/core/block/model.py +60 -0
- kapsel_cli-0.3.8/kapsel/core/block/registry.py +264 -0
- kapsel_cli-0.3.8/kapsel/core/block/runner.py +370 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/engine.py +1 -1
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/executor.py +54 -9
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/en/tips.yaml +3 -3
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/zh_CN/tips.yaml +3 -3
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/ui/prompt.py +187 -20
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/ui/theme.py +31 -0
- kapsel_cli-0.3.8/kapsel/ui/viewport.py +578 -0
- kapsel_cli-0.3.8/kapsel_cli.egg-info/PKG-INFO +620 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel_cli.egg-info/SOURCES.txt +3 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/pyproject.toml +1 -1
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_block_system.py +287 -1
- kapsel_cli-0.3.8/tests/test_config.py +70 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_plugin_ai.py +58 -2
- kapsel_cli-0.3.8/tests/test_plugin_autopilot.py +65 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_plugin_fetcher.py +10 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_plugin_portal.py +30 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_upgrade.py +82 -0
- kapsel_cli-0.2.1/PKG-INFO +0 -249
- kapsel_cli-0.2.1/README.md +0 -207
- kapsel_cli-0.2.1/kapsel/completion/kps/builtins/upgrade.py +0 -347
- kapsel_cli-0.2.1/kapsel/core/block/model.py +0 -36
- kapsel_cli-0.2.1/kapsel/core/block/registry.py +0 -111
- kapsel_cli-0.2.1/kapsel/core/block/runner.py +0 -198
- kapsel_cli-0.2.1/kapsel_cli.egg-info/PKG-INFO +0 -249
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/__main__.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/__init__.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/carapace_engine.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/carapace_installer.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/completer.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/__init__.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/builtins/__init__.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/builtins/completion.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/builtins/datadir.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/builtins/help.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/builtins/language.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/builtins/plugin_switch.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/builtins/search.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/builtins/status.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/builtins/toggle.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/completion/kps/registry.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/__init__.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/detector.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/i18n.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/plugin/__init__.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/plugin/base.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/plugin/catalog.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/plugin/context.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/plugin/fetcher.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/plugin/hooks.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/core/plugin/manager.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/i18n.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/de/LC_MESSAGES/kapsel.mo +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/de/LC_MESSAGES/kapsel.po +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/de/help.yaml +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/de/tips.yaml +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/en/help.yaml +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/es/LC_MESSAGES/kapsel.mo +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/es/LC_MESSAGES/kapsel.po +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/es/help.yaml +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/es/tips.yaml +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/fr/LC_MESSAGES/kapsel.mo +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/fr/LC_MESSAGES/kapsel.po +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/fr/help.yaml +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/fr/tips.yaml +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/ja/LC_MESSAGES/kapsel.mo +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/ja/LC_MESSAGES/kapsel.po +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/ja/help.yaml +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/ja/tips.yaml +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/kapsel.pot +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/ru/LC_MESSAGES/kapsel.mo +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/ru/LC_MESSAGES/kapsel.po +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/ru/help.yaml +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/ru/tips.yaml +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/zh_CN/LC_MESSAGES/kapsel.mo +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/zh_CN/LC_MESSAGES/kapsel.po +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/locales/zh_CN/help.yaml +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/storage/__init__.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/storage/config.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/storage/history.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/storage/logger.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/storage/migrate.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/ui/__init__.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/ui/banner.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/ui/card.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel/ui/tips.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel_cli.egg-info/dependency_links.txt +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel_cli.egg-info/entry_points.txt +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel_cli.egg-info/requires.txt +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/kapsel_cli.egg-info/top_level.txt +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/setup.cfg +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_carapace_installer.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_history.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_i18n.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_plugin_alias.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_plugin_init.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_plugin_install.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_search_and_completions.py +0 -0
- {kapsel_cli-0.2.1 → kapsel_cli-0.3.8}/tests/test_spec_manager.py +0 -0
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kapsel-cli
|
|
3
|
+
Version: 0.3.8
|
|
4
|
+
Summary: Next-generation cross-platform terminal capsule & ergonomic shell multiplexer with context-aware command translation and 1,000+ CLI completions.
|
|
5
|
+
Author-email: MrEiu <k648888@vip.qq.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/MrEiu/Kapsel
|
|
8
|
+
Project-URL: Documentation, https://github.com/MrEiu/Kapsel#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/MrEiu/Kapsel
|
|
10
|
+
Project-URL: Issues, https://github.com/MrEiu/Kapsel/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/MrEiu/Kapsel/releases
|
|
12
|
+
Keywords: terminal,shell,cli,multiplexer,autocompletion,cross-platform,developer-tools,carapace,productivity,powershell,bash,zsh
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: System Administrators
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
20
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
21
|
+
Classifier: Operating System :: MacOS
|
|
22
|
+
Classifier: Programming Language :: Python :: 3
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
28
|
+
Classifier: Topic :: System :: Shells
|
|
29
|
+
Classifier: Topic :: System :: System Shells
|
|
30
|
+
Classifier: Topic :: Terminals
|
|
31
|
+
Classifier: Topic :: Utilities
|
|
32
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
33
|
+
Requires-Python: >=3.9
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
Requires-Dist: prompt_toolkit>=3.0.40
|
|
36
|
+
Requires-Dist: rich>=13.0.0
|
|
37
|
+
Requires-Dist: pyyaml>=6.0
|
|
38
|
+
Requires-Dist: psutil>=5.9.0
|
|
39
|
+
Requires-Dist: shellingham>=1.5.0
|
|
40
|
+
Provides-Extra: test
|
|
41
|
+
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
42
|
+
|
|
43
|
+
<div align="center">
|
|
44
|
+
|
|
45
|
+
# ⚡ Kapsel
|
|
46
|
+
|
|
47
|
+
**A cross-platform terminal capsule for a cleaner, more consistent command-line experience.**
|
|
48
|
+
|
|
49
|
+
[](https://pypi.org/project/kapsel-cli/)
|
|
50
|
+
[](https://pypi.org/project/kapsel-cli/)
|
|
51
|
+
[](https://github.com/MrEiu/Kapsel)
|
|
52
|
+
[](LICENSE)
|
|
53
|
+
|
|
54
|
+
[Quick Start](#-quick-start) ·
|
|
55
|
+
[Features](#-features) ·
|
|
56
|
+
[Plugins](#-plugin-ecosystem) ·
|
|
57
|
+
[Installation](#-installation) ·
|
|
58
|
+
[Architecture](#-architecture) ·
|
|
59
|
+
[Documentation](#-documentation)
|
|
60
|
+
|
|
61
|
+
[🇨🇳 简体中文](README_zh.md) ·
|
|
62
|
+
[🇯🇵 日本語](README_ja.md) ·
|
|
63
|
+
[🇷🇺 Русский](README_ru.md) ·
|
|
64
|
+
[🇩🇪 Deutsch](README_de.md) ·
|
|
65
|
+
[🇪🇸 Español](README_es.md) ·
|
|
66
|
+
[🇫🇷 Français](README_fr.md) ·
|
|
67
|
+
[🇵🇱 Polski](README_pl.md)
|
|
68
|
+
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 📺 Kapsel in Action
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
╭─ kapsel [pwsh] ~/Projects/Kapsel 14:32:05
|
|
77
|
+
╰─ ❯ git checkout -b feature/dynamic-specs
|
|
78
|
+
✔ 0 git checkout -b feature/dynamic-specs ⏱ 24ms
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
> **Wrap complexity, expose simplicity.**
|
|
82
|
+
>
|
|
83
|
+
> Keep using your native shell and system executables as usual, while Kapsel
|
|
84
|
+
> adds a unified command layer, context-aware completion, inline suggestions,
|
|
85
|
+
> and an extensible plugin environment — all contained inside `~/.kapsel/`.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 💡 Why Kapsel?
|
|
90
|
+
|
|
91
|
+
Terminal workflows are still heavily shaped by the host operating system and
|
|
92
|
+
the shell being used.
|
|
93
|
+
|
|
94
|
+
The same everyday task may require different commands on Windows, macOS, and
|
|
95
|
+
Linux. Shell configuration is fragmented across files such as `.bashrc`,
|
|
96
|
+
`.zshrc`, and PowerShell profiles, while completion systems and developer
|
|
97
|
+
utilities often need to be installed and configured independently.
|
|
98
|
+
|
|
99
|
+
Kapsel adds a non-invasive capsule layer around your existing terminal:
|
|
100
|
+
|
|
101
|
+
| Problem | Traditional Setup | Kapsel |
|
|
102
|
+
| :--- | :--- | :--- |
|
|
103
|
+
| **Cross-platform commands** | Different commands and syntax across operating systems | Linux-first unified command layer |
|
|
104
|
+
| **Shell configuration** | Global profile files and shell-specific scripts | Self-contained state under `~/.kapsel/` |
|
|
105
|
+
| **Completion** | Separate setup for each shell and tool | Context-aware completion through Carapace |
|
|
106
|
+
| **Developer utilities** | Multiple unrelated tools with different configuration | Unified plugin environment under `kps` |
|
|
107
|
+
| **Extensibility** | Shell-specific integrations | Isolated plugin architecture |
|
|
108
|
+
|
|
109
|
+
Kapsel does not replace your shell or your system executables. It sits beside
|
|
110
|
+
them and provides an additional, consistent execution environment.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## ✨ Features
|
|
115
|
+
|
|
116
|
+
### 🌐 Native & Cross-Platform Execution
|
|
117
|
+
|
|
118
|
+
Use your normal system commands directly:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
git
|
|
122
|
+
docker
|
|
123
|
+
python
|
|
124
|
+
npm
|
|
125
|
+
cargo
|
|
126
|
+
vim
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
At the same time, Kapsel provides a Linux-first command layer for common
|
|
130
|
+
cross-platform operations:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
ls -la
|
|
134
|
+
cat package.json
|
|
135
|
+
rm -rf ./dist
|
|
136
|
+
grep -r "TODO" .
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Native shell built-ins remain protected from accidental interception.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
### ⚡ Context-Aware Autocompletion
|
|
144
|
+
|
|
145
|
+
Kapsel integrates with [Carapace](https://carapace.sh) for rich,
|
|
146
|
+
multi-level command completion.
|
|
147
|
+
|
|
148
|
+
Completion can understand commands, arguments, flags, and context such as:
|
|
149
|
+
|
|
150
|
+
- Git branches and tags
|
|
151
|
+
- Docker containers and images
|
|
152
|
+
- Kubernetes resources
|
|
153
|
+
- npm scripts
|
|
154
|
+
- Other supported CLI specifications
|
|
155
|
+
|
|
156
|
+
Completion specifications are managed declaratively and can be extended
|
|
157
|
+
through plugins or custom specifications.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### 💡 Inline Command Suggestions
|
|
162
|
+
|
|
163
|
+
Kapsel maintains a local SQLite history store and provides asynchronous
|
|
164
|
+
history-based suggestions while you type.
|
|
165
|
+
|
|
166
|
+
Press `→` to accept a suggestion.
|
|
167
|
+
|
|
168
|
+
History and related runtime state remain inside the Kapsel sandbox.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
### 🛡️ Zero-Pollution Environment
|
|
173
|
+
|
|
174
|
+
Kapsel keeps its own configuration, binaries, history, completion
|
|
175
|
+
specifications, plugins, and logs under:
|
|
176
|
+
|
|
177
|
+
```text
|
|
178
|
+
~/.kapsel/
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
It is designed to avoid modifying your existing shell configuration files,
|
|
182
|
+
including:
|
|
183
|
+
|
|
184
|
+
```text
|
|
185
|
+
.bashrc
|
|
186
|
+
.zshrc
|
|
187
|
+
config.fish
|
|
188
|
+
PowerShell profiles
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Your host shell remains yours.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
### 🧩 Modular Plugin Architecture
|
|
196
|
+
|
|
197
|
+
Kapsel provides a plugin runtime under the `kps` namespace.
|
|
198
|
+
|
|
199
|
+
Plugins can add commands, integrations, workflows, completion specifications,
|
|
200
|
+
and external developer tools without becoming part of the Kapsel core.
|
|
201
|
+
|
|
202
|
+
Official plugins and community plugins share the same extensible architecture.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
### 🎨 Interactive Terminal Experience
|
|
207
|
+
|
|
208
|
+
The interactive capsule provides a compact command presentation with:
|
|
209
|
+
|
|
210
|
+
```text
|
|
211
|
+
╭─ ...
|
|
212
|
+
╰─ ❯ ...
|
|
213
|
+
✔ 0 ... ⏱ 24ms
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Execution status and elapsed time are shown directly after commands, while
|
|
217
|
+
the interface can be localized across multiple languages.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
# 🚀 Quick Start
|
|
222
|
+
|
|
223
|
+
## 1. Install
|
|
224
|
+
|
|
225
|
+
The recommended installation method is:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
pipx install kapsel-cli
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Or:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
pip install --upgrade kapsel-cli
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## 2. Start Kapsel
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
kapsel
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
You can now use your terminal normally:
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
git status
|
|
247
|
+
docker ps
|
|
248
|
+
python --version
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
And use Kapsel's cross-platform command layer when needed:
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
ls -la
|
|
255
|
+
cat package.json
|
|
256
|
+
rm -rf ./temp
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## 3. Use Kapsel Commands
|
|
260
|
+
|
|
261
|
+
Kapsel utilities are available through `kps`:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
kps status
|
|
265
|
+
kps config
|
|
266
|
+
kps portal
|
|
267
|
+
kps ai
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
For example:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
kps portal work
|
|
274
|
+
kps ai "explain git rebase"
|
|
275
|
+
kps shore get
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
## 4. One-Shot Execution
|
|
279
|
+
|
|
280
|
+
You do not need to enter the interactive capsule to use Kapsel.
|
|
281
|
+
|
|
282
|
+
From your existing shell:
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
kps status
|
|
286
|
+
kps portal
|
|
287
|
+
kps ai "find large files"
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
This makes `kps` suitable for scripts, aliases, shell workflows, and
|
|
291
|
+
individual commands.
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
# 🧩 Plugin Ecosystem
|
|
296
|
+
|
|
297
|
+
Kapsel is designed as a plugin-oriented terminal environment rather than a
|
|
298
|
+
fixed collection of built-in commands.
|
|
299
|
+
|
|
300
|
+
The ecosystem is divided into **official plugins** and **community plugins**.
|
|
301
|
+
|
|
302
|
+
## Official Plugins
|
|
303
|
+
|
|
304
|
+
Kapsel currently provides the following official plugins:
|
|
305
|
+
|
|
306
|
+
| Plugin | Command | Description | Powered by |
|
|
307
|
+
| :--- | :--- | :--- | :--- |
|
|
308
|
+
| **`portal`** | `kps portal` / `z` | Fast directory navigation with frecency-based selection | [zoxide](https://github.com/ajeetdsouza/zoxide) |
|
|
309
|
+
| **`ai`** | `kps ai` | Terminal AI assistant for generating, explaining, and working with commands | OpenAI / Claude / Ollama |
|
|
310
|
+
| **`init`** | `kps init` | Runtime and toolchain management for Node, Python, Go, Rust, and more | [mise](https://github.com/jdx/mise) |
|
|
311
|
+
| **`shore`** | `kps shore` | Package and OS mirror detection and switching | [chsrc](https://github.com/AkihiroSuda/chsrc) |
|
|
312
|
+
| **`install`** | `kps install` | Unified software installation across multiple package managers | [mpm](https://github.com/MrEiu/mpm) |
|
|
313
|
+
| **`alias`** | `kps alias` | Cross-platform command alias translation | Native Engine |
|
|
314
|
+
| **`autopilot`** | `kps autopilot` | Background task queues and long-running jobs | [pueue](https://github.com/Nukesor/pueue) |
|
|
315
|
+
| **`help`** | `kps help <cmd>` | Practical command documentation and cheat sheets | [tealdeer](https://github.com/dbrgn/tealdeer) |
|
|
316
|
+
| **`fuck`** | `kps fuck` | Automatic command correction and syntax fixing | [thefuck](https://github.com/nvbn/thefuck) |
|
|
317
|
+
| **`profile`** | `kps profile` | Dotfile and workstation configuration management | [chezmoi](https://github.com/twpayne/chezmoi) |
|
|
318
|
+
| **`rec`** | `kps rec` | CLI snippet bookmarking, parameterization, and execution | [pet](https://github.com/knqyf263/pet) |
|
|
319
|
+
|
|
320
|
+
Official plugins are maintained as separate components so that the core
|
|
321
|
+
runtime can remain small and focused.
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## 🌍 Community Plugins
|
|
326
|
+
|
|
327
|
+
Kapsel is intended to grow beyond the official plugin collection.
|
|
328
|
+
|
|
329
|
+
Community developers can create plugins that extend Kapsel with:
|
|
330
|
+
|
|
331
|
+
- New commands
|
|
332
|
+
- External tools
|
|
333
|
+
- Developer workflows
|
|
334
|
+
- Service integrations
|
|
335
|
+
- Custom completion specifications
|
|
336
|
+
- Automation utilities
|
|
337
|
+
|
|
338
|
+
Community submissions can be contributed through the
|
|
339
|
+
**[Kapsel Plugin Repository](https://github.com/MrEiu/plugins)**.
|
|
340
|
+
|
|
341
|
+
See the plugin documentation for development requirements, specifications,
|
|
342
|
+
and contribution guidelines.
|
|
343
|
+
|
|
344
|
+
> The official plugin collection is curated by the Kapsel maintainers.
|
|
345
|
+
> Community plugins are developed and maintained by their respective
|
|
346
|
+
> contributors.
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
# 📦 Installation
|
|
351
|
+
|
|
352
|
+
## Recommended
|
|
353
|
+
|
|
354
|
+
### pipx
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
pipx install kapsel-cli
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### pip
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
pip install --upgrade kapsel-cli
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## One-Line Automated Installers
|
|
369
|
+
|
|
370
|
+
### macOS & Linux
|
|
371
|
+
|
|
372
|
+
```bash
|
|
373
|
+
curl -fsSL https://raw.githubusercontent.com/MrEiu/Kapsel/master/scripts/install.sh | bash
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Windows PowerShell
|
|
377
|
+
|
|
378
|
+
```powershell
|
|
379
|
+
irm https://raw.githubusercontent.com/MrEiu/Kapsel/master/scripts/install.ps1 | iex
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
The installers detect the host platform and configure Kapsel and its
|
|
383
|
+
completion environment automatically.
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## Standalone Binaries
|
|
388
|
+
|
|
389
|
+
Precompiled releases are available for platforms that do not use Python:
|
|
390
|
+
|
|
391
|
+
| Platform / Architecture | Release Artifact |
|
|
392
|
+
| :--- | :--- |
|
|
393
|
+
| **Windows x86_64** | `kapsel-windows-x86_64.zip` |
|
|
394
|
+
| **Linux x86_64** | `kapsel-linux-x86_64.tar.gz` |
|
|
395
|
+
| **macOS Universal** | `kapsel-macos-universal.tar.gz` |
|
|
396
|
+
| **Debian / Ubuntu** | `kapsel_amd64.deb` |
|
|
397
|
+
|
|
398
|
+
See **[GitHub Releases](https://github.com/MrEiu/Kapsel/releases/latest)** for
|
|
399
|
+
the latest artifacts.
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
## Package Managers
|
|
404
|
+
|
|
405
|
+
Kapsel is also available through:
|
|
406
|
+
|
|
407
|
+
- **Scoop**
|
|
408
|
+
- **Homebrew**
|
|
409
|
+
- **Debian / Ubuntu packages**
|
|
410
|
+
|
|
411
|
+
See **[Installation Guide](docs/INSTALLATION.md)** for platform-specific
|
|
412
|
+
instructions and mirrors.
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
## Build from Source
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
git clone https://github.com/MrEiu/Kapsel.git
|
|
420
|
+
cd Kapsel
|
|
421
|
+
pip install -e .
|
|
422
|
+
kps completion sync
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
# ⚙️ Configuration
|
|
428
|
+
|
|
429
|
+
Kapsel stores its main configuration at:
|
|
430
|
+
|
|
431
|
+
```text
|
|
432
|
+
~/.kapsel/config.yaml
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Configuration can be inspected and changed directly from the terminal:
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
kps config
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
Open the configuration file:
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
kps config edit
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
Change individual values:
|
|
448
|
+
|
|
449
|
+
```bash
|
|
450
|
+
kps config set ui.enable_banner false
|
|
451
|
+
kps config set interaction.autosuggest_sensitivity 0.2
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
Configuration can be reloaded without restarting the interactive session.
|
|
455
|
+
|
|
456
|
+
See **[Configuration Guide](docs/configuration.md)** for the complete
|
|
457
|
+
configuration reference.
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
# 🏛️ Architecture
|
|
462
|
+
|
|
463
|
+
Kapsel is designed as a non-invasive execution layer around the host shell.
|
|
464
|
+
|
|
465
|
+
```text
|
|
466
|
+
Host Terminal
|
|
467
|
+
│
|
|
468
|
+
▼
|
|
469
|
+
┌─────────────────────┐
|
|
470
|
+
│ Kapsel │
|
|
471
|
+
│ │
|
|
472
|
+
│ Command Dispatcher │
|
|
473
|
+
│ Completion Engine │
|
|
474
|
+
│ Plugin Registry │
|
|
475
|
+
│ History / State │
|
|
476
|
+
└──────────┬──────────┘
|
|
477
|
+
│
|
|
478
|
+
┌─────────┴─────────┐
|
|
479
|
+
▼ ▼
|
|
480
|
+
Native Executables Kapsel Commands
|
|
481
|
+
git / docker / ... kps <command>
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
## Dual-State Execution
|
|
485
|
+
|
|
486
|
+
Kapsel separates two execution paths:
|
|
487
|
+
|
|
488
|
+
**Native execution**
|
|
489
|
+
|
|
490
|
+
System executables are passed through to the host environment with normal
|
|
491
|
+
TTY interaction, signals, streams, and process behavior.
|
|
492
|
+
|
|
493
|
+
**Kapsel execution**
|
|
494
|
+
|
|
495
|
+
Kapsel-managed commands are dispatched through the `kps` namespace and plugin
|
|
496
|
+
registry.
|
|
497
|
+
|
|
498
|
+
This separation allows Kapsel to enhance terminal workflows without replacing
|
|
499
|
+
the host shell itself.
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
## Collision-Safe Namespaces
|
|
504
|
+
|
|
505
|
+
Kapsel maintains explicit command namespaces so that utilities such as:
|
|
506
|
+
|
|
507
|
+
```text
|
|
508
|
+
alias
|
|
509
|
+
help
|
|
510
|
+
install
|
|
511
|
+
history
|
|
512
|
+
profile
|
|
513
|
+
ps
|
|
514
|
+
kill
|
|
515
|
+
dir
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
do not silently replace or hijack native shell built-ins.
|
|
519
|
+
|
|
520
|
+
For commands that may collide with the host environment, Kapsel keeps them
|
|
521
|
+
inside the `kps` namespace.
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## Zero-Pollution State
|
|
526
|
+
|
|
527
|
+
All Kapsel-managed state is contained in:
|
|
528
|
+
|
|
529
|
+
```text
|
|
530
|
+
~/.kapsel/
|
|
531
|
+
├── config.yaml # Configuration
|
|
532
|
+
├── history.db # Persistent command history
|
|
533
|
+
├── bin/ # User-space runtime binaries
|
|
534
|
+
├── specs/ # Completion specifications
|
|
535
|
+
├── plugins/ # Installed plugins
|
|
536
|
+
└── logs/ # Diagnostic and session logs
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
This keeps Kapsel's runtime state separate from your system and shell
|
|
540
|
+
configuration.
|
|
541
|
+
|
|
542
|
+
---
|
|
543
|
+
|
|
544
|
+
# 📚 Documentation
|
|
545
|
+
|
|
546
|
+
Detailed documentation is maintained separately from the project overview.
|
|
547
|
+
|
|
548
|
+
| Document | Description |
|
|
549
|
+
| :--- | :--- |
|
|
550
|
+
| [Installation Guide](docs/INSTALLATION.md) | Platform-specific installation and setup |
|
|
551
|
+
| [Configuration](docs/configuration.md) | Configuration options and runtime settings |
|
|
552
|
+
| [Commands](docs/commands.md) | Complete command and option reference |
|
|
553
|
+
| [Plugins](docs/plugins.md) | Plugin architecture and usage |
|
|
554
|
+
| [Plugin Development](https://github.com/MrEiu/plugins) | Creating and submitting plugins |
|
|
555
|
+
| [Architecture](docs/architecture.md) | Internal architecture and design |
|
|
556
|
+
|
|
557
|
+
---
|
|
558
|
+
|
|
559
|
+
# 🧪 Development & Testing
|
|
560
|
+
|
|
561
|
+
Clone the repository:
|
|
562
|
+
|
|
563
|
+
```bash
|
|
564
|
+
git clone https://github.com/MrEiu/Kapsel.git
|
|
565
|
+
cd Kapsel
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
Install the development and test dependencies:
|
|
569
|
+
|
|
570
|
+
```bash
|
|
571
|
+
pip install -e ".[test]"
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
Run the test suite:
|
|
575
|
+
|
|
576
|
+
```bash
|
|
577
|
+
pytest tests/ -v
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
---
|
|
581
|
+
|
|
582
|
+
# 🤝 Contributing
|
|
583
|
+
|
|
584
|
+
Contributions to Kapsel are welcome.
|
|
585
|
+
|
|
586
|
+
There are several ways to contribute:
|
|
587
|
+
|
|
588
|
+
### Core
|
|
589
|
+
|
|
590
|
+
Bug fixes, improvements, documentation, tests, and new capabilities for the
|
|
591
|
+
Kapsel core.
|
|
592
|
+
|
|
593
|
+
### Plugins
|
|
594
|
+
|
|
595
|
+
Create new plugins or improve existing ones through the
|
|
596
|
+
**[Kapsel Plugin Repository](https://github.com/MrEiu/plugins)**.
|
|
597
|
+
|
|
598
|
+
### Documentation
|
|
599
|
+
|
|
600
|
+
Improve examples, guides, translations, and developer documentation.
|
|
601
|
+
|
|
602
|
+
Before making substantial changes, please open an issue to discuss the
|
|
603
|
+
proposed direction.
|
|
604
|
+
|
|
605
|
+
---
|
|
606
|
+
|
|
607
|
+
# 📄 License
|
|
608
|
+
|
|
609
|
+
Kapsel is open-source software licensed under the
|
|
610
|
+
**[MIT License](LICENSE)**.
|
|
611
|
+
|
|
612
|
+
---
|
|
613
|
+
|
|
614
|
+
<div align="center">
|
|
615
|
+
|
|
616
|
+
**Kapsel — Wrap complexity, expose simplicity.**
|
|
617
|
+
|
|
618
|
+
Built by [MrEiu](https://github.com/MrEiu) and open-source contributors.
|
|
619
|
+
|
|
620
|
+
</div>
|