cmdadmin

package
v2.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 43 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cmdadmin holds the commands of the server's admin, on the base: create, list, disable and log out accounts, reset their password and change the server's secret and its settings.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("account not found")

ErrNotFound is an account name that matches none.

Functions

func Activity

func Activity(cobra *cobra.Command, args []string) error

Activity prints the journal of every account, or of args[0], the newest first, or as JSON with --json.

func AddUser

func AddUser(cobra *cobra.Command, args []string) error

AddUser creates an account.

func Admin

func Admin(cobra *cobra.Command, args []string) error

Admin opens the admin's screen: the server's state, the accounts and the settings, on the base like the other admin commands. It needs a terminal.

func Cleanup

func Cleanup(cobra *cobra.Command, args []string) error

Cleanup runs serve's hourly round now: index the notes left unindexed, purge what expired.

func DisableUser

func DisableUser(cobra *cobra.Command, args []string) error

DisableUser refuses an account to log in and its sessions and tokens, keeping its data.

func EnableUser

func EnableUser(cobra *cobra.Command, args []string) error

EnableUser gives a disabled account back.

func ListUsers

func ListUsers(cobra *cobra.Command, args []string) error

ListUsers prints every account with its plan, admin flag, activity, notes and sessions, or as JSON with --json.

func ResetPassword

func ResetPassword(cobra *cobra.Command, args []string) error

ResetPassword gives an account a new password and logs all its devices out: for a forgotten one.

func Restart

func Restart(cobra *cobra.Command, args []string) error

Restart asks the running serve to restart a part of it, args[0] api or mcp, in the same process. The MCP comes back only while mcp_enabled is on.

func RevokeSessions

func RevokeSessions(cobra *cobra.Command, args []string) error

RevokeSessions logs an account out of every device: its sessions and tokens are deleted.

func RotateSecret

func RotateSecret(cobra *cobra.Command, args []string) error

RotateSecret seals the keys of the accounts by TIDE_SECRET, in place of TIDE_OLD_SECRET.

func SeedPerf

func SeedPerf(cobra *cobra.Command, args []string) error

SeedPerf creates an account of generated notes, 50,000 unless args[1] says otherwise, to measure the app at scale.

func SetPlan

func SetPlan(cobra *cobra.Command, args []string) error

SetPlan changes the plan of an account, args[0] its name and args[1] the plan.

func Settings

func Settings(cobra *cobra.Command, args []string) error

Settings prints the settings of the server, one key: value per line. With no row yet they are the defaults, said on stderr so stdout stays the settings.

func SettingsSet

func SettingsSet(cobra *cobra.Command, args []string) error

SettingsSet changes one setting, args[0] its key and args[1] its value; a running server applies it at once.

func Status

func Status(cobra *cobra.Command, args []string) error

Status prints what the server is doing, in the groups of the admin's tabs: Tide (api, mcp, web) and Services (postgres, silo), then Storage and Accounts. An unreachable Silo is printed, not an error; an unreachable base stops the command before this one.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL