{"id":29806454,"url":"https://github.com/georgemandis/golinks","last_synced_at":"2026-04-11T20:39:03.600Z","repository":{"id":304704182,"uuid":"1019114940","full_name":"georgemandis/golinks","owner":"georgemandis","description":"Made a \"go link\" toy in Deno","archived":false,"fork":false,"pushed_at":"2025-07-15T19:03:34.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-27T18:15:24.736Z","etag":null,"topics":["deno","golinks"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/georgemandis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-13T19:10:25.000Z","updated_at":"2025-07-15T19:03:38.000Z","dependencies_parsed_at":"2025-07-14T22:23:59.038Z","dependency_job_id":"cbd0e74f-cbd5-4484-9d67-23f77942c59f","html_url":"https://github.com/georgemandis/golinks","commit_stats":null,"previous_names":["georgemandis/golinks"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/georgemandis/golinks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgemandis%2Fgolinks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgemandis%2Fgolinks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgemandis%2Fgolinks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgemandis%2Fgolinks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/georgemandis","download_url":"https://codeload.github.com/georgemandis/golinks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgemandis%2Fgolinks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267527835,"owners_count":24102019,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["deno","golinks"],"created_at":"2025-07-28T14:10:20.752Z","updated_at":"2025-10-17T10:20:04.230Z","avatar_url":"https://github.com/georgemandis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Links Server \u0026 CLI Tool\n\n[![JSR](https://jsr.io/badges/@georgemandis/golinks)](https://jsr.io/@georgemandis/golinks)  [![JSR Score](https://jsr.io/badges/@georgemandis/golinks/score)](https://jsr.io/@georgemandis/golinks)\n\n\nA simple go link redirect server built with Deno that allows you to create short\nlinks accessible via a local hostname (e.g. `go/\u003cshortcut\u003e`) or CLI interface.\n\nIf have Deno installed and you don't want to pull down the code you can install\nthe script like so:\n\n```bash\ndeno install --global --allow-read --allow-write --allow-env --allow-net --allow-run jsr:@georgemandis/golinks\n```\n\nRun `golinks`\n\n## Features\n\n- **HTTP Server**: Binds to port 80 (default)\n- **Web Management**: Accessible at `http://go/_` (or whatever hostname you\n  choose)\n- **Command Line Interface**: Manage links from the terminal (see below)\n- **SQLite Storage**: Links stored in `~/.golinks/db.sqlite`\n- **Click Tracking**: Monitor link usage statistics\n\n## Setup\n\n### Quick Start (Development)\n\n1. **Add `go` to your hosts file**:\n\n   ```bash\n   echo \"127.0.0.1 go\" | sudo tee -a /etc/hosts\n   ```\n\n2. **Install and run**:\n   ```bash\n   # Start the server (requires sudo for port 80)\n   deno task start\n   ```\n\n### Global Installation\n\nUse\n[Deno's install command](https://docs.deno.com/runtime/reference/cli/install/#deno-install---global-%5Bpackage_or_url%5D)\nwith the `--global` flag to install it globally.\n\n1. **Install globally**:\n   ```bash\n   deno install --global --allow-read --allow-write --allow-env --allow-net --allow-run --config deno.json --name golinks cli.ts\n   ```\n   You can rename it to something else if you like.\n2. **Add `go` to your hosts file** (if not already done):\n\n   ```bash\n   echo \"127.0.0.1 go\" | sudo tee -a /etc/hosts\n   ```\n   This step is very optional and you can change `go` to something else if you\n   like.\n\n3. **Start the server**:\n   ```bash\n   golinks --server\n   ```\n   Or, if you pulled down the source and opted not ot install it locally:\n   ```bash\n   deno task start\n   ```\n\n## Usage\n\n### Web Interface\n\nVisit `http://go/_` to:\n\n- Add new links\n- View existing links\n- Delete links\n- View statistics\n\n### Command Line\n\n#### Development Usage\n\n```bash\n# Add a new link\ndeno task cli --shortcut gh --url https://github.com\n\n# List all links\ndeno task cli --list\n\n# Delete a link\ndeno task cli --delete --shortcut gh\n\n# Show statistics\ndeno task cli --stats\n\n# Show help\ndeno task cli --help\n```\n\n#### Global CLI Usage (after global installation)\n\n```bash\n# Add a new link\ngolinks --shortcut gh --url https://github.com\n\n# List all links\ngolinks --list\n\n# Delete a link\ngolinks --delete --shortcut gh\n\n# Show statistics\ngolinks --stats\n\n# Start the server\ngolinks --server\n\n# Open a shortcut directly in your browser\ngolinks gh\n\n# Show help\ngolinks --help\n```\n\n### Using Links\n\nOnce created, access your links at:\n\n- `http://go/gh` → redirects to GitHub\n- `http://go/docs` → redirects to your documentation\n- etc.\n\nOr manage and use them via the CLI\n\n- `golinks gh` → redirects to GitHub\n- `golinks docs` → redirects to your documentation\n- etc.\n\n## API Documentation\n\nThis package provides a programmatic API for managing Go Links. View the full API documentation at [JSR.io](https://jsr.io/@georgemandis/golinks).\n\n### Basic Usage\n\n```ts\nimport { GoLinksDB, type GoLink } from \"@georgemandis/golinks\";\n\nconst db = new GoLinksDB();\nawait db.init();\n\n// Add a new link\ndb.addLink(\"gh\", \"https://github.com\", \"GitHub homepage\");\n\n// Get a link\nconst link = db.getLink(\"gh\");\nconsole.log(link?.url); // \"https://github.com\"\n\n// List all links\nconst allLinks = db.getAllLinks();\n\n// Update a link\ndb.updateLink(\"gh\", \"https://github.com/myusername\", \"My GitHub profile\");\n\n// Delete a link\ndb.deleteLink(\"gh\");\n\n// Clean up\ndb.close();\n```\n\n### Server Integration\n\n```ts\nimport { handleRequest } from \"@georgemandis/golinks\";\n\n// Use with Deno.serve\nDeno.serve({ port: 80 }, handleRequest);\n```\n\n## Database Location\n\nLinks are stored in `~/.golinks/db.sqlite`\n\n## Requirements\n\n- Deno 1.40+\n- sudo access (for binding to port 80)\n- `go` added to your hosts file (Optionally)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgemandis%2Fgolinks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeorgemandis%2Fgolinks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgemandis%2Fgolinks/lists"}