🌷 the cutsie hackatime helper

feat: add basic command and flake

dunkirk.sh 0322f9ff 88ea8f48

verified
+220
+3
.gitignore
··· 1 + bin 2 + .direnv 3 + .envrc
+32
README.md
··· 2 2 3 3 The cutsie [hackatime](https://hackatime.hackclub.com/) helper. Helping solve common problems since `2025` 4 4 5 + ## Install 6 + 7 + You can download a pre-built binary from the releases or you can use the following options 8 + 9 + ### Go 10 + 11 + ```bash 12 + # Go 13 + go install github.com/taciturnaxolotl/akami@latest 14 + ``` 15 + 16 + ### Nix 17 + 18 + ```bash 19 + # Direct installation with flakes enabled 20 + nix profile install github:taciturnaxolotl/akami 21 + ``` 22 + 23 + For use in your own flake: 24 + 25 + ```nix 26 + # In your flake.nix 27 + { 28 + inputs.akami.url = "github:taciturnaxolotl/akami"; 29 + 30 + outputs = { self, nixpkgs, akami, ... }: { 31 + # Access the package as: 32 + # akami.packages.${system}.default 33 + }; 34 + } 35 + ``` 36 + 5 37 Written in go with [fang](https://github.com/charmbracelet/fang) and [cobra](https://github.com/spf13/cobra). If you have any suggestions or issues feel free to open an issue on my [tangled](https://tangled.sh/@dunkirk.sh/akami) knot 6 38 7 39 <p align="center">
+27
flake.lock
··· 1 + { 2 + "nodes": { 3 + "nixpkgs": { 4 + "locked": { 5 + "lastModified": 1750365781, 6 + "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=", 7 + "owner": "NixOS", 8 + "repo": "nixpkgs", 9 + "rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "NixOS", 14 + "ref": "nixos-unstable", 15 + "repo": "nixpkgs", 16 + "type": "github" 17 + } 18 + }, 19 + "root": { 20 + "inputs": { 21 + "nixpkgs": "nixpkgs" 22 + } 23 + } 24 + }, 25 + "root": "root", 26 + "version": 7 27 + }
+65
flake.nix
··· 1 + { 2 + description = "🌷 the cutsie hackatime helper"; 3 + 4 + inputs = { 5 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 + }; 7 + 8 + outputs = { self, nixpkgs }: 9 + let 10 + allSystems = [ 11 + "x86_64-linux" # 64-bit Intel/AMD Linux 12 + "aarch64-linux" # 64-bit ARM Linux 13 + "x86_64-darwin" # 64-bit Intel macOS 14 + "aarch64-darwin" # 64-bit ARM macOS 15 + ]; 16 + forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f { 17 + pkgs = import nixpkgs { inherit system; }; 18 + }); 19 + in 20 + { 21 + packages = forAllSystems ({ pkgs }: { 22 + default = pkgs.buildGoModule rec { 23 + pname = "akami"; 24 + version = "0.0.1"; 25 + subPackages = [ "." ]; # Build from root directory 26 + src = ./.; 27 + vendorHash = "sha256-9gO00c3D846SJl5dbtfj0qasmONLNxU/7V1TG6QEaxM="; 28 + }; 29 + }); 30 + 31 + devShells = forAllSystems ({ pkgs }: { 32 + default = pkgs.mkShell { 33 + buildInputs = with pkgs; [ 34 + go 35 + gopls 36 + gotools 37 + go-tools 38 + (pkgs.writeShellScriptBin "akami-dev" '' 39 + go build -o ./bin/akami ./main.go 40 + ./bin/akami "$@" || true 41 + '') 42 + ]; 43 + 44 + shellHook = '' 45 + export PATH=$PATH:$PWD/bin 46 + mkdir -p $PWD/bin 47 + ''; 48 + }; 49 + }); 50 + 51 + apps = forAllSystems ({ pkgs }: { 52 + default = { 53 + type = "app"; 54 + program = "${self.packages.${pkgs.system}.default}/bin/akami"; 55 + }; 56 + akami-dev = { 57 + type = "app"; 58 + program = toString (pkgs.writeShellScript "akami-dev" '' 59 + go build -o ./bin/akami ./main.go 60 + ./bin/akami $* || true 61 + ''); 62 + }; 63 + }); 64 + }; 65 + }
+27
go.mod
··· 1 + module github.com/taciturnaxolotl/akami 2 + 3 + go 1.24.3 4 + 5 + require ( 6 + github.com/charmbracelet/colorprofile v0.3.0 // indirect 7 + github.com/charmbracelet/fang v0.1.0 // indirect 8 + github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.1 // indirect 9 + github.com/charmbracelet/x/ansi v0.8.0 // indirect 10 + github.com/charmbracelet/x/cellbuf v0.0.13 // indirect 11 + github.com/charmbracelet/x/exp/charmtone v0.0.0-20250603201427-c31516f43444 // indirect 12 + github.com/charmbracelet/x/term v0.2.1 // indirect 13 + github.com/inconshreveable/mousetrap v1.1.0 // indirect 14 + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect 15 + github.com/mattn/go-runewidth v0.0.16 // indirect 16 + github.com/muesli/cancelreader v0.2.2 // indirect 17 + github.com/muesli/mango v0.1.0 // indirect 18 + github.com/muesli/mango-cobra v1.2.0 // indirect 19 + github.com/muesli/mango-pflag v0.1.0 // indirect 20 + github.com/muesli/roff v0.1.0 // indirect 21 + github.com/rivo/uniseg v0.4.7 // indirect 22 + github.com/spf13/cobra v1.9.1 // indirect 23 + github.com/spf13/pflag v1.0.6 // indirect 24 + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect 25 + golang.org/x/sys v0.31.0 // indirect 26 + golang.org/x/text v0.24.0 // indirect 27 + )
+47
go.sum
··· 1 + github.com/charmbracelet/colorprofile v0.3.0 h1:KtLh9uuu1RCt+Hml4s6Hz+kB1PfV3wi++1h5ia65yKQ= 2 + github.com/charmbracelet/colorprofile v0.3.0/go.mod h1:oHJ340RS2nmG1zRGPmhJKJ/jf4FPNNk0P39/wBPA1G0= 3 + github.com/charmbracelet/fang v0.1.0 h1:SlZS2crf3/zQh7Mr4+W+7QR1k+L08rrPX5rm5z3d7Wg= 4 + github.com/charmbracelet/fang v0.1.0/go.mod h1:Zl/zeUQ8EtQuGyiV0ZKZlZPDowKRTzu8s/367EpN/fc= 5 + github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.1 h1:D9AJJuYTN5pvz6mpIGO1ijLKpfTYSHOtKGgwoTQ4Gog= 6 + github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.1/go.mod h1:tRlx/Hu0lo/j9viunCN2H+Ze6JrmdjQlXUQvvArgaOc= 7 + github.com/charmbracelet/x/ansi v0.8.0 h1:9GTq3xq9caJW8ZrBTe0LIe2fvfLR/bYXKTx2llXn7xE= 8 + github.com/charmbracelet/x/ansi v0.8.0/go.mod h1:wdYl/ONOLHLIVmQaxbIYEC/cRKOQyjTkowiI4blgS9Q= 9 + github.com/charmbracelet/x/cellbuf v0.0.13 h1:/KBBKHuVRbq1lYx5BzEHBAFBP8VcQzJejZ/IA3iR28k= 10 + github.com/charmbracelet/x/cellbuf v0.0.13/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= 11 + github.com/charmbracelet/x/exp/charmtone v0.0.0-20250603201427-c31516f43444 h1:IJDiTgVE56gkAGfq0lBEloWgkXMk4hl/bmuPoicI4R0= 12 + github.com/charmbracelet/x/exp/charmtone v0.0.0-20250603201427-c31516f43444/go.mod h1:T9jr8CzFpjhFVHjNjKwbAD7KwBNyFnj2pntAO7F2zw0= 13 + github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= 14 + github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= 15 + github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= 16 + github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= 17 + github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= 18 + github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= 19 + github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= 20 + github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= 21 + github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= 22 + github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= 23 + github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= 24 + github.com/muesli/mango v0.1.0 h1:DZQK45d2gGbql1arsYA4vfg4d7I9Hfx5rX/GCmzsAvI= 25 + github.com/muesli/mango v0.1.0/go.mod h1:5XFpbC8jY5UUv89YQciiXNlbi+iJgt29VDC5xbzrLL4= 26 + github.com/muesli/mango-cobra v1.2.0 h1:DQvjzAM0PMZr85Iv9LIMaYISpTOliMEg+uMFtNbYvWg= 27 + github.com/muesli/mango-cobra v1.2.0/go.mod h1:vMJL54QytZAJhCT13LPVDfkvCUJ5/4jNUKF/8NC2UjA= 28 + github.com/muesli/mango-pflag v0.1.0 h1:UADqbYgpUyRoBja3g6LUL+3LErjpsOwaC9ywvBWe7Sg= 29 + github.com/muesli/mango-pflag v0.1.0/go.mod h1:YEQomTxaCUp8PrbhFh10UfbhbQrM/xJ4i2PB8VTLLW0= 30 + github.com/muesli/roff v0.1.0 h1:YD0lalCotmYuF5HhZliKWlIx7IEhiXeSfq7hNjFqGF8= 31 + github.com/muesli/roff v0.1.0/go.mod h1:pjAHQM9hdUUwm/krAfrLGgJkXJ+YuhtsfZ42kieB2Ig= 32 + github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 33 + github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= 34 + github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= 35 + github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 36 + github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= 37 + github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= 38 + github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= 39 + github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 40 + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= 41 + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= 42 + golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= 43 + golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= 44 + golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= 45 + golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= 46 + gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 47 + gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+19
main.go
··· 1 + package main 2 + 3 + import ( 4 + "context" 5 + "os" 6 + 7 + "github.com/charmbracelet/fang" 8 + "github.com/spf13/cobra" 9 + ) 10 + 11 + func main() { 12 + cmd := &cobra.Command{ 13 + Use: "akami", 14 + Short: "🌷 the cutsie hackatime helper", 15 + } 16 + if err := fang.Execute(context.TODO(), cmd); err != nil { 17 + os.Exit(1) 18 + } 19 + }