Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,33 @@ datalayer runtime exec my-script.py --runtime <runtime-id>
datalayer snapshots create <pod-name> my-snapshot 'AI work!' False
```

### 4. Subscription and Credits CLI

Use these commands to inspect billing and manage credits distribution.

```bash
# End-user billing view
datalayer subscriptions show
datalayer subscriptions available
datalayer subscriptions move
datalayer subscriptions topups
datalayer subscriptions dry-run

# Organization and team credits visibility
datalayer usage org-overview --organization-uid <org_uid>
datalayer usage team-overview --team-uid <team_uid>

# Monitoring-driven credit management
datalayer usage org-monitor --organization-uid <org_uid> --window-hours 24
datalayer usage team-monitor --team-uid <team_uid> --window-hours 24

# Credits transfer operations (owners/admins)
datalayer usage org-allocate-team --organization-uid <org_uid> --team-uid <team_uid> --amount 50
datalayer usage org-revoke-team --organization-uid <org_uid> --team-uid <team_uid> --amount 20
datalayer usage team-allocate-member --team-uid <team_uid> --member-uid <member_uid> --amount 15
datalayer usage team-revoke-member --team-uid <team_uid> --member-uid <member_uid> --amount 5
```

## Examples

### Python Examples
Expand Down
4 changes: 4 additions & 0 deletions datalayer_core/cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
from datalayer_core.cli.commands.secrets import secrets_list, secrets_ls
from datalayer_core.cli.commands.tokens import app as tokens_app
from datalayer_core.cli.commands.tokens import tokens_list, tokens_ls
from datalayer_core.cli.commands.subscription import app as subscription_app
from datalayer_core.cli.commands.subscription import subscription_root
from datalayer_core.cli.commands.usage import app as usage_app
from datalayer_core.cli.commands.usage import usage_root
from datalayer_core.cli.commands.users import app as users_app
Expand Down Expand Up @@ -83,6 +85,7 @@ def main_callback(
app.add_typer(runtimes_app)
app.add_typer(secrets_app)
app.add_typer(snapshots_app)
app.add_typer(subscription_app)
app.add_typer(tokens_app)
app.add_typer(users_app)
app.add_typer(usage_app)
Expand All @@ -96,6 +99,7 @@ def main_callback(
app.command(name="logout")(logout_root)
app.command(name="whoami")(whoami_root)
app.command(name="usage")(usage_root)
app.command(name="subscription")(subscription_root)

# Add convenient aliases at root level
app.command(name="envs-list")(envs_list)
Expand Down
Loading
Loading