mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
2 lines
2.5 KiB
JavaScript
2 lines
2.5 KiB
JavaScript
import{_ as e,o as s,c as t,ag as i}from"./chunks/framework.DEqXEGcv.js";const u=JSON.parse('{"title":"Auth Commands","description":"","frontmatter":{},"headers":[],"relativePath":"cli/auth.md","filePath":"cli/auth.md","lastUpdated":1771161622000}'),o={name:"cli/auth.md"};function n(l,a,h,r,d,p){return s(),t("div",null,[...a[0]||(a[0]=[i('<h1 id="auth-commands" tabindex="-1">Auth Commands <a class="header-anchor" href="#auth-commands" aria-label="Permalink to "Auth Commands""></a></h1><h2 id="login" tabindex="-1">login <a class="header-anchor" href="#login" aria-label="Permalink to "login""></a></h2><p>Log in to the Memoh server. Prompts for username and password, then stores the JWT token in <code>~/.memoh/token.json</code>.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">memoh</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> login</span></span></code></pre></div><p>Interactive prompts:</p><ul><li>Username</li><li>Password</li></ul><h2 id="logout" tabindex="-1">logout <a class="header-anchor" href="#logout" aria-label="Permalink to "logout""></a></h2><p>Clear the stored token and log out.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">memoh</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> logout</span></span></code></pre></div><h2 id="whoami" tabindex="-1">whoami <a class="header-anchor" href="#whoami" aria-label="Permalink to "whoami""></a></h2><p>Show the current logged-in user (username, display name, user ID, role). Falls back to token info if the API call fails.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">memoh</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> whoami</span></span></code></pre></div>',12)])])}const m=e(o,[["render",n]]);export{u as __pageData,m as default};
|