Skip to main content
The CLI uses key-based authentication with Sign-In with Ethereum (SIWE). You generate a local key pair, then authenticate with a TinyCloud node to establish a session.

Authentication Flow

1

Generate keys

tc init creates a new key pair and stores it in your profile directory.
2

Sign in

tc auth login opens a browser-based authentication flow. The node verifies your signature and issues a session token.
3

Session stored

The session is persisted locally. Subsequent commands use it automatically until it expires.

Commands

tc init

Initialize a new profile with a fresh key pair.
tc init
OptionDescriptionDefault
--name <name>Profile namedefault
--key-onlyGenerate keys without interactive setupfalse
--host <url>Set the TinyCloud node URLhttps://node.tinycloud.xyz
--pasteOutput the auth URL instead of opening a browserfalse
$ tc init --name my-project
  Generating key pair...
  Profile "my-project" created.
  Keys stored in ~/.tinycloud/profiles/my-project/

  Run `tc auth login --profile my-project` to sign in.

tc auth login

Sign in to a TinyCloud node and establish a session.
tc auth login
OptionDescriptionDefault
--pastePrint the auth URL instead of opening a browserfalse
$ tc auth login
  Opening browser for authentication...
  Waiting for confirmation...
  Signed in successfully.
  Address:  0x1234...abcd
  Space:    0x1234...abcd-1-default

tc auth logout

Clear the current session.
tc auth logout
$ tc auth logout
  Session cleared for profile "default".

tc auth status

Check the current authentication state.
tc auth status
$ tc auth status
  Profile:  default
  Address:  0x1234...abcd
  Space:    0x1234...abcd-1-default
  Session:  Active (expires in 23h 42m)
  Node:     https://node.tinycloud.xyz

tc auth whoami

Print your DID and address.
tc auth whoami
$ tc auth whoami
  Address:  0x1234...abcd
  DID:      did:pkh:eip155:1:0x1234567890abcdef1234567890abcdef12345678
  Key DID:  did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuias...

Automated Authentication

For CI/CD and scripted workflows, use TC_PRIVATE_KEY to skip the browser flow entirely.
export TC_PRIVATE_KEY=0xabc123...
tc auth login
# Signs in automatically using the private key
Keep TC_PRIVATE_KEY in your CI/CD secrets. Never hardcode it in scripts or commit it to version control.