@xwm111/ccs 0.1.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 +21 -0
- package/README.md +65 -0
- package/bin/ccs.mjs +2 -0
- package/dist/chunks/auto-updater.mjs +1708 -0
- package/dist/chunks/claude-code-incremental-manager.mjs +576 -0
- package/dist/chunks/installer.mjs +610 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.mjs +2407 -0
- package/dist/i18n/locales/en/api.json +51 -0
- package/dist/i18n/locales/en/cli.json +58 -0
- package/dist/i18n/locales/en/common.json +19 -0
- package/dist/i18n/locales/en/configuration.json +81 -0
- package/dist/i18n/locales/en/errors.json +26 -0
- package/dist/i18n/locales/en/installation.json +80 -0
- package/dist/i18n/locales/en/language.json +19 -0
- package/dist/i18n/locales/en/menu.json +31 -0
- package/dist/i18n/locales/en/multi-config.json +79 -0
- package/dist/i18n/locales/en/uninstall.json +56 -0
- package/dist/i18n/locales/en/updater.json +26 -0
- package/dist/i18n/locales/zh-CN/api.json +51 -0
- package/dist/i18n/locales/zh-CN/cli.json +58 -0
- package/dist/i18n/locales/zh-CN/common.json +19 -0
- package/dist/i18n/locales/zh-CN/configuration.json +81 -0
- package/dist/i18n/locales/zh-CN/errors.json +26 -0
- package/dist/i18n/locales/zh-CN/installation.json +80 -0
- package/dist/i18n/locales/zh-CN/language.json +19 -0
- package/dist/i18n/locales/zh-CN/menu.json +31 -0
- package/dist/i18n/locales/zh-CN/multi-config.json +79 -0
- package/dist/i18n/locales/zh-CN/uninstall.json +56 -0
- package/dist/i18n/locales/zh-CN/updater.json +26 -0
- package/dist/index.d.mts +222 -0
- package/dist/index.d.ts +222 -0
- package/dist/index.mjs +18 -0
- package/package.json +109 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-PRESENT UfoMiao <https://github.com/UfoMiao> & Miao Da <https://github.com/WitMiao>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>ccs - Claude Code Switch</h1>
|
|
3
|
+
|
|
4
|
+
<p align="center">
|
|
5
|
+
<b>English</b> | <a href="README_zh-CN.md">中文</a> | <a href="README_ja-JP.md">日本語</a>
|
|
6
|
+
|
|
7
|
+
> Manage multiple Claude Code API endpoints and switch between them in one command — plus keep Claude Code and ccs up to date.
|
|
8
|
+
</p>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
## What is ccs?
|
|
12
|
+
|
|
13
|
+
`ccs` (Claude Code Switch) is a small CLI that does two things well:
|
|
14
|
+
|
|
15
|
+
1. **Manage & switch API endpoints** — Save multiple Claude Code API profiles (base URL + auth type + key) and switch the active one instantly, from an interactive menu or a single command.
|
|
16
|
+
2. **Check updates** — Update both Claude Code and `ccs` itself to the latest versions.
|
|
17
|
+
|
|
18
|
+
It also offers an interactive menu, zh-CN/en language switching, and clean uninstallation. Configuration lives in `~/.ccs`.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Install globally
|
|
24
|
+
npm i -g @xwm111/ccs
|
|
25
|
+
|
|
26
|
+
# Or run without installing
|
|
27
|
+
npx @xwm111/ccs
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
ccs # Open the interactive menu (default)
|
|
34
|
+
ccs config-switch # Manage / switch API endpoints
|
|
35
|
+
ccs cs # Alias for config-switch
|
|
36
|
+
ccs cs --list # List saved configurations
|
|
37
|
+
ccs cs my-endpoint # Switch directly to a named configuration
|
|
38
|
+
ccs check-updates # Check & update Claude Code and ccs
|
|
39
|
+
ccs check # Alias for check-updates
|
|
40
|
+
ccs uninstall # Remove ccs configurations and tools
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Common options:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
ccs --lang zh-CN # Switch interface language (zh-CN, en)
|
|
47
|
+
ccs --help # Show help
|
|
48
|
+
ccs --version # Show version
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Features
|
|
52
|
+
|
|
53
|
+
### 1. Multiple API endpoints with quick switching
|
|
54
|
+
|
|
55
|
+
Store as many Claude Code API profiles as you like — each with its own base URL, authentication type (Auth Token / API Key), and key. Switch the active endpoint from the interactive menu or directly with `ccs cs <name>`. Use `ccs cs --list` to see everything you have configured.
|
|
56
|
+
|
|
57
|
+
### 2. Update checking
|
|
58
|
+
|
|
59
|
+
`ccs check-updates` checks for new versions of Claude Code and `ccs`, and updates them for you.
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
[MIT License](LICENSE)
|
|
64
|
+
|
|
65
|
+
Forked from [UfoMiao/zcf](https://github.com/UfoMiao/zcf) (MIT).
|
package/bin/ccs.mjs
ADDED