Pronounced "epic-but-with-a-k"
A CLI for working with Unix Timestamps inspired by epochconverter.com.
Also kind of like Unix date, but for smoother brains and folks who like nanosecond timestamps.
Main commands:
parse- read a unix timestamp and return the human readable form. Infers the precision.now- generate a unix timestamp for the current instant. Multiple precisions supported.timezone(TBA)- work with system timezones (view, list, search)at(TBA)- convert human readable timestamps and expressions to unix timestampsbetween(TBA)- find the human readable delta between two timestamps
Built with great open source libraries:
- spf13/cobra
- spf13/viper
- charmbracelet/fang
- charmbracelet/lipgloss
- charmbracelet/vhs (for GIF recording)
- goreleaser/goreleaser
Install on MacOS and Linux using this homebrew tap:
brew install DanStough/tap/epokYou can install the tool directly if you have a Go installation >= 1.21:
go install github.com/DanStough/epok@latestRun epok help.
Important
Tests require the use of the experimental testing/synctest package.
You will need to configure your Go environment with GOEXPERIMENT=synctest.
Setting GOTRACEBACK=all can also be helpful for debugging synctest errors (Go #70911).
For now, you can use the vanilla Go commands for building and testing:
# Run
go run . parse --help
# Test
go test -v ./...MVP
-
parsecommand- Outputs UTC and local system time from arg
- Outputs UTC and local system time from stdin
- Lipgloss for styling
-
nowcommand to return the instantaneous timestamp.-
-p,--precisionto specify the precision
-
-
go installinstructions - Version command (handled by
fang) - Flair: GIF + Ascii Art
- CI
- go releaser
- homebrew tap
- Makefile, Taskfile or
Justto build -
parsecommand- timezone flag for parse command to specify additional output zone
-
timezonecommand- list command (include source?)
- show current system timezone
- Output Mode:
simple- something that can be copy/pasted - CI
- go test
- conventional commits check
-
betweencommand - compare two timestamps - Output Mode:
json - golintci + CI
-
atcommand for generating a unix timestamp from multiple formats. - Add "preferred timezones" to the config file, which are used when outputting human-readable information.
- batch process multiple timestamps and return tabular delta
-
built-in copy/paste functionality (yes, I knownow I'm thinking this doesn't make much sense if you can read from stdin.pbcopy/pbpasteis a thing) - "default" command - alias your favorite command in the tool