cli

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 11 Imported by: 0 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

FYT CLI

FYT is Your Time-tracker.

fyt generates monthly detailed reports, summaries and invoices from local timesheet files. It accepts FYT text and JSON/YAML TimeEntry documents and exports a versioned TimeEntryList in JSON or YAML.

Install with Go

Use Go 1.27.4 or later for the security fixes in the Go toolchain and standard library. Go installation guide

Go names the executable cli after the package path. On Linux, install it as fyt with the commands below. Add ~/.local/bin to your PATH if needed.

fyt_install_dir=$(mktemp -d)
GOBIN="$fyt_install_dir" go install fyt.queueb.org/cli@v0.1.0
mkdir -p "$HOME/.local/bin"
install "$fyt_install_dir/cli" "$HOME/.local/bin/fyt"

Build from source

Build from the CLI checkout. Go fetches the published API dependency.

mkdir -p bin
go build -o bin/fyt .
./bin/fyt --help

Use ./bin/fyt from the checkout or put the executable on your PATH. The commands below assume fyt is on your PATH.

Generate text reports

Save this September 2026 entry in work.fyt.

2026-09-08 09:00,10:00,FYT-1,Review project notes

Create a user configuration with fyt config init and find it with fyt config where. Edit the report member name before generating real reports. Use --config PATH to select a different file.

fyt documents generate 2026-09 -i work.fyt --types=detailed,summary --format=text

The command prints the two reports to stdout. Repeat -i to include more input files.

Prepare PDF rendering

The reference environment for PDF is Ubuntu 24.04 on Linux x86-64 (WSL 2) with Typst CLI 0.15.1 and DejaVu Sans. Go is a build dependency. Text output and timesheet export run with the compiled fyt binary. PDF generation also uses Typst.

  1. Extract the Linux x86-64 archive and put the typst executable on your PATH. Typst 0.15.1 release

  2. Install DejaVu Sans on Ubuntu with sudo apt install fonts-dejavu-core.

  3. Check both dependencies from the shell where FYT will run.

    typst --version
    typst fonts | grep -Fx 'DejaVu Sans'
    

After setup, FYT renders its bundled templates locally and offline. Custom templates need their fonts, imports and other assets available locally. If PDF generation fails to find Typst, check PATH in the same shell that runs fyt. Rendering errors are reported on stderr and return a nonzero exit code.

Generate a monthly PDF set

Generate the PDFs for work.fyt using the configuration created by fyt config init. Fill in your report member name and invoice settings before generating real documents. Example configuration

fyt documents generate 2026-09 \
  -i work.fyt --format=pdf --invoice-number=INV-2026-09 --invoice-date=2026-10-01

With default directory settings, the command writes documents/2026-09/2026-09-detailed.pdf, documents/2026-09/2026-09-summary.pdf, and documents/2026-09/2026-09-invoice.pdf. Use --types=detailed,summary to generate the two reports without an invoice.

See the document generation guide for directory selection, template bundles and per-invoice overrides.

Export timesheet entries

fyt timesheet export -i work.fyt

The default output is a v1alpha1 JSON TimeEntryList on stdout. See the export guide for YAML, file output and reimport.

Development

go test ./...
./hack/build.sh

The build helper writes bin/fyt.

Distributed under the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
app
pkg
cli
parser
Package parser reads the four-field FYT user timesheet format.
Package parser reads the four-field FYT user timesheet format.
pathtemplate
Package pathtemplate expands filesystem paths for a reporting month.
Package pathtemplate expands filesystem paths for a reporting month.
reporting
Package reporting prepares calendar parts and monthly reports.
Package reporting prepares calendar parts and monthly reports.
reporting/render
Package render writes prepared reporting documents.
Package render writes prepared reporting documents.
reporting/render/internal/format
Package format shares display conventions between reporting renderers.
Package format shares display conventions between reporting renderers.
reporting/render/pdf
Package pdf renders reporting documents with Typst.
Package pdf renders reporting documents with Typst.
timesheet
Package timesheet reads FYT and API files into versioned time entry lists.
Package timesheet reads FYT and API files into versioned time entry lists.
Package resources provides files bundled with the FYT CLI.
Package resources provides files bundled with the FYT CLI.

Jump to

Keyboard shortcuts

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