glm

command module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 1 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.

README

glm

GLM API quota monitor and activation tool.

Commands

glm login [name]          # add/update account; prompts for name if omitted, then API key
glm list                  # list accounts
glm logout <name>         # remove account
glm monitor [--debug]     # show quota
glm active [-f] [--debug] # activate quota
glm schedule set +8 09:00 # set daily activation schedule
glm schedule show         # show schedule
glm schedule clear        # clear schedule
glm service install       # install/start systemd timer; mode=auto if no schedule, mode=schedule otherwise
glm service run           # run one activation cycle; logs mode=auto or mode=schedule
glm service stop          # stop and disable systemd user timer/service
glm service uninstall     # stop, disable, and remove systemd user units

No daemon/crontab mode. Scheduling is handled by systemd user timers.

Note: User-level systemd services stop when you log out. Enable lingering to keep them running after logout:

loginctl enable-linger $(whoami)

Config

Default path: ~/.config/glm/config.yaml

providers:
  - name: work
    type: glm
    api_key: sk-xxxxx
    enabled: true

schedule:
  timezone: +8
  times:
    - "09:00:00"

Use custom config:

glm --config ./config.yaml login work
glm --config ./config.yaml schedule set Asia/Shanghai 09:00
glm --config ./config.yaml service install

Install

go install github.com/xihale/glm@latest

Or build from source:

go build -o glm .

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
glm
log
ui

Jump to

Keyboard shortcuts

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