wtf Documentation

The personal information dashboard for your terminal

17,014 stars Go Go 1 file ยท ~2,364 tokens #cui#dashboard#devops#go#golang#hacktoberfest#terminal#tui
RAW Doc

File: README.md






:rotating_light: :warning: This project is going through some changes as we prepare for v1.0. This includes
a rename from WTF to Tessera! Stay tuned! :warning: :rotating_light:

WTF (aka 'wtfutil') is the personal information dashboard for your terminal, providing at-a-glance access to your very important but infrequently-needed stats and data.

Used by thousands of developers and tech people around the world, WTF is free and open-source. To support the continued use and development of WTF, please consider sponsoring WTF via GitHub Sponsors.

Are you a contributor or sponsor?

Awesome! See here for how you can change the exit message, the message WTF shows when quitting, to something special just for you.


Installation

Installing via Homebrew

The simplest way from Homebrew:

console
brew install wtfutil

wtfutil

That version can sometimes lag a bit, as recipe updates take time to get accepted into homebrew-core. If you always want the bleeding edge of releases, you can tap it:

console
brew install linodians/tap/wtfutil

wtfutil

Installing via `go install`

Just run

sh
go install github.com/wtfutil/wtf@latest

Installing via MacPorts

You can also install via MacPorts:

console
sudo port selfupdate
sudo port install wtfutil

wtfutil

Installing a Binary

Download the latest binary from GitHub.

WTF is a stand-alone binary. Once downloaded, copy it to a location you can run executables from (ie: /usr/local/bin/), and set the permissions accordingly:

bash
chmod a+x /usr/local/bin/wtfutil

and you should be good to go.

Installing from Source

If you want to run the build command from within your $GOPATH:

bash
# Set the Go proxy
export GOPROXY="https://proxy.golang.org,direct"

# Disable the Go checksum database
export GOSUMDB=off

# Enable Go modules
export GO111MODULE=on

go get -u github.com/wtfutil/wtf
cd $GOPATH/src/github.com/wtfutil/wtf
make install
make run

If you want to run the build command from a folder that is not in your $GOPATH:

bash
# Set the Go proxy
export GOPROXY="https://proxy.golang.org,direct"

go get -u github.com/wtfutil/wtf
cd $GOPATH/src/github.com/wtfutil/wtf
make install
make run

Installing via Arch User Repository

Arch Linux users can utilise the wtfutil package to build it from source, or wtfutil-bin to install pre-built binaries.

Documentation

See https://wtfutil.com for the definitive
documentation. Here's some short-cuts:

Modules

Modules are the chunks of functionality that make WTF useful. Modules are added and configured by including their configuration values in your config.yml file. The documentation for each module describes how to configure them.

Some interesting modules you might consider adding to get you started:

Getting Bugs Fixed or Features Added

WTF is open-source software, informally maintained by a small collection of volunteers who come and go at their leisure. There are absolutely no guarantees that, even if an issue is opened for them, bugs will be fixed or features added.

If there is a bug that you really need to have fixed or a feature you really want to have implemented, you can greatly increase your chances of that happening by creating a bounty on BountySource to provide an incentive for someone to tackle it.

Contributing to the Source Code

First, kindly read Talk, then code by Dave Cheney. It's great advice and will often save a lot of time and effort.

Next, kindly read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.

Then create your branch, write your code, submit your PR, and join the rest of the awesome people who've contributed their time and effort towards WTF. Without their contributors, WTF wouldn't be possible.

Don't worry if you've never written Go before, or never contributed to an open source project before, or that your code won't be good enough. For a surprising number of people WTF has been their first Go project, or first open source contribution. If you're here, and you've read this far, you're the right stuff.

Contributing to the Documentation

Documentation now lives in its own repository here: https://github.com/wtfutil/wtfdocs.

Please make all additions and updates to documentation in that repository.

Adding Dependencies

Dependency management in WTF is handled by Go modules. Please check out that page for more details on how Go modules work.

Acknowledgments

The inspiration for WTF came from Monica Dinculescu's
tiny-care-terminal.

WTF is built atop tcell and tview, fantastic projects both. WTF is built, packaged, and deployed via GoReleaser.


File: modules/newrelic/client/README.md


Buildstatus

New Relic API library for Go

This is a Go library that wraps the New Relic REST
API. It provides the needed types to interact with the New Relic REST API.

It's still in progress and I haven't finished the entirety of the API, yet. I
plan to finish all GET (read) operations before any POST (create) operations,
and then PUT (update) operations, and, finally, the DELETE operations.

The API documentation can be found from New Relic,
and you'll need an API key (for some operations, an Admin API key is
required).

USAGE

This library will provide a client object and any operations can be performed
through it. Simply import this library and create a client to get started:

go
package main

import (
  "github.com/yfronto/newrelic"
)

var api_key = "..." // Required

func main() {
  // Create the client object
  client := newrelic.NewClient(api_key)

  // Get the applciation with ID 12345
  myApp, err := client.GetApplication(12345)
  if err != nil {
    // Handle error
  }

  // Work with the object
  fmt.Println(myApp.Name)

  // Some operations accept options
  opts := &newrelic.AlertEventOptions{
    // Only events with "MyProduct" as the product name
    Filter: newRelic.AlertEventFilter{
      Product: "MyProduct",
    },
  }
  // Get a list of recent events for my product
  events, err := client.GetAlertEvents(opts)
  if err != nil {
    // Handle error
  }
  // Display each event with some information
  for _, e := range events {
    fmt.Printf("%d -- %d (%s): %s\n", e.Timestamp, e.Id, e.Priority, e.Description)
  }
}

Contributing

As I work to populate all actions, bugs are bound to come up. Feel free to
send me a pull request or just file an issue. Staying up to date with an API
is hard work and I'm happy to accept contributors.

DISCLAIMER: I am in no way affiliated with New Relic and this work is
merely a convenience project for myself with no guarantees. It should be
considered "as-is" with no implication of responsibility. See the included
LICENSE for more details.