Authentication
Login, logout, whoami, status, project initialization, and API tokens
saedra login
Log in to your Saedra account. Prompts for email and password, then authenticates against the API.
Credentials are saved to ~/.saedra/config.json with restricted permissions (0600).
$ saedra login
Saedra - Login
? Email: user@example.com
? Password: ********
Login successful! Welcome, user@example.comsaedra whoami
Show the currently logged-in user.
$ saedra whoami
Logged in as: user@example.comsaedra status
Check the API connection and login status.
$ saedra status
Saedra - Status
API: online (0.1.0)
Server: https://saedra-api.onrender.com
User: user@example.comsaedra logout
Remove saved credentials and log out.
$ saedra logout
Logged out successfully.saedra init
Link the current folder to a Saedra project. Creates a .saedra file so that all commands in this directory (and subdirectories) automatically use the linked project without prompting.
$ saedra init
? Select a project: > my-infra
saedra-test
Linked to project my-infra. Created .saedraOnce initialized, commands skip the project selector:
$ saedra doc push ./docs/architecture.md
Using project: my-infra (from .saedra)
Uploading architecture.md... ✓The .saedra file can be committed (shared config) or added to .gitignore (personal config), depending on your preference.
saedra init --with-hooks
Links the project and also installs a git post-commit hook that automatically logs a change event after every commit.
$ saedra init --with-hooks
? Select a project: > my-infra
saedra-test
Linked to project my-infra. Created .saedra
Created: .saedra-hooks/post-commit
Installed: .git/hooks/post-commit
Every commit will now log a change event automatically.
Tip: commit .saedra-hooks/ so teammates can install with: cp .saedra-hooks/post-commit .git/hooks/post-commitThe hook runs two commands on every commit:
saedra memory change log --from-git --no-prompt— logs the change event automaticallysaedra memory compress— updates.saedra-context.jsonwith the latest snapshot
No manual interaction required.
If .git/hooks/post-commit already exists, the hook is not overwritten. A message is shown with the manual copy command instead.
Teammates can activate the hook from the committed .saedra-hooks/ directory:
cp .saedra-hooks/post-commit .git/hooks/post-commitsaedra token create [name]
Create a new API token for CI/automation use. Requires being logged in with a normal session (an API token cannot create another API token). The raw token value is printed once — save it immediately, it cannot be retrieved again.
$ saedra token create "CI - GitHub Actions"
Token created. Save it now — it won't be shown again.
saedra_pat_ab12cd34ef56...
Use it in CI as SAEDRA_TOKEN.If no name is given, defaults to "CI".
saedra token list
List your API tokens (name, prefix, creation date, last used date). Never shows the full token value.
$ saedra token list
Your tokens:
- CI - GitHub Actions (saedra_pat_...)
Created: 8/4/2026
Last used: 8/4/2026saedra token revoke
Revoke an API token. Shows an interactive list of your tokens to select from.
$ saedra token revoke
? Select a token to revoke: > CI - GitHub Actions (saedra_pat_...)
Token revoked successfully.