Skip to content

Commit 763fd97

Browse files
committed
Initial commit
0 parents  commit 763fd97

52 files changed

Lines changed: 5319 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/auto-assign.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Auto-assign PR
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened, ready_for_review]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
assign:
12+
if: github.event.pull_request.assignees[0] == null
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Assign PR to DTTerastar
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
PR_URL: ${{ github.event.pull_request.html_url }}
19+
run: gh pr edit "$PR_URL" --add-assignee DTTerastar

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
go:
14+
name: go vet + test
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-go@v5
19+
with:
20+
go-version-file: go.mod
21+
cache: true
22+
- name: go vet
23+
run: go vet ./...
24+
- name: go test
25+
run: go test ./...
26+
27+
compat:
28+
name: compat (CONTRACT machine-attestation)
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: actions/setup-go@v5
33+
with:
34+
go-version-file: go.mod
35+
cache: true
36+
- name: resolve compat dependency
37+
# The compat module lives at github.com/quantcli/common/compat
38+
# under a subpath. `go mod tidy` materializes go.sum for it on
39+
# first run; subsequent runs are cache-served.
40+
run: go mod tidy
41+
- name: build crono-export
42+
run: go build -o /tmp/crono-export .
43+
- name: run compat suite
44+
env:
45+
# Path the compat-tagged test reads from os.Getenv.
46+
CRONO_EXPORT_BIN: /tmp/crono-export
47+
run: go test -tags=compat -run 'TestContract(Dates|Formats)' ./...

.github/workflows/claude.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
actions: read # Required for Claude to read CI results on PRs
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 1
32+
33+
- name: Run Claude Code
34+
id: claude
35+
uses: anthropics/claude-code-action@v1
36+
with:
37+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38+
39+
# This is an optional setting that allows Claude to read CI results on PRs
40+
additional_permissions: |
41+
actions: read
42+
43+
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44+
# prompt: 'Update the pull request description to include a summary of changes.'
45+
46+
# Optional: Add claude_args to customize behavior and configuration
47+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48+
# or https://code.claude.com/docs/en/cli-reference for available options
49+
# claude_args: '--allowed-tools Bash(gh pr *)'
50+

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6.0.2
15+
with:
16+
fetch-depth: 0
17+
18+
- uses: actions/setup-go@v6.4.0
19+
with:
20+
go-version-file: go.mod
21+
22+
- uses: goreleaser/goreleaser-action@v7.0.0
23+
with:
24+
version: latest
25+
args: release --clean
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}

.gitignore

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# If you prefer the allow list template instead of the deny list, see community template:
2+
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3+
#
4+
# Binaries for programs and plugins
5+
*.exe
6+
*.exe~
7+
*.dll
8+
*.so
9+
*.dylib
10+
11+
# Test binary, built with `go test -c`
12+
*.test
13+
14+
# Code coverage profiles and other test artifacts
15+
*.out
16+
coverage.*
17+
*.coverprofile
18+
profile.cov
19+
20+
# Dependency directories (remove the comment below to include it)
21+
# vendor/
22+
23+
# Go workspace file
24+
go.work
25+
go.work.sum
26+
27+
# env file
28+
.env
29+
30+
# Editor/IDE
31+
# .idea/
32+
# .vscode/
33+
34+
# GoReleaser output
35+
dist/
36+
37+
# Local builds
38+
crono-export
39+
crono-export-linux-amd64
40+
*.zip
41+
*.tar.gz
42+
43+
# Dev tooling kept out of the published repo.
44+
tools/
45+
46+
# Wire-capture dumps — contain raw cookies, anti-CSRF tokens, password
47+
# POST bodies, and real account data. Never commit.
48+
cronometer-capture/
49+
*.unredacted.json
50+
51+
.DS_Store
52+
53+
# Agent / IDE local state
54+
.claude/
55+
AGENTS.md

.goreleaser.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
version: 2
2+
3+
builds:
4+
- binary: crono-export
5+
env:
6+
- CGO_ENABLED=0
7+
goos:
8+
- darwin
9+
- linux
10+
- windows
11+
goarch:
12+
- amd64
13+
- arm64
14+
ignore:
15+
- goos: windows
16+
goarch: arm64
17+
ldflags:
18+
- -s -w
19+
20+
archives:
21+
- formats:
22+
- zip
23+
name_template: "crono-export_{{ .Os }}_{{ .Arch }}"
24+
25+
checksum:
26+
name_template: checksums.txt
27+
28+
homebrew_casks:
29+
- name: crono-export
30+
skip_upload: auto
31+
repository:
32+
owner: quantcli
33+
name: homebrew-tap
34+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
35+
directory: Casks
36+
homepage: https://github.com/quantcli/crono-export-cli
37+
description: CLI to export Cronometer nutrition, biometrics, and food log data as JSON
38+
license: MIT
39+
url:
40+
verified: github.com/quantcli/crono-export-cli
41+
hooks:
42+
post:
43+
install: |
44+
if OS.mac?
45+
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/crono-export"]
46+
end
47+
48+
release:
49+
replace_existing_artifacts: true

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Darrell
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)