Saedra Docs
CLI

Authentication

Login, logout, whoami, status and project initialization

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.

$ saedra login

  Saedra - Login

? Email: user@example.com
? Password: ********

Login successful! Welcome, user@example.com

saedra whoami

Show the currently logged-in user.

$ saedra whoami
Logged in as: user@example.com

saedra 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.com

saedra 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 .saedra

Once 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-commit

The hook runs saedra memory change log --from-git --no-prompt on every commit, pre-filling the summary from the commit message and the file list from git diff. 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-commit