File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ Create a token on `clawdhub.com` → Settings → API tokens, then:
1414
1515``` bash
1616clawdhub login
17+ # or
18+ clawdhub auth login
1719```
1820
1921## Examples
Original file line number Diff line number Diff line change @@ -77,6 +77,36 @@ program
7777 await cmdWhoami ( opts )
7878 } )
7979
80+ const auth = program
81+ . command ( 'auth' )
82+ . description ( 'Authentication commands' )
83+ . showHelpAfterError ( )
84+ . showSuggestionAfterError ( )
85+
86+ auth
87+ . command ( 'login' )
88+ . description ( 'Store API token (for publish)' )
89+ . option ( '--token <token>' , 'API token' )
90+ . action ( async ( options ) => {
91+ const opts = resolveGlobalOpts ( )
92+ await cmdLogin ( opts , options . token )
93+ } )
94+
95+ auth
96+ . command ( 'logout' )
97+ . description ( 'Remove stored token' )
98+ . action ( async ( ) => {
99+ await cmdLogout ( )
100+ } )
101+
102+ auth
103+ . command ( 'whoami' )
104+ . description ( 'Validate token' )
105+ . action ( async ( ) => {
106+ const opts = resolveGlobalOpts ( )
107+ await cmdWhoami ( opts )
108+ } )
109+
80110program
81111 . command ( 'search' )
82112 . description ( 'Vector search skills' )
You can’t perform that action at this time.
0 commit comments