A terminal UI (TUI) application for tracking workday time entries with the Elaniin VAR backend API.
- 🔐 Bearer token authentication
- 📊 Weekly time entry view with last 7 days (toggle to 2 weeks)
- 📝 Step-by-step form to create new time entries
- 🏷️ Smart project/tag suggestions based on recent usage
- 📋 Clipboard paste support (Ctrl+V) for API tokens
curl -fsSL https://raw.githubusercontent.com/json-nan/var-cli/main/install.sh | shOr with a custom install directory:
curl -fsSL https://raw.githubusercontent.com/json-nan/var-cli/main/install.sh | INSTALL_DIR=$HOME/bin shDownload the latest release for your platform from the releases page.
var-cli --versionIf the installer used ~/.local/bin but the command is not found, add it to your shell profile:
Bash (~/.bashrc):
export PATH="$HOME/.local/bin:$PATH"Zsh (~/.zshrc):
export PATH="$HOME/.local/bin:$PATH"Fish (~/.config/fish/config.fish):
fish_add_path $HOME/.local/binThen reload your shell:
source ~/.bashrc # or ~/.zshrcvar-cli| Key | Action |
|---|---|
n |
New time entry |
r |
Refresh entries |
a |
Toggle 7 days / 2 weeks view |
u |
Update (if available) |
q |
Quit |
- Date — defaults to today (
YYYY-MM-DD) - Description — what you worked on
- Project — pick from frequently-used projects first
- Tags — multi-select with Space, frequently-used first
- Time — minutes (e.g.
60,480) - Billable — toggle Yes/No
Press Esc at any step to cancel.
- Log in to VAR
- Open DevTools → Network tab
- Find a
/projectsrequest - Copy the
Bearertoken from theAuthorizationheader - Paste it into var-cli with Ctrl+V
go run main.goA local test server is included to verify the update flow without touching real releases.
# 1. Start the test server (in one terminal)
go run scripts/testserver.go
# 2. Build var-cli with a fake old version (in another terminal)
go build -ldflags="-X main.version=v0.1.0" -o /tmp/var-cli-test ./main.go
# 3. Run it pointing to the local test server
VAR_CLI_API_URL=http://localhost:9999 \
VAR_CLI_DOWNLOAD_URL=http://localhost:9999 \
/tmp/var-cli-test
# 4. In the app, press 'u' to trigger the update
# 5. Verify the update worked:
/tmp/var-cli-test --version
# → var-cli 99.0.0MIT