{"id":13827078,"url":"https://github.com/spy16/radium","last_synced_at":"2025-07-02T23:32:23.676Z","repository":{"id":135097943,"uuid":"140926188","full_name":"spy16/radium","owner":"spy16","description":"radium is a platform (client and optional server) for viewing reference articles, cheat sheets, snippets etc.","archived":false,"fork":false,"pushed_at":"2018-11-22T11:00:38.000Z","size":58,"stargazers_count":61,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-21T10:26:52.332Z","etag":null,"topics":["cheatsheet","go","golang","reference","snippets"],"latest_commit_sha":null,"homepage":"","language":"Go","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/spy16.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-07-14T07:32:27.000Z","updated_at":"2023-09-08T17:42:46.000Z","dependencies_parsed_at":"2023-06-18T05:15:25.484Z","dependency_job_id":null,"html_url":"https://github.com/spy16/radium","commit_stats":null,"previous_names":["shivylp/radium","spby/radium"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/spy16/radium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spy16%2Fradium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spy16%2Fradium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spy16%2Fradium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spy16%2Fradium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spy16","download_url":"https://codeload.github.com/spy16/radium/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spy16%2Fradium/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263232803,"owners_count":23434740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cheatsheet","go","golang","reference","snippets"],"created_at":"2024-08-04T09:01:49.565Z","updated_at":"2025-07-02T23:32:23.629Z","avatar_url":"https://github.com/spy16.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# radium\n\n[![GoDoc](https://godoc.org/github.com/spy16/radium?status.svg)](https://godoc.org/github.com/spy16/radium) [![Build Status](https://travis-ci.org/spy16/radium.svg?branch=master)](https://travis-ci.org/spy16/radium) [![Go Report Card](https://goreportcard.com/badge/github.com/spy16/radium)](https://goreportcard.com/report/github.com/spy16/radium)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fspy16%2Fradium.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fspy16%2Fradium?ref=badge_shield)\n\n`radium` is a platform (client and optional server) for viewing\nreference articles, cheat sheets etc. right from a shell. `radium`\nis written in `Go` (`Golang`)\n\n## Install\n\n1. Download the latest pre-built binary for your platform from [releases](https://github.com/spy16/radium/releases) page.\n2. Run the binary! (Optionally, create a `radium.yaml` file in `~` to customize)\n\n## Build\n\n`radium` requires Go 1.8+ to build. Simply run `make` command in\nthe source directory to build and install the binary into your `$GOPATH/bin`\ndirectory. If you just want to build the binary, run `make build`\n\n## Run\nYou can run `radium --help` to see the list of available commands.\n\n### Querying from command-line\n\n```bash\nradium query \"append file in go\"\n\nradium query dir --attr platform:windows\n\nradium query go\n```\n\n\n\u003e `--attr` is not part of radium framework but part of the source\n\u003e implementation itself. Weather to consume the attributes or not\n\u003e is decided by the source implementation.\n\n### Querying from curl\n\nFor this, you need to run `radium` in server mode first using the\ncommand: `radium serve --addr=localhost:8080`\n\nThen\n\n```bash\ncurl \"localhost:8080/search?q=append+file+in+go\"\n\ncurl \"localhost:8080/search?q=dir\u0026platform=windows\"\n\ncurl \"localhost:8080/search?q=go\"\n```\n\n\u003e When using http api, all query parameters except `q` and `strategy` will be\n\u003e assumed to be attributes\n\n### Running as Clipboard Monitor\n\nRun `radium serve --clipboard` to start radium in server+clipboard\nmode (pass `--addr=\"\"` to run in clipboard-only mode).\n\nNow, everytime you copy some text into clipboard (which is less than\n5 words), `radium` is going to run a query and try to find some results.\nIf a result is found, it will be pasted back into the clipboard\n\n## How it works?\n\n`radium` works by querying/scraping different knowledge sources\n(e.g. tldr-pages, LearnXInYMinutes etc.). A `Source` in `radium`\nis a `Go` interface and can be implemented to add new references\nto provide more relevant results.\n\n```go\ntype Source interface {\n  Search(query Query) ([]Article, error)\n}\n```\n\nCurrently following implementations are available:\n\n\n1. `sources.TLDR` using the awesome [tldr-pages](https://github.com/tldr-pages/tldr) project\n2. `sources.LearnXInY` using the awesome [Learn X In Y Minutes](https://github.com/adambard/learnxinyminutes-docs) project\n3. `cheatsh.CheatSh` using the awesome [cheat.sh](https://github.com/chubin/cheat.sh) project\n4. `sources.Radium` which can be used to query other `radium` servers to enable distributed setup\n5. `wikipedia.Wikipedia` which queries and extracts first paragraph from [Wikipedia](https://en.wikipedia.org)\n6. `duckduckgo.DuckDuckGo` which uses [DuckDuckGo Instant Answer API](https://api.duckduckgo.com/)\n\nSee [sources/README.md](./sources/README.md) for more information\n\n## TODO:\n\n- [x] Make sources configurable\n  - [x] sources to be used should be configurable per instance\n- [ ] a configurable caching mechanism to enable offline usage\n- [ ] Add more sources\n  - [x] Wikipedia\n  - [x] DuckDuckGo\n- [ ] Enable markdown to console colored output ?\n- [ ] Enable clipboard monitoring\n  - [x] everytime user copies a string, run radium query\n  - [x] if a result is available within certain time window, replace the clipboard\n    content with the solution\n  - [ ] enable query only if clipboard text is in special format to reduce unwanted paste-backs\n\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fspy16%2Fradium.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fspy16%2Fradium?ref=badge_large)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspy16%2Fradium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspy16%2Fradium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspy16%2Fradium/lists"}