{"id":13526300,"url":"https://github.com/influxdata/flux","last_synced_at":"2026-01-28T14:02:55.466Z","repository":{"id":37385209,"uuid":"137362393","full_name":"influxdata/flux","owner":"influxdata","description":"Flux is a lightweight scripting language for querying databases (like InfluxDB) and working with data. It's part of InfluxDB 1.7 and 2.0, but can be run independently of those.","archived":false,"fork":false,"pushed_at":"2026-01-20T13:43:40.000Z","size":75084,"stargazers_count":789,"open_issues_count":3,"forks_count":156,"subscribers_count":51,"default_branch":"master","last_synced_at":"2026-01-20T21:54:47.493Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://influxdata.com","language":"FLUX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/influxdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-06-14T13:32:57.000Z","updated_at":"2026-01-20T13:43:36.000Z","dependencies_parsed_at":"2023-10-12T16:43:00.142Z","dependency_job_id":"45853834-92d9-4a2c-9723-ef55e0436de3","html_url":"https://github.com/influxdata/flux","commit_stats":{"total_commits":2923,"total_committers":112,"mean_commits":"26.098214285714285","dds":0.7895997263085871,"last_synced_commit":"68c831c40b396f0274f6a9f97d77707c39970b02"},"previous_names":[],"tags_count":302,"template":false,"template_full_name":null,"purl":"pkg:github/influxdata/flux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/influxdata%2Fflux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/influxdata%2Fflux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/influxdata%2Fflux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/influxdata%2Fflux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/influxdata","download_url":"https://codeload.github.com/influxdata/flux/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/influxdata%2Fflux/sbom","scorecard":{"id":488140,"data":{"date":"2025-08-11","repo":{"name":"github.com/influxdata/flux","commit":"507e7ef6827dc0fb3b380c9eb8fdc1999adb4260"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"13 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/semantic.yml:1","Warn: no topLevel permission defined: .github/workflows/stale.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.197.0 not signed: https://api.github.com/repos/influxdata/flux/releases/227762992","Warn: release artifact v0.196.1 not signed: https://api.github.com/repos/influxdata/flux/releases/201147749","Warn: release artifact v0.196.0 not signed: https://api.github.com/repos/influxdata/flux/releases/201144539","Warn: release artifact v0.195.2 not signed: https://api.github.com/repos/influxdata/flux/releases/170109503","Warn: release artifact v0.195.1 not signed: https://api.github.com/repos/influxdata/flux/releases/159811182","Warn: release artifact v0.197.0 does not have provenance: https://api.github.com/repos/influxdata/flux/releases/227762992","Warn: release artifact v0.196.1 does not have provenance: https://api.github.com/repos/influxdata/flux/releases/201147749","Warn: release artifact v0.196.0 does not have provenance: https://api.github.com/repos/influxdata/flux/releases/201144539","Warn: release artifact v0.195.2 does not have provenance: https://api.github.com/repos/influxdata/flux/releases/170109503","Warn: release artifact v0.195.1 does not have provenance: https://api.github.com/repos/influxdata/flux/releases/159811182"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/semantic.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/influxdata/flux/semantic.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/stale.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/influxdata/flux/stale.yml/master?enable=pin","Warn: containerImage not pinned by hash: .devcontainer/Dockerfile:1: pin your Docker image by updating quay.io/influxdb/flux-build to quay.io/influxdb/flux-build@sha256:7ba38fb4fe296d4704cab03e9b609f2d872c05ad7bfd6e5631e4e440dfb6adc9","Warn: containerImage not pinned by hash: Dockerfile_build:7","Warn: containerImage not pinned by hash: Dockerfile_build:9","Warn: containerImage not pinned by hash: Dockerfile_build:14: pin your Docker image by updating golang:1.24 to golang:1.24@sha256:e155b5162f701b7ab2e6e7ea51cec1e5f6deffb9ab1b295cf7a697e81069b050","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   4 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0635","Warn: Project is vulnerable to: GO-2022-0646","Warn: Project is vulnerable to: RUSTSEC-2021-0145 / GHSA-g98v-hv3f-hcfr","Warn: Project is vulnerable to: RUSTSEC-2024-0375","Warn: Project is vulnerable to: RUSTSEC-2024-0421 / GHSA-h97m-ww89-6jmq","Warn: Project is vulnerable to: RUSTSEC-2024-0370","Warn: Project is vulnerable to: GHSA-rr8g-9fpq-6wmg","Warn: Project is vulnerable to: RUSTSEC-2025-0023","Warn: Project is vulnerable to: GO-2025-3829 / GHSA-4vq8-7jfc-9cvp","Warn: Project is vulnerable to: GO-2025-3367 / GHSA-r9px-m959-cxf4","Warn: Project is vulnerable to: GO-2025-3368 / GHSA-v725-9546-7q7m","Warn: Project is vulnerable to: GO-2024-2456 / GHSA-449p-3h89-pw88","Warn: Project is vulnerable to: GO-2024-2466 / GHSA-mw99-9chc-xw7r","Warn: Project is vulnerable to: RUSTSEC-2021-0139","Warn: Project is vulnerable to: RUSTSEC-2024-0388","Warn: Project is vulnerable to: RUSTSEC-2024-0384","Warn: Project is vulnerable to: GHSA-c827-hfw6-qwvm","Warn: Project is vulnerable to: RUSTSEC-2021-0127"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T18:20:17.014Z","repository_id":37385209,"created_at":"2025-08-19T18:20:17.014Z","updated_at":"2025-08-19T18:20:17.014Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28846058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T13:02:32.985Z","status":"ssl_error","status_checked_at":"2026-01-28T13:02:04.945Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:27.681Z","updated_at":"2026-01-28T14:02:55.448Z","avatar_url":"https://github.com/influxdata.png","language":"FLUX","readme":":warning: InfluxData still support Flux, but we are not doing active development on it or adding any new features to it. We still do security patches and will address any critical defects through the maintenance period. Our focus now is on features related to our latest database engine, InfluxDB 3.0, and its associated products (Cloud Serverless, Cloud Dedicated, Clustered, Edge). There is a community owned fork of [Flux](https://github.com/InfluxCommunity/flux) where active development is happening.\n\n# Flux - Influx data language\n\n[![CircleCI](https://circleci.com/gh/influxdata/flux/tree/master.svg?style=svg)](https://circleci.com/gh/influxdata/flux/tree/master)\n\n\nFlux is a lightweight scripting language for querying databases (like [InfluxDB](https://github.com/influxdata/influxdb)) and working with data.\nIt is part of InfluxDB 1.7 and 2.0, but can be run independently of those.\nThis repository contains the language definition and an implementation of the language core.\n\n## Specification\n\nA complete specification can be found in [SPEC.md](./docs/SPEC.md).\nThe specification contains many examples to start learning Flux.\n\n## Requirements\n\nBuilding Flux requires the following:\n\n* Go 1.16 or greater with module support enabled\n* Latest stable version of Rust and Cargo (can be installed with [rustup](https://rustup.rs/))\n* Clang\n\n## Getting Started\n\nFlux is currently available in InfluxDB 1.7 and 2.0, or through the REPL that can be compiled from this repository.\n\nTo build Flux, first install the GNU `pkg-config` utility on your system, then ensure the `pkg-config` wrapper is also installed.\n\n```\n# First install GNU pkg-config.\n# On Debian/Ubuntu\n$ sudo apt-get install -y clang pkg-config\n\n# Or on Mac OS X with Homebrew\n$ brew install pkg-config\n\n# Next, install the pkg-config wrapper utility\n$ go get github.com/influxdata/pkg-config\n\n# Optionally, add the GOBIN directory to your PATH\n$ export PATH=${GOPATH}/bin:${PATH}\n```\n\nIf GOBIN is in your PATH, ensure that `pkg-config` is configured correctly by using `which -a`.\n\n```\n$ which -a pkg-config\n/home/user/go/bin/pkg-config\n/usr/bin/pkg-config\n```\n\nTo compile and use the REPL, use the following command to run the repl with suggestions enabled:\n\n```\n$ go build ./cmd/flux\n$ ./flux --enable-suggestions\n```\n\nAlternatively, because the `pkg-config` wrapper may not work in all projects you may not want to add the wrapper `pkg-config` to your `PATH`. In this case you can set `PKG_CONFIG` and Go will use it. Eg, to build and install to ${GOPATH}/bin using `PKG_CONFIG`:\n\n```\n$ PKG_CONFIG=/home/user/go/bin/pkg-config go install ./cmd/flux\n$ ${GOPATH}/bin/flux repl\n```\n\nFrom within the REPL, you can run any Flux expression.\nYou can also load a file directly into the REPL by typing `@` followed by the filename.\n\n```\n\u003e @my_file_to_load.flux\n```\n\n## Basic Syntax\n\nHere are a few examples of the language to get an idea of the syntax.\n\n\n    // This line is a comment\n\n    // Support for traditional math operators\n    1 + 1\n\n    // Several data types are built-in\n    true                     // a boolean true value\n    1                        // an int\n    1.0                      // a float\n    \"this is a string\"       // a string literal\n    1h5m                     // a duration of time representing 1 hour and 5 minutes\n    2018-10-10               // a time starting at midnight for the default timezone on Oct 10th 2018\n    2018-10-10T10:05:00      // a time at 10:05 AM for the default timezone on Oct 10th 2018\n    [1,1,2]                  // an array of integers\n    {foo: \"str\", bar: false} // an object with two keys and their values\n\n    // Values can be assigned to identifiers\n    x = 5.0\n    x + 3.0 // 8.0\n\n    // Import libraries\n    import \"math\"\n\n    // Call functions always using keyword arguments\n    math.pow(x: 5.0, y: 3.0) // 5^3 = 125\n\n    // Functions are defined by assigning them to identifiers\n    add = (a, b) =\u003e a + b\n\n    // Call add using keyword arguments\n    add(a: 5, b: 3) // 8\n\n    // Functions are polymorphic\n    add(a: 5.5, b: 2.5) // 8.0\n\n    // And strongly typed\n    add(a: 5, b: 2.5) // type error\n\n    // Access data from a database and store it as an identifier\n    // This is only possible within the influxdb repl (at the moment).\n    import \"influxdata/influxdb\"\n    data = influxdb.from(bucket:\"telegraf/autogen\")\n\n    // When running inside of influxdb, the import isn't needed.\n    data = from(bucket:\"telegraf/autogen\")\n\n    // Chain more transformation functions to further specify the desired data\n    cpu = data\n        // only get the last 5m of data\n        |\u003e range(start: -5m)\n        // only get the \"usage_user\" data from the _measurement \"cpu\"\n        |\u003e filter(fn: (r) =\u003e r._measurement == \"cpu\" and r._field == \"usage_user\")\n\n    // Return the data to the client\n    cpu |\u003e yield()\n\n    // Group an aggregate along different dimensions\n    cpu\n        // organize data into groups by host and region\n        |\u003e group(columns:[\"host\",\"region\"])\n        // compute the mean of each group\n        |\u003e mean()\n        // yield this result to the client\n        |\u003e yield()\n\n    // Window an aggregate over time\n    cpu\n        // organize data into groups of 1 minute\n        // compute the mean of each group\n        |\u003e aggregateWindow(every: 1m, fn: mean)\n        // yield this result to the client\n        |\u003e yield()\n\n    // Gather different data\n    mem = data\n        // only get the last 5m of data\n        |\u003e range(start: -5m)\n        // only get the \"used_percent\" data from the _measurement \"mem\"\n        |\u003e filter(fn: (r) =\u003e r._measurement == \"mem\" and r._field == \"used_percent\")\n\n\n    // Join data to create wider tables and map a function over the result\n    join(tables: {cpu:cpu, mem:mem}, on:[\"_time\", \"host\"])\n        // compute the ratio of cpu usage to mem used_percent\n        |\u003e map(fn:(r) =\u003e {_time: r._time, _value: r._value_cpu / r._value_mem)\n        // again yield this result to the client\n        |\u003e yield()\n\nThe above examples give only a taste of what is possible with Flux.\nSee the complete [documentation](https://v2.docs.influxdata.com/v2.0/query-data/get-started/) for more complete examples and instructions for how to use Flux with InfluxDB 2.0.\n\n## Contributing\n\nFlux welcomes contributions to the language and the runtime.\n\nIf you are interested in contributing, please read the [contributing guide](https://github.com/influxdata/flux/blob/master/CONTRIBUTING.md) for more information.\n\n### Development basics\n\nIf you modify any Rust code, you will need to force Go to rebuild the library.\n\n```bash\n$ go generate ./libflux/go/libflux\n```\n\nIf you create or change any Flux functions, you will need to rebuild the stdlib and inform Go that it must rebuild libflux:\n```bash\n$ go generate ./stdlib ./libflux/go/libflux\n```\n\nYour new Flux's code should be formatted to coexist nicely with the existing codebase with go fmt.  For example, if you add code to stdlib/universe:\n```bash\n$ go fmt ./stdlib/universe/\n```\n\nDon't forget to add your tests and make sure they work. Here is an example showing how to run the tests for the stdlib/universe package:\n```bash\n$ go test ./stdlib/universe/\n```\n\nIf you modify the flatbuffer files you need to run `make generate` to update the generated bindings. To ensure that you have the correct version of `flatc` you may use `./install_flatc.sh`.\n\n```bash\n$ ./install_flatc.sh\n$ make generate\n```\n","funding_links":[],"categories":["开源类库","FLUX","Open source library","Uncategorized"],"sub_categories":["解释器","Interpreter","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfluxdata%2Fflux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfluxdata%2Fflux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfluxdata%2Fflux/lists"}