@kaitranntt/ccs 5.17.0-dev.6 → 5.17.0-dev.8

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 CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  # CCS - Claude Code Switch
4
4
 
5
- ![CCS Logo](https://docs.ccs.kaitran.ca/assets/ccs-logo-medium.png)
5
+ ![CCS Logo](assets/ccs-logo-medium.png)
6
6
 
7
- ### Manage multiple AI accounts from one dashboard.
8
- Run Claude, Gemini, GLM, and more - concurrently, without conflicts.
7
+ ### The universal AI profile manager for Claude Code.
8
+ Run Claude, Gemini, GLM, and any Anthropic-compatible API - concurrently, without conflicts.
9
9
 
10
10
  [![License](https://img.shields.io/badge/license-MIT-C15F3C?style=for-the-badge)](LICENSE)
11
11
  [![npm](https://img.shields.io/npm/v/@kaitranntt/ccs?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@kaitranntt/ccs)
@@ -23,7 +23,7 @@ Run Claude, Gemini, GLM, and more - concurrently, without conflicts.
23
23
  |------------|--------------|------------|
24
24
  | **Multiple Claude Accounts** | Run work + personal Claude subs simultaneously | Dashboard |
25
25
  | **OAuth Providers** | Gemini, Codex, Antigravity - zero API keys needed | Dashboard |
26
- | **API Profiles** | GLM, Kimi with your own API keys | Dashboard |
26
+ | **API Profiles** | GLM, Kimi, or any Anthropic-compatible API | Dashboard |
27
27
 
28
28
  <br>
29
29
 
@@ -64,19 +64,19 @@ The dashboard provides visual management for all account types:
64
64
 
65
65
  **Analytics (Light/Dark Theme)**
66
66
 
67
- ![Analytics Light](https://docs.ccs.kaitran.ca/assets/screenshots/analytics-light.png)
67
+ ![Analytics Light](assets/screenshots/analytics-light.png)
68
68
 
69
- ![Analytics Dark](https://docs.ccs.kaitran.ca/assets/screenshots/analytics.png)
69
+ ![Analytics Dark](assets/screenshots/analytics.png)
70
70
 
71
71
  **API Profiles & OAuth Providers**
72
72
 
73
- ![API Profiles](https://docs.ccs.kaitran.ca/assets/screenshots/api_profiles.png)
73
+ ![API Profiles](assets/screenshots/api_profiles.png)
74
74
 
75
- ![CLIProxy](https://docs.ccs.kaitran.ca/assets/screenshots/cliproxy.png)
75
+ ![CLIProxy](assets/screenshots/cliproxy.png)
76
76
 
77
77
  <br>
78
78
 
79
- ## Supported Providers
79
+ ## Built-in Providers
80
80
 
81
81
  | Provider | Auth Type | Command | Best For |
82
82
  |----------|-----------|---------|----------|
@@ -89,6 +89,9 @@ The dashboard provides visual management for all account types:
89
89
 
90
90
  > **OAuth providers** authenticate via browser on first run. Tokens are cached in `~/.ccs/cliproxy/auth/`.
91
91
 
92
+ > [!TIP]
93
+ > **Need more?** CCS supports **any Anthropic-compatible API**. Create custom profiles for self-hosted LLMs, enterprise gateways, or alternative providers. See [API Profiles documentation](https://docs.ccs.kaitran.ca/providers/api-profiles).
94
+
92
95
  <br>
93
96
 
94
97
  ## Usage
package/VERSION CHANGED
@@ -1 +1 @@
1
- 5.17.0-dev.6
1
+ 5.17.0-dev.8
@@ -1 +1 @@
1
- import{j as e}from"./radix-ui-OFtPgiRV.js";import{a as x,u as p,b as h,d as f,f as l,g as b}from"./tanstack-DMWkeNzM.js";import"./react-vendor-CjrBBxxX.js";import{c as r,O as u,Q as d,B as g}from"./index-9DnkErFb.js";import{i as j}from"./icons-Alnq4BWm.js";import"./form-utils-DKkU3nz7.js";function y({className:s,...t}){return e.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:e.jsx("table",{"data-slot":"table",className:r("w-full caption-bottom text-sm",s),...t})})}function N({className:s,...t}){return e.jsx("thead",{"data-slot":"table-header",className:r("[&_tr]:border-b",s),...t})}function w({className:s,...t}){return e.jsx("tbody",{"data-slot":"table-body",className:r("[&_tr:last-child]:border-0",s),...t})}function i({className:s,...t}){return e.jsx("tr",{"data-slot":"table-row",className:r("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",s),...t})}function v({className:s,...t}){return e.jsx("th",{"data-slot":"table-head",className:r("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t})}function C({className:s,...t}){return e.jsx("td",{"data-slot":"table-cell",className:r("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t})}function D(){return x({queryKey:["accounts"],queryFn:()=>u.accounts.list()})}function T(){const s=p();return h({mutationFn:t=>u.accounts.setDefault(t),onSuccess:(t,o)=>{s.invalidateQueries({queryKey:["accounts"]}),d.success(`Default account set to "${o}"`)},onError:t=>{d.error(t.message)}})}function A({data:s,defaultAccount:t}){const o=T(),c=f({data:s,columns:[{accessorKey:"name",header:"Name",size:200,cell:({row:a})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:a.original.name}),a.original.name===t&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:"default"})]})},{accessorKey:"type",header:"Type",size:100,cell:({row:a})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:a.original.type||"oauth"})},{accessorKey:"created",header:"Created",size:150,cell:({row:a})=>{const n=new Date(a.original.created);return e.jsx("span",{className:"text-muted-foreground",children:n.toLocaleDateString()})}},{accessorKey:"last_used",header:"Last Used",size:150,cell:({row:a})=>{if(!a.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const n=new Date(a.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:n.toLocaleDateString()})}},{id:"actions",header:"Actions",size:100,cell:({row:a})=>{const n=a.original.name===t;return e.jsxs(g,{variant:n?"secondary":"default",size:"sm",className:"h-8 px-2 w-full",disabled:n||o.isPending,onClick:()=>o.mutate(a.original.name),children:[e.jsx(j,{className:`w-3 h-3 mr-1.5 ${n?"opacity-50":""}`}),n?"Active":"Set Default"]})}}],getCoreRowModel:b()});return s.length===0?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:["No accounts found. Use ",e.jsx("code",{className:"text-sm bg-muted px-1 rounded",children:"ccs login"})," to add accounts."]}):e.jsx("div",{className:"border rounded-md",children:e.jsxs(y,{children:[e.jsx(N,{children:c.getHeaderGroups().map(a=>e.jsx(i,{children:a.headers.map(n=>{const m={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",actions:"w-[100px]"}[n.id]||"w-auto";return e.jsx(v,{className:m,children:n.isPlaceholder?null:l(n.column.columnDef.header,n.getContext())},n.id)})},a.id))}),e.jsx(w,{children:c.getRowModel().rows.map(a=>e.jsx(i,{children:a.getVisibleCells().map(n=>e.jsx(C,{children:l(n.column.columnDef.cell,n.getContext())},n.id))},a.id))})]})})}function S(){const{data:s,isLoading:t}=D();return e.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-8",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Accounts"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage multi-account Claude sessions (profiles.json)"})]})}),t?e.jsx("div",{className:"text-muted-foreground",children:"Loading accounts..."}):e.jsx(A,{data:s?.accounts||[],defaultAccount:s?.default??null}),e.jsx("div",{className:"text-sm text-muted-foreground border-t pt-4 mt-4",children:e.jsxs("p",{children:["Accounts are isolated Claude instances with separate sessions.",e.jsx("br",{}),"Use ",e.jsx("code",{className:"bg-muted px-1 rounded",children:"ccs auth create <name>"})," to add new accounts via CLI."]})})]})}export{S as AccountsPage};
1
+ import{j as e}from"./radix-ui-OFtPgiRV.js";import{a as x,u as p,b as h,d as f,f as l,g as b}from"./tanstack-DMWkeNzM.js";import"./react-vendor-CjrBBxxX.js";import{c as r,O as u,Q as d,B as g}from"./index-C2RMogI8.js";import{i as j}from"./icons-Alnq4BWm.js";import"./form-utils-DKkU3nz7.js";function y({className:s,...t}){return e.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:e.jsx("table",{"data-slot":"table",className:r("w-full caption-bottom text-sm",s),...t})})}function N({className:s,...t}){return e.jsx("thead",{"data-slot":"table-header",className:r("[&_tr]:border-b",s),...t})}function w({className:s,...t}){return e.jsx("tbody",{"data-slot":"table-body",className:r("[&_tr:last-child]:border-0",s),...t})}function i({className:s,...t}){return e.jsx("tr",{"data-slot":"table-row",className:r("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",s),...t})}function v({className:s,...t}){return e.jsx("th",{"data-slot":"table-head",className:r("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t})}function C({className:s,...t}){return e.jsx("td",{"data-slot":"table-cell",className:r("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t})}function D(){return x({queryKey:["accounts"],queryFn:()=>u.accounts.list()})}function T(){const s=p();return h({mutationFn:t=>u.accounts.setDefault(t),onSuccess:(t,o)=>{s.invalidateQueries({queryKey:["accounts"]}),d.success(`Default account set to "${o}"`)},onError:t=>{d.error(t.message)}})}function A({data:s,defaultAccount:t}){const o=T(),c=f({data:s,columns:[{accessorKey:"name",header:"Name",size:200,cell:({row:a})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:a.original.name}),a.original.name===t&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:"default"})]})},{accessorKey:"type",header:"Type",size:100,cell:({row:a})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:a.original.type||"oauth"})},{accessorKey:"created",header:"Created",size:150,cell:({row:a})=>{const n=new Date(a.original.created);return e.jsx("span",{className:"text-muted-foreground",children:n.toLocaleDateString()})}},{accessorKey:"last_used",header:"Last Used",size:150,cell:({row:a})=>{if(!a.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const n=new Date(a.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:n.toLocaleDateString()})}},{id:"actions",header:"Actions",size:100,cell:({row:a})=>{const n=a.original.name===t;return e.jsxs(g,{variant:n?"secondary":"default",size:"sm",className:"h-8 px-2 w-full",disabled:n||o.isPending,onClick:()=>o.mutate(a.original.name),children:[e.jsx(j,{className:`w-3 h-3 mr-1.5 ${n?"opacity-50":""}`}),n?"Active":"Set Default"]})}}],getCoreRowModel:b()});return s.length===0?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:["No accounts found. Use ",e.jsx("code",{className:"text-sm bg-muted px-1 rounded",children:"ccs login"})," to add accounts."]}):e.jsx("div",{className:"border rounded-md",children:e.jsxs(y,{children:[e.jsx(N,{children:c.getHeaderGroups().map(a=>e.jsx(i,{children:a.headers.map(n=>{const m={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",actions:"w-[100px]"}[n.id]||"w-auto";return e.jsx(v,{className:m,children:n.isPlaceholder?null:l(n.column.columnDef.header,n.getContext())},n.id)})},a.id))}),e.jsx(w,{children:c.getRowModel().rows.map(a=>e.jsx(i,{children:a.getVisibleCells().map(n=>e.jsx(C,{children:l(n.column.columnDef.cell,n.getContext())},n.id))},a.id))})]})})}function S(){const{data:s,isLoading:t}=D();return e.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-8",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Accounts"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage multi-account Claude sessions (profiles.json)"})]})}),t?e.jsx("div",{className:"text-muted-foreground",children:"Loading accounts..."}):e.jsx(A,{data:s?.accounts||[],defaultAccount:s?.default??null}),e.jsx("div",{className:"text-sm text-muted-foreground border-t pt-4 mt-4",children:e.jsxs("p",{children:["Accounts are isolated Claude instances with separate sessions.",e.jsx("br",{}),"Use ",e.jsx("code",{className:"bg-muted px-1 rounded",children:"ccs auth create <name>"})," to add new accounts via CLI."]})})]})}export{S as AccountsPage};