Skip to main content

CLI for submitting FreeAgent timeslips

Project description

freeagent-cli

A small CLI for submitting FreeAgent timeslips without clicking through the web UI.

freeagent-cli log acme 1h30m "fixed the thing"

Install

uv tool install freeagent-cli

One-time setup

You'll need to register your own OAuth app with FreeAgent. It takes about two minutes and keeps your data and rate limits separate from everyone else's.

  1. Go to https://dev.freeagent.com/apps and create a new app.

  2. Set the redirect URI to: http://localhost:7878/callback

  3. Note the OAuth identifier and OAuth secret.

  4. Save them locally:

    freeagent-cli auth init --client-id <id> --client-secret <secret>
    

    Add --sandbox if you want to test against the FreeAgent sandbox first.

  5. Authorise the app in your browser:

    freeagent-cli auth login
    

    A browser tab opens, you approve, and the CLI captures the refresh token. The refresh token lasts ~20 years; access tokens auto-refresh on every command.

Credentials are stored at ~/Library/Application Support/freeagent-cli/config.json (macOS) or the equivalent platform config directory, with file mode 0600.

Usage

freeagent-cli --help                                       # canonical flow
freeagent-cli recent                                       # what you've already logged (run this first to avoid duplicates)
freeagent-cli log <project> <duration> [comment...]        # submit a timeslip
freeagent-cli projects                                     # first-time / discovery: projects + tasks in one call

Examples:

freeagent-cli log Acme 1h30m "fixed the thing"
freeagent-cli log Acme 90m fixed the thing                 # comment without quotes
freeagent-cli log "Big Co" 1.5 --task Coding --date 2026-05-01
freeagent-cli log Acme 1.5 --dry-run                       # preview, don't submit
  • Duration accepts 1.5, 90m, 1h30m, or 1:30.
  • Project / task match by case-insensitive name substring, numeric id, or full URL.
  • --task is optional when the project has a single task; otherwise the error lists the choices.
  • --date defaults to today (ISO YYYY-MM-DD to override).
  • --dry-run resolves the project/task/date and prints the would-be submission without sending it.
  • projects --flat emits one project/task pair per line (tab-separated) for grep/awk.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freeagent_cli-0.3.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

freeagent_cli-0.3.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file freeagent_cli-0.3.0.tar.gz.

File metadata

  • Download URL: freeagent_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for freeagent_cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 1400adade6aae3849f4e3b3db669af2eb0f1ffa3ffac950460292ded447858d1
MD5 b8bf511204affafe107617e24b235a41
BLAKE2b-256 14e2dcecf63e5e4758142006f3f06136a3525d6d19ed4bc2d51ce2265da1d3ef

See more details on using hashes here.

File details

Details for the file freeagent_cli-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: freeagent_cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for freeagent_cli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa236758403e4593fa89d0665831cf561dc7a3a428a010811f141dd17a7cde88
MD5 47153415a8f5e0af76f377794a51484f
BLAKE2b-256 d0baa1aebf6976ccf0b74d41fee4fb884957147b31a4b6292abcd5281ece9932

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page