| name | alkalye-cli |
| description | Drive Alkalye via the command line for auth, documents, spaces, and collaboration. Manage documents, share with others, and collaborate — all from the terminal. |
| compatibility | Requires Bun (>=1.0) and a reachable Jazz websocket sync peer. |
| metadata | {"author":"alkalye","version":"1.0"} |
What is Alkalye?
Alkalye is an offline-capable collaborative document editor. The CLI lets you manage documents, spaces, and sharing from the terminal — designed for scripts and AI agents.
Data syncs via Jazz, a local-first protocol. Every mutation is local first and syncs to peers over websocket.
Setup
1. Clone and install
git clone https://github.com/ccssmnn/alkalye.git /path/to/alkalye
cd /path/to/alkalye
bun install
Replace /path/to/alkalye with your preferred location (e.g. ~/Developer/alkalye).
2. Make the CLI available
Symlink the entry point so alkalye is on your PATH:
ln -s /path/to/alkalye/cli.ts ~/.local/bin/alkalye
chmod +x /path/to/alkalye/cli.ts
Or run directly with bun /path/to/alkalye/cli.ts ....
3. Configure the sync peer
The CLI needs a Jazz websocket sync peer. The easiest way is to point at a server — the CLI auto-discovers the peer:
export ALKALYE_SERVER=https://alkalye.com
alkalye --server https://alkalye.com auth whoami
For local development, set the peer directly:
export ALKALYE_SYNC_PEER=ws://localhost:4200
alkalye auth whoami --sync-peer ws://localhost:4200
4. Symlink the skill (for agents)
If your agent supports skill directories, symlink this skill:
ln -s ~/alkalye/skills/alkalye-cli /path/to/your/agent/skills/alkalye-cli
Authentication
Every user gets a BIP39 passphrase (24 words). Store it — it's the only way to recover an account.
alkalye auth signup --name "Alice"
alkalye auth login --passphrase-stdin < passphrase.txt
alkalye auth whoami
alkalye auth passphrase
alkalye auth logout
Credentials are stored in ~/.alkalye/cli/ (override with --home or ALKALYE_CLI_HOME).
Documents
Documents are markdown with a title derived from the first heading or frontmatter.
printf "# Meeting Notes\n\nAction items here." | alkalye doc create --stdin
alkalye doc create --content "# Quick Note\nSome text"
alkalye doc create --content-file draft.md
alkalye doc create --stdin --scope space:<space-id> < doc.md
alkalye doc list
alkalye doc list --scope all
alkalye doc list --scope space:<space-id>
alkalye doc list --deleted
alkalye doc content <doc-id>
alkalye doc content <doc-id> | head -20
alkalye doc get <doc-id>
cat updated.md | alkalye doc update <doc-id> --stdin
alkalye doc rename <doc-id> --title "New Title"
alkalye doc move <doc-id> --scope space:<space-id>
alkalye doc move <doc-id> --scope personal
alkalye doc delete <doc-id>
alkalye doc restore <doc-id>
alkalye doc purge <doc-id>
Spaces
Spaces are shared containers for documents with role-based membership.
alkalye space create --name "Team Docs"
alkalye space list
alkalye space get <space-id>
alkalye space docs <space-id>
alkalye space members <space-id>
alkalye space rename <space-id> --name "New Name"
alkalye space delete <space-id>
Sharing and Collaboration
Share documents or spaces by creating invite links. The recipient accepts the link to gain access.
Document sharing
alkalye doc share create <doc-id> --role writer
alkalye doc share list <doc-id>
alkalye doc share role <doc-id> --invite-group-id <id> --role reader
alkalye doc share revoke <doc-id> --invite-group-id <id>
Space sharing
alkalye space share create <space-id> --role writer
alkalye space share list <space-id>
alkalye space share role <space-id> --invite-group-id <id> --role admin
alkalye space share revoke <space-id> --invite-group-id <id>
Accepting invites
alkalye invite inspect --link <url>
alkalye invite accept --link <url> --sync
Public access
alkalye doc public enable <doc-id>
alkalye space public enable <space-id>
alkalye doc public link <doc-id>
alkalye space public link <space-id>
alkalye doc public disable <doc-id>
alkalye space public disable <space-id>
Output Modes
alkalye doc list
alkalye doc list --json
alkalye auth whoami --quiet && echo "logged in"
alkalye doc list --json --verbose
JSON error output goes to stderr:
{
"ok": false,
"command": "doc.get",
"error": { "type": "NotFoundError", "message": "Document not found: co_xyz" }
}
Exit Codes
| Code | Meaning |
|---|
| 0 | Success |
| 2 | Usage or validation error |
| 3 | Not authenticated |
| 4 | Resource not found |
| 5 | Permission denied |
| 6 | Sync peer unreachable |
| 7 | Config or filesystem error |
Agent Workflow
Multi-actor collaboration pattern — each actor gets an isolated CLI home:
export ALKALYE_SERVER=https://alkalye.com
env ALKALYE_CLI_HOME=/tmp/actor-1 alkalye auth signup --name "Owner" --json
printf "# Shared Doc\nContent here." | env ALKALYE_CLI_HOME=/tmp/actor-1 alkalye doc create --stdin --sync --json
env ALKALYE_CLI_HOME=/tmp/actor-1 alkalye doc share create <doc-id> --role writer --json
env ALKALYE_CLI_HOME=/tmp/actor-2 alkalye auth signup --name "Collaborator" --json
env ALKALYE_CLI_HOME=/tmp/actor-2 alkalye invite accept --link <invite-link> --sync --json
env ALKALYE_CLI_HOME=/tmp/actor-2 alkalye doc content <doc-id>
Editing Documents
For non-trivial edits, pull the document to a local file, edit locally, then push back:
alkalye doc content <doc-id> > draft.md
alkalye doc update <doc-id> --content-file draft.md --sync
This avoids constructing complex content inline and lets you use whatever editing tools you prefer.
Tips
--sync is available on doc create, doc update, and invite accept. Use it when you need to guarantee the remote peer has the data before proceeding.
- Use
--json in scripts — parse with jq or your language's JSON parser.
- Use
--quiet for conditional checks: alkalye auth whoami --quiet || alkalye auth signup --name Bot.
- Invite links require a base URL. Set
ALKALYE_BASE_URL for local development.
- Every command supports
-h or --help for usage details: alkalye doc create --help.