cmd account - nself-org/cli GitHub Wiki
Authenticate with your ɳSelf account and manage credentials.
These three commands handle the full CLI authentication lifecycle: log in, view account details, manage licenses, and log out.
Credentials are stored at ~/.nself/auth.json (permissions: 0600). The
auth server is api.nself.org. Override with NSELF_AUTH_SERVER_URL for
testing or self-hosted deployments.
Log in to your ɳSelf account using the device authorization flow.
nself login [--no-browser] [--force]
The command opens your browser to nself.org/auth/cli?code=XXXX-YYYY.
Confirm the short code matches, click Authorize, and the CLI stores your
session token automatically.
| Flag | Description |
|---|---|
--no-browser |
Print the login URL instead of opening a browser |
--force |
Log in even if already logged in (replaces the existing session) |
# Standard login — opens browser automatically
nself login
# Headless environment (CI, SSH)
nself login --no-browser
# Re-authenticate (token rotation, tier change)
nself login --forceℹ Contacting nSelf auth server...
» Your login code: ABCD-WXYZ
» Open: https://nself.org/auth/cli?code=ABCD-WXYZ
Browser opened. Waiting for authorization...
.
✓ Logged in as [email protected] (pro).
Bundles: [nclaw]
| Path | Mode | Contents |
|---|---|---|
~/.nself/auth.json |
0600 | Access token, session token, email, tier, bundles |
Revoke the current session and delete local credentials.
nself logout [--all]
The command calls POST /auth/signout on the auth server to revoke the
session, then deletes ~/.nself/auth.json. If the server is unreachable,
local credentials are still deleted.
| Flag | Description |
|---|---|
--all |
Revoke every active session (useful when a device is lost or shared) |
# Log out the current session
nself logout
# Revoke all sessions (lost device, security incident)
nself logout --all✓ Logged out.
View account details and manage licenses linked to your account.
nself account <subcommand>
| Subcommand | Description |
|---|---|
show |
Print email, tier, MFA status, and bundles |
licenses list |
List active licenses linked to this account |
Print live account info from the auth server. Falls back to cached data
from ~/.nself/auth.json if the server is unreachable.
nself account show
Example output:
Email: [email protected]
Name: Ali S
Tier: pro
Email verified: yes
MFA: enabled
Bundles: nclaw, nchat
Token expires: 2026-07-01T00:00:00Z
List all licenses linked to your account, with seat usage and expiry.
nself account licenses list
Example output:
+----------+---------+------+--------+-------+------------+
| ID | Product | Tier | Bundles| Seats | Expires |
+----------+---------+------+--------+-------+------------+
| a1b2c3d4 | nSelf | pro | nclaw | 1/5 | 2027-04-01 |
+----------+---------+------+--------+-------+------------+
| Variable | Default | Purpose |
|---|---|---|
NSELF_AUTH_SERVER_URL |
https://api.nself.org |
Override auth server base URL |
NSELF_CLI_AUTH_URL |
https://nself.org/auth/cli |
Override device auth page URL |
-
nself license set <key>, activate a plugin license key (existing flow) -
nself license list, list locally configured license keys